summaryrefslogtreecommitdiff
path: root/build-aux/useless-if-before-free
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-30 15:02:02 +0100
committerJim Meyering <meyering@redhat.com>2009-10-30 17:01:27 +0100
commitb3602e85d8c625e8ffc08855b67c0ae11169a5f3 (patch)
tree3ea2076741f3ae5813cf1a0639d24efae75695af /build-aux/useless-if-before-free
parent68b698308b2bb4dc2969469b79c4450fed49eb85 (diff)
downloadgnulib-b3602e85d8c625e8ffc08855b67c0ae11169a5f3.tar.gz
perl scripts: remove #!/usr/bin/perl in favor of more portable...
Rather than putting #!/usr/bin/perl on the first line, start with a variant of what's recommended by "man perlrun" that invokes the first "perl" program from your shell's search path. * build-aux/gitlog-to-changelog: Replace #!... as above. Add a "Local Variables" perl mode setting. Prompted by a patch from Ludovic Courtès. Improved by Eric Blake. * build-aux/useless-if-before-free: Likewise. * build-aux/announce-gen: Likewise. * build-aux/update-copyright: Likewise.
Diffstat (limited to 'build-aux/useless-if-before-free')
-rwxr-xr-xbuild-aux/useless-if-before-free5
1 files changed, 4 insertions, 1 deletions
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index abcdef2cda..793c9753e0 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -1,4 +1,6 @@
-#!/usr/bin/perl -T
+eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
+ & eval 'exec perl -wST "$0" $argv:q'
+ if 0;
# Detect instances of "if (p) free (p);".
# Likewise for "if (p != NULL) free (p);". And with braces.
# Also detect "if (NULL != p) free (p);".
@@ -197,6 +199,7 @@ When modifying files, refuse to process anything other than a regular file.
EOF
## Local Variables:
+## mode: perl
## indent-tabs-mode: nil
## eval: (add-hook 'write-file-hooks 'time-stamp)
## time-stamp-start: "my $VERSION = '"