bug-autoconf
[Top][All Lists]
Advanced

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

putenv documentation


From: Michael Wardle
Subject: putenv documentation
Date: Tue, 28 Sep 2004 15:18:01 +1000
User-agent: Mutt/1.5.6+20040722i

Hi

According to the GNU autoconf documentation in 2.59 and HEAD:
     POSIX specifies that `putenv("FOO")' removes `FOO' from the
     environment, but on some systems (eg. FreeBSD 4) this is not the
     case and instead `unsetenv' must be used.

The latest revision of the POSIX (IEEE Std 1003.1-2004) does not support
this claim.  The only valid form it seems to support is name=value:
     The putenv() function shall use the string argument to set
     environment variable values. The string argument should point to
     a string of the form " name= value ".
     <http://www.unix.org/onlinepubs/009695399/functions/putenv.html>

I also note that on AIX 4.3, which claims to be conformant to UNIX95,
a call to putenv() with a non-null string not containing a '=' causes
a segmentation fault, so such a statement might have unfortunate
consequences for developers attempting to write POSIX-conformant code.

Is somebody able to verify this statement, or perhaps rephrase or delete
it as appropriate?

Thanks

--
Michael Wardle <address@hidden>





reply via email to

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