Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 5b574542070db286c89b3827e8f15ed4b3b39034 Mon Sep 17 00:00:00 2001 |
| 2 | From: Robert Yang <liezhi.yang@windriver.com> |
| 3 | Date: Thu, 6 Apr 2017 01:46:00 -0700 |
| 4 | Subject: [PATCH] replace "perl -w" with "use warnings" |
| 5 | |
| 6 | The shebang's max length is usually 128 as defined in |
| 7 | /usr/include/linux/binfmts.h: |
| 8 | #define BINPRM_BUF_SIZE 128 |
| 9 | |
| 10 | There would be errors when @PERL@ is longer than 128, use |
| 11 | '/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w' |
| 12 | doesn't work: |
| 13 | |
| 14 | /usr/bin/env: perl -w: No such file or directory |
| 15 | |
| 16 | So replace "perl -w" with "use warnings" to make it work. |
| 17 | |
| 18 | Upstream-Status: Pending |
| 19 | |
| 20 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
| 21 | --- |
| 22 | font/devpdf/util/BuildFoundries.pl | 3 ++- |
| 23 | src/devices/gropdf/gropdf.pl | 3 ++- |
| 24 | src/devices/gropdf/pdfmom.pl | 3 ++- |
| 25 | src/utils/afmtodit/afmtodit.pl | 3 ++- |
| 26 | 4 files changed, 8 insertions(+), 4 deletions(-) |
| 27 | |
| 28 | diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl |
| 29 | index 39f2f0d..a2bfd8e 100644 |
| 30 | --- a/font/devpdf/util/BuildFoundries.pl |
| 31 | +++ b/font/devpdf/util/BuildFoundries.pl |
| 32 | @@ -1,4 +1,4 @@ |
| 33 | -#!/usr/bin/perl -w |
| 34 | +#!/usr/bin/perl |
| 35 | # |
| 36 | # BuildFoundries : Given a Foundry file generate groff and download files |
| 37 | # Deri James : Monday 07 Feb 2011 |
| 38 | @@ -22,6 +22,7 @@ |
| 39 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 40 | |
| 41 | use strict; |
| 42 | +use warnings; |
| 43 | |
| 44 | my $where=shift||''; |
| 45 | my $devps=shift||'../devps'; |
| 46 | diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl |
| 47 | index 035d123..b933b32 100644 |
| 48 | --- a/src/devices/gropdf/gropdf.pl |
| 49 | +++ b/src/devices/gropdf/gropdf.pl |
| 50 | @@ -1,4 +1,4 @@ |
| 51 | -#!@PERL@ -w |
| 52 | +#!@PERL@ |
| 53 | # |
| 54 | # gropdf : PDF post processor for groff |
| 55 | # |
| 56 | @@ -21,6 +21,7 @@ |
| 57 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 58 | |
| 59 | use strict; |
| 60 | +use warnings; |
| 61 | use Getopt::Long qw(:config bundling); |
| 62 | use Compress::Zlib; |
| 63 | |
| 64 | diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl |
| 65 | index beec820..4b46ea4 100644 |
| 66 | --- a/src/devices/gropdf/pdfmom.pl |
| 67 | +++ b/src/devices/gropdf/pdfmom.pl |
| 68 | @@ -1,4 +1,4 @@ |
| 69 | -#!@PERL@ -w |
| 70 | +#!@PERL@ |
| 71 | # |
| 72 | # pdfmom : Frontend to run groff -mom to produce PDFs |
| 73 | # Deri James : Friday 16 Mar 2012 |
| 74 | @@ -24,6 +24,7 @@ |
| 75 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 76 | |
| 77 | use strict; |
| 78 | +use warnings; |
| 79 | use File::Temp qw/tempfile/; |
| 80 | my @cmd; |
| 81 | my $dev='pdf'; |
| 82 | diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl |
| 83 | index 4f2ce83..5c078ff 100644 |
| 84 | --- a/src/utils/afmtodit/afmtodit.pl |
| 85 | +++ b/src/utils/afmtodit/afmtodit.pl |
| 86 | @@ -1,4 +1,4 @@ |
| 87 | -#! /usr/bin/perl -w |
| 88 | +#! /usr/bin/perl |
| 89 | # -*- Perl -*- |
| 90 | # Copyright (C) 1989-2014 Free Software Foundation, Inc. |
| 91 | # Written by James Clark (jjc@jclark.com) |
| 92 | @@ -19,6 +19,7 @@ |
| 93 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 94 | |
| 95 | use strict; |
| 96 | +use warnings; |
| 97 | |
| 98 | @afmtodit.tables@ |
| 99 | |
| 100 | -- |
| 101 | 2.10.2 |
| 102 | |