bug-gnulib
[Top][All Lists]
Advanced

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

sed --posix change to gnulib-tool broke coreutils on Solaris


From: Paul Eggert
Subject: sed --posix change to gnulib-tool broke coreutils on Solaris
Date: Mon, 25 Dec 2006 17:53:57 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

The recent 'sed --posix' change leaked into Makefiles, which broke
coreutils on Solaris.  Rather than fix the problem one instance of
$SED at a time, I took a different tack by undoing the change and
installing the following less-intrusive change instead.

2006-12-25  Paul Eggert  <address@hidden>

        * gnulib-tool (SED): Remove, undoing previous change.
        The problem was that it broke coreutils on Solaris, because
        "sed --posix" leaked into a makefile.
        (sed): New alias, if 'alias' and GNU sed.

--- gnulib-tool 11 Dec 2006 18:19:59 -0000      1.201
+++ gnulib-tool 26 Dec 2006 01:51:36 -0000      1.203
@@ -72,6 +72,15 @@ if test -z "$SORT"; then
   SORT=sort
 fi
 
+# When using GNU sed, turn off as many GNU extensions as possible,
+# to minimize the risk of accidentally using non-portable features.
+# However, do this only for gnulib-tool itself, not for the code that
+# gnulib-tool generates, since we don't want "sed --posix" to leak
+# into makefiles.
+if (alias) > /dev/null 2>&1 && echo | sed --posix d >/dev/null 2>&1; then
+  alias sed='sed --posix'
+fi
+
 # func_usage
 # outputs to stdout the --help usage message.
 func_usage ()




reply via email to

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