2 @section @code{environ}
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/environ.html}
9 Portability problems fixed by Gnulib:
12 POSIX does not require this variable to be declared, and it is indeed not
13 declared on some platforms:
14 MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, IRIX 6.5, Solaris 11 2010-11.
16 On MacOS X 10, this variable is not declared. Up to MacOS X 10.4, one can use
18 extern char **environ;
20 to get the variable declared. This does not work any more, however, in
21 shared libraries on MacOS X 10.5. Here is a workaround: Instead, one can use
23 #include <crt_externs.h>
24 #define environ (*_NSGetEnviron())
26 This works at all versions of MacOS X.
29 Portability problems not fixed by Gnulib:
32 The address of this variable is not a compile-time constant on some platforms: