From patchwork Wed Apr 26 11:58:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Rytarowski X-Patchwork-Id: 9701283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D289603F6 for ; Wed, 26 Apr 2017 12:11:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9241285EC for ; Wed, 26 Apr 2017 12:11:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC6AE285F2; Wed, 26 Apr 2017 12:11:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38335285EC for ; Wed, 26 Apr 2017 12:11:01 +0000 (UTC) Received: from localhost ([::1]:54877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3Lme-0001mU-HN for patchwork-qemu-devel@patchwork.kernel.org; Wed, 26 Apr 2017 08:11:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3Lhq-0006gi-53 for qemu-devel@nongnu.org; Wed, 26 Apr 2017 08:06:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3Lhl-0000gs-QZ for qemu-devel@nongnu.org; Wed, 26 Apr 2017 08:06:02 -0400 Received: from mout.gmx.net ([212.227.15.18]:63291) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3Lhl-0000gW-EM for qemu-devel@nongnu.org; Wed, 26 Apr 2017 08:05:57 -0400 Received: from localhost.localdomain ([185.58.161.191]) by mail.gmx.com (mrgmx002 [212.227.17.184]) with ESMTPSA (Nemesis) id 0LaXEN-1dpMAH3nX5-00mGwh; Wed, 26 Apr 2017 14:05:55 +0200 From: Kamil Rytarowski To: qemu-devel@nongnu.org Date: Wed, 26 Apr 2017 13:58:26 +0200 Message-Id: <20170426115826.1826-1-n54@gmx.com> X-Mailer: git-send-email 2.12.2 X-Provags-ID: V03:K0:btSgmeMB7uiCRmYdKmzaRd9O0UjqSo8ERdLw8qkWgRmccUx8C2c PBTddivNo7ly6huSmQnMfRmXyf5Po4rfnz/NEapd6/23f8fL4wK0vKYYmYik+AYwdYfZfGB jv67+m9UHzo19VscNpMldTaLNQaOejQ8IC0sQyIHQs9DXkTwqSwycHLA0QszJJeswUsY2/v 9hmMktuJCrmElU2kP9fYA== X-UI-Out-Filterresults: notjunk:1; V01:K0:oyzUodTa6JI=:PsuK75g3FDRp1wRe9W7/ad HODOqw/0nIrL/s1zwPI3qcg77AM2R+dF7wKAuEh0F+yVh60k5EB9y0UBA3+EzIR70LODgeYNw r8146JVpGkDKEuZzXB2eWjlkzQsHDRCH2AW5ytOne8VNXFh3iEHTuIimFB67cwRsyNxOiUkDG IOctUtoiboy9YnGpm5imdD+5d9+UJkbFt2113nLvHEz1ArxHlFsFMD6lPvsvzlxkXI0tOFe1l oNg6XLXg+2cStzZ47JVFK0ojXVrHhs5QUgC67I4NQBpbDFtVIaPQr0pCsImHeu2ebdh31Vd2I CQL9l4GPx0G3O2W9KqKm2LOm08zZm2ZFcIB0J9Pmw+SVbv1eQoLPKhIjXswlMLnFgOBkmpb23 kVgqRLfKAFJww2hsXCYZQbN/ChPzJZ4118Xp1cg7Qim3MbFqHxoANcuiIya8LFCk8Tx9us1yO g6//BMEpXWGkOVFITIqCKk2JKsZ0+SPHo+G+98zuh5aEgxzA5vL4jMf7h4AzYVLaRHNVUCR8C jQGvKdWsDYimpG+V97f6D923K2HaBMKm7bkwq4G6RS1eXcOpm2VVXfOf+7RrgTVHl01yBgiqx 5sMNqpaZcCM4i3NucJSb2/e/qlLy95xEn9/glHxhkCP4gkceFDl9l2z5HgmNySdx2cjvC2HPY 92TPe5BVrgFYuFrYXe2a91FidR1z/KEU9KnHoSei7HPtbNuPAcdafM94rYfWchuBfFsrg0x7i /fJNy8ft/dEtH1aq/OLcjbry5V3DLIzym0LwnBEMnokwLdis0mOjXYh0ZDI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 Subject: [Qemu-devel] [PATCH] scripts: Switch to more portable Perl shebang X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Kamil Rytarowski Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The default NetBSD package manager is pkgsrc and it installs Perl along other third party programs under custom and configurable prefix. The default prefix for binary prebuilt packages is /usr/pkg, and the Perl executable lands in /usr/pkg/bin/perl. This change switches "/usr/bin/perl" to "/usr/bin/evn perl" as it's the most portable solution that should work for almost everybody. Perl's executable is detected automatically. This change switches -w option passed to the executable with more modern "usr warnings;" approach. There is no functional change to the default behavior. Signed-off-by: Kamil Rytarowski --- scripts/checkpatch.pl | 3 ++- scripts/clean-header-guards.pl | 3 ++- scripts/cleanup-trace-events.pl | 2 +- scripts/disas-objdump.pl | 4 +++- scripts/get_maintainer.pl | 3 ++- scripts/shaderinclude.pl | 2 +- scripts/switch-timer-api | 2 +- scripts/texi2pod.pl | 4 +++- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f084542934..3bb6fc95bd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # (c) 2001, Dave Jones. (the file handling bit) # (c) 2005, Joel Schopp (the ugly bit) # (c) 2007,2008, Andy Whitcroft (new conditions, test suite) @@ -6,6 +6,7 @@ # Licensed under the terms of the GNU GPL License version 2 use strict; +use warnings; my $P = $0; $P =~ s@.*/@@g; diff --git a/scripts/clean-header-guards.pl b/scripts/clean-header-guards.pl index 54ab99ae29..5e67f1998c 100755 --- a/scripts/clean-header-guards.pl +++ b/scripts/clean-header-guards.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # Clean up include guards in headers # @@ -28,6 +28,7 @@ # "cc -E -DGUARD_H -c -P -", and fed the test program on stdin. use strict; +use warnings; use Getopt::Std; # Stuff we don't want to clean because we import it into our tree: diff --git a/scripts/cleanup-trace-events.pl b/scripts/cleanup-trace-events.pl index 7e808efb6a..e93abc00da 100755 --- a/scripts/cleanup-trace-events.pl +++ b/scripts/cleanup-trace-events.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # Copyright (C) 2013 Red Hat, Inc. # # Authors: diff --git a/scripts/disas-objdump.pl b/scripts/disas-objdump.pl index 8f7e8182a1..bec905f04b 100755 --- a/scripts/disas-objdump.pl +++ b/scripts/disas-objdump.pl @@ -1,4 +1,6 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl + +use warnings; use File::Temp qw/ tempfile /; use Getopt::Long; diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 8261bcb1ad..d7c2311123 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # (c) 2007, Joe Perches # created from checkpatch.pl # @@ -11,6 +11,7 @@ # Licensed under the terms of the GNU GPL License version 2 use strict; +use warnings; my $P = $0; my $V = '0.26'; diff --git a/scripts/shaderinclude.pl b/scripts/shaderinclude.pl index 81b5146332..cd3bb40b12 100644 --- a/scripts/shaderinclude.pl +++ b/scripts/shaderinclude.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; diff --git a/scripts/switch-timer-api b/scripts/switch-timer-api index b0e230b9f1..41736d11dd 100755 --- a/scripts/switch-timer-api +++ b/scripts/switch-timer-api @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl index 6e8fec41a1..39ce584a32 100755 --- a/scripts/texi2pod.pl +++ b/scripts/texi2pod.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! /usr/bin/env perl # Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. @@ -22,6 +22,8 @@ # markup to Perl POD format. It's intended to be used to extract # something suitable for a manpage from a Texinfo document. +use warnings; + $output = 0; $skipping = 0; %sects = ();