From 6821a23e6cf34df37c351b45be413a8da9115f9f Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Sat, 11 May 2019 17:03:03 +0800 Subject: [PATCH 1/2] replace "perl -w" with "use warnings" The shebang's max length is usually 128 as defined in /usr/include/linux/binfmts.h: #define BINPRM_BUF_SIZE 128 There would be errors when @PERL@ is longer than 128, use '/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w' doesn't work: /usr/bin/env: perl -w: No such file or directory So replace "perl -w" with "use warnings" to make it work. Upstream-Status: Submitted [by email to g.branden.robinson@gmail.com] Signed-off-by: Robert Yang Rebase to 1.22.4. Signed-off-by: Hongxu Jia --- font/devpdf/util/BuildFoundries.pl | 3 ++- src/devices/gropdf/gropdf.pl | 3 ++- src/devices/gropdf/pdfmom.pl | 3 ++- src/utils/afmtodit/afmtodit.pl | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl index f8af826..9584e28 100644 --- a/font/devpdf/util/BuildFoundries.pl +++ b/font/devpdf/util/BuildFoundries.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # # BuildFoundries : Given a Foundry file generate groff and download files # Deri James : Monday 07 Feb 2011 @@ -22,6 +22,7 @@ # along with this program. If not, see . use strict; +use warnings; (my $progname = $0) =~s @.*/@@; my $where=shift||''; diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl index 2ec52d0..ce5a06f 100644 --- a/src/devices/gropdf/gropdf.pl +++ b/src/devices/gropdf/gropdf.pl @@ -1,4 +1,4 @@ -#!@PERL@ -w +#!@PERL@ # # gropdf : PDF post processor for groff # @@ -21,6 +21,7 @@ # along with this program. If not, see . use strict; +use warnings; use Getopt::Long qw(:config bundling); use constant diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl index c9b08b2..61124f3 100644 --- a/src/devices/gropdf/pdfmom.pl +++ b/src/devices/gropdf/pdfmom.pl @@ -1,4 +1,4 @@ -#!@PERL@ -w +#!@PERL@ # # pdfmom : Frontend to run groff -mom to produce PDFs # Deri James : Friday 16 Mar 2012 @@ -23,6 +23,7 @@ # along with this program. If not, see . use strict; +use warnings; use File::Temp qw/tempfile/; my @cmd; my $dev='pdf'; diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl index 954c58e..81a6c97 100644 --- a/src/utils/afmtodit/afmtodit.pl +++ b/src/utils/afmtodit/afmtodit.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! /usr/bin/perl # -*- Perl -*- # Copyright (C) 1989-2018 Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) @@ -19,6 +19,7 @@ # along with this program. If not, see . use strict; +use warnings; @afmtodit.tables@ -- 2.7.4