autoconf-patches
[Top][All Lists]
Advanced

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

doc putenv portability


From: Kevin Ryde
Subject: doc putenv portability
Date: Sat, 11 Oct 2003 08:31:50 +1000
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

        * autoconf.texi (Function Portability): Add putenv and unsetenv.

`putenv'
     POSIX specifies that `putenv' puts the given string directly in
     `environ', but some systems make a copy of it instead (eg.  glibc
     2.0, or BSD).  And when a copy is made, `unsetenv' might not free
     it, causing a memory leak (eg. FreeBSD 4).

     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.

     On MINGW, a call `putenv("FOO=")' removes `FOO' from the
     environment, rather than inserting it with an empty value.

`unsetenv'
     On MINGW, `unsetenv' is not available, but a variable `FOO' can be
     removed with a call `putenv("FOO=")', as described under `putenv'
     above.

Attachment: autoconf.texi.putenv.diff
Description: Text document


reply via email to

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