This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] opts.sh & posix
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Neil Booth <neil at daikokuya dot co dot uk>, gcc-patches at gcc dot gnu dot org
- Date: 16 Jun 2003 09:18:38 -0300
- Subject: Re: [PATCH] opts.sh & posix
- Organization: GCC Team, Red Hat
- References: <3EEB5E47.9010608@codesourcery.com>
On Jun 14, 2003, Nathan Sidwell <nathan@codesourcery.com> wrote:
> + # Must unset this, so that the gawk extension RS="" works.
> + unset POSIXLY_CORRECT
Note that unset is not a portable shell construct. The portable
construct that has similar effects is:
if (unset FOO) 2 > /dev/null; then unset FOO; else FOO=; fi
If unset is not supported, and the code depends on whether the
environment variable is set or not, as opposed to set to a non-empty
string, it still loses, but that's the best you can do in portable
shell scripting.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer