bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU m4 mktests.sh minor compatibility problem with POSIX 1003.1-2001


From: Paul Eggert
Subject: GNU m4 mktests.sh minor compatibility problem with POSIX 1003.1-2001
Date: Fri, 22 Feb 2002 20:37:16 -0800 (PST)

The new POSIX standard is now official (IEEE Std 1003.1-2001), and it
has removed support for an obsolete utility option that m4 uses.
Basically, the new POSIX has removed digit-string options (e.g., "tail
-1") and options beginning with "+" (e.g., "sort +1").  I'm using an
experimental environment that insists on the new standard, so I tend
to run into these problems before other people do.

Here is a proposed patch for GNU m4.

2002-02-22  Paul Eggert  <address@hidden>

        * examples/mktests.sh: Use `sed q', rather than `head -1',
        as POSIX 1003.1-2001 no longer allows `head -1'.

--- ./examples/mktests.sh       1998-11-26 16:13:02.000000000 -0800
+++ /net/knick/home/eggert/junk/mktests.sh      2002-02-22 20:33:45.039442000 
-0800
@@ -8,7 +8,7 @@ FILE=`basename $1 .m4`
 
 test -r $FILE.m4 || exit 1
 
-if head -1 $FILE.m4 | fgrep -w 'dnl noauto' >/dev/null; then
+if sed q $FILE.m4 | fgrep -w 'dnl noauto' >/dev/null; then
     echo "$FILE.test cannot be generated" 1>&2
     exit 1
 fi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]