autoconf-patches
[Top][All Lists]
Advanced

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

BSD related fixes


From: Pavel Roskin
Subject: BSD related fixes
Date: Tue, 12 Dec 2000 23:58:47 -0500 (EST)

Hello!

I have tested CVS Autoconf on FreeBSD 4.0 and found 3 problems.

One of them is very serious and breaks m4_pattern_allow and
m4_pattern_forbid.  For some reason _m4eof goes to the output if it's not
followed by a newline. It must be a problem in the FreeBSD shell.

"testsuite --help" shows an error message from sed. BSD sed doesn't
understand how the "y" (transliterate) command can translate 3 characters
to one.

mktest.sh fails because \? in sed is not portable. This is my bug, sorry.

After applying all those 3 fixes 175 tests pass (39 are ignored).
GNU/Linux is nnot affected (175 test pass).

ChangeLog:
        * m4sugar.m4 (m4_file_append): Add a newline after _m4eof,
        otherwise _m4eof is appended to the output on FreeBSD 4.0.
        * tests/atgeneral.m4 (AT_INIT): Avoid using unbalanced "y"
        in sed, use "s" instead.
        * tests/mktests.sh: Don't use \? in sed - it's a GNU extension.
        Use separate patterns for A[CU]_DEFUN and AC_DEFUN_ONCE.

Regards,
Pavel Roskin

_____________________________
Index: m4sugar.m4
--- m4sugar.m4  Thu Dec  7 00:48:45 2000
+++ m4sugar.m4  Tue Dec 12 23:37:26 2000
@@ -1615,7 +1615,8 @@
 m4_define([m4_file_append],
 [m4_syscmd([cat >>$1 <<_m4eof
 $2
-_m4eof])
+_m4eof
+])
 m4_if(m4_sysval, [0], [],
       [m4_fatal([$0: cannot write: $1])])])

Index: tests/atgeneral.m4
--- tests/atgeneral.m4  Thu Dec  7 20:21:25 2000
+++ tests/atgeneral.m4  Tue Dec 12 23:37:18 2000
@@ -168,7 +168,7 @@
 Tests:
 EOF
   # "  1 42  45 " => " (1|42|45): "
-  at_tests_pattern=`echo "$at_tests" | sed 's/^  *//;s/  *$//;y/  */|/'`
+  at_tests_pattern=`echo "$at_tests" | sed 's/^  *//;s/  *$//;s/  */|/g'`
   egrep -e " (${at_tests_pattern}): " <<EOF
 m4_divert([HELP])dnl Help message inserted here.
 m4_divert([SETUP])dnl
Index: tests/mktests.sh
--- tests/mktests.sh    Thu Dec  7 20:21:25 2000
+++ tests/mktests.sh    Tue Dec 12 23:37:12 2000
@@ -135,7 +135,8 @@
 # Get the list of macros which are defined in Autoconf level.
 # Get rid of the macros we are not interested in.
 cat $src |
-  sed -ne 's/^A[CU]_DEFUN\(_ONCE\)\?(\[*\([a-zA-Z0-9_]*\).*$/\2/p' |
+  sed -n -e 's/^A[CU]_DEFUN(\[*\([a-zA-Z0-9_]*\).*$/\1/p' \
+         -e 's/^AC_DEFUN_ONCE(\[*\([a-zA-Z0-9_]*\).*$/\1/p' |
   sort |
   uniq |
   egrep -v "$syntax_exclude_egrep" >acdefuns
_____________________________





reply via email to

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