From: Eric Blake Date: Tue, 7 Sep 2010 19:49:03 +0000 (-0600) Subject: docs: mention bash vs. POSIXLY_CORRECT X-Git-Tag: v2.68~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4416ea8d259ded79b03877ad41b2ec23b10e3f70;p=thirdparty%2Fautoconf.git docs: mention bash vs. POSIXLY_CORRECT * doc/autoconf.texi (Special Shell Variables) : Document bash behavior. * THANKS: Update. Reported by Dustin J. Mitchell, via bug-gnulib list. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index d43f6818..73be2216 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-09-07 Eric Blake + docs: mention bash vs. POSIXLY_CORRECT + * doc/autoconf.texi (Special Shell Variables) : + Document bash behavior. + * THANKS: Update. + Reported by Dustin J. Mitchell, via bug-gnulib list. + docs: enhance recommendations on test usage * doc/autoconf.texi (Limitations of Builtins) : Mention yet another Solaris issue. diff --git a/THANKS b/THANKS index 748c4e42..675d6d9c 100644 --- a/THANKS +++ b/THANKS @@ -113,6 +113,7 @@ Dietmar P. Schindler schd@mra.man.de Dmitry Grebeniuk gdsfh1@gmail.com Doug Evans dje@canuck.cygnus.com Dries Kimpe ? +Dustin J. Mitchell dustin@zmanda.com Edouard Bechetoille ebecheto@ens-lyon.fr Elbert Pol elbert.pol@gmail.com Eli Zaretskii eliz@gnu.org diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 4d62bf39..15639d96 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -16416,6 +16416,24 @@ separator Bash uses to set up certain environment variables (such as if you plan to use non-Posix shells to execute files. @xref{File System Conventions}, for more information about @code{PATH_SEPARATOR}. +@item POSIXLY_CORRECT +@evindex POSIXLY_CORRECT +In the GNU environment, exporting @env{POSIXLY_CORRECT} with any value +(even empty) causes programs to try harder to conform to Posix. +Autoconf does not directly manipulate this variable, but @command{bash} +ties the shell variable @env{POSIXLY_CORRECT} to whether the script is +running in Posix mode. Therefore, take care when exporting or unsetting +this variable, so as not to change whether @command{bash} is in Posix +mode. + +@example +$ @kbd{bash --posix -c 'set -o | grep posix} +> @kbd{unset POSIXLY_CORRECT} +> @kbd{set -o | grep posix'} +posix on +posix off +@end example + @item PWD @evindex PWD Posix 1003.1-2001 requires that @command{cd} and