Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001 |
| 2 | From: Robert Yang <liezhi.yang@windriver.com> |
| 3 | Date: Sat, 11 May 2019 17:03:03 +0800 |
| 4 | Subject: [PATCH 1/2] 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 | Rebase to 1.22.4. |
| 23 | |
| 24 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 25 | --- |
| 26 | font/devpdf/util/BuildFoundries.pl | 3 ++- |
| 27 | src/devices/gropdf/gropdf.pl | 3 ++- |
| 28 | src/devices/gropdf/pdfmom.pl | 3 ++- |
| 29 | src/utils/afmtodit/afmtodit.pl | 3 ++- |
| 30 | 4 files changed, 8 insertions(+), 4 deletions(-) |
| 31 | |
| 32 | diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl |
| 33 | index f8af826..9584e28 100644 |
| 34 | --- a/font/devpdf/util/BuildFoundries.pl |
| 35 | +++ b/font/devpdf/util/BuildFoundries.pl |
| 36 | @@ -1,4 +1,4 @@ |
| 37 | -#!/usr/bin/perl -w |
| 38 | +#!/usr/bin/perl |
| 39 | # |
| 40 | # BuildFoundries : Given a Foundry file generate groff and download files |
| 41 | # Deri James : Monday 07 Feb 2011 |
| 42 | @@ -22,6 +22,7 @@ |
| 43 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 44 | |
| 45 | use strict; |
| 46 | +use warnings; |
| 47 | |
| 48 | (my $progname = $0) =~s @.*/@@; |
| 49 | my $where=shift||''; |
| 50 | diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl |
| 51 | index 2ec52d0..ce5a06f 100644 |
| 52 | --- a/src/devices/gropdf/gropdf.pl |
| 53 | +++ b/src/devices/gropdf/gropdf.pl |
| 54 | @@ -1,4 +1,4 @@ |
| 55 | -#!@PERL@ -w |
| 56 | +#!@PERL@ |
| 57 | # |
| 58 | # gropdf : PDF post processor for groff |
| 59 | # |
| 60 | @@ -21,6 +21,7 @@ |
| 61 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 62 | |
| 63 | use strict; |
| 64 | +use warnings; |
| 65 | use Getopt::Long qw(:config bundling); |
| 66 | |
| 67 | use constant |
| 68 | diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl |
| 69 | index c9b08b2..61124f3 100644 |
| 70 | --- a/src/devices/gropdf/pdfmom.pl |
| 71 | +++ b/src/devices/gropdf/pdfmom.pl |
| 72 | @@ -1,4 +1,4 @@ |
| 73 | -#!@PERL@ -w |
| 74 | +#!@PERL@ |
| 75 | # |
| 76 | # pdfmom : Frontend to run groff -mom to produce PDFs |
| 77 | # Deri James : Friday 16 Mar 2012 |
| 78 | @@ -23,6 +23,7 @@ |
| 79 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 80 | |
| 81 | use strict; |
| 82 | +use warnings; |
| 83 | use File::Temp qw/tempfile/; |
| 84 | my @cmd; |
| 85 | my $dev='pdf'; |
| 86 | diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl |
| 87 | index 954c58e..81a6c97 100644 |
| 88 | --- a/src/utils/afmtodit/afmtodit.pl |
| 89 | +++ b/src/utils/afmtodit/afmtodit.pl |
| 90 | @@ -1,4 +1,4 @@ |
| 91 | -#! /usr/bin/perl -w |
| 92 | +#! /usr/bin/perl |
| 93 | # -*- Perl -*- |
| 94 | # Copyright (C) 1989-2018 Free Software Foundation, Inc. |
| 95 | # Written by James Clark (jjc@jclark.com) |
| 96 | @@ -19,6 +19,7 @@ |
| 97 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 98 | |
| 99 | use strict; |
| 100 | +use warnings; |
| 101 | |
| 102 | @afmtodit.tables@ |
| 103 | |
| 104 | -- |
| 105 | 2.7.4 |
| 106 | |