From ed6d305b671518f72cc3a59fb94148fd4e5b70ec Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 24 Feb 2008 15:31:00 +0100 Subject: [PATCH] Documentation about problem on MacOS X 10. --- ChangeLog | 4 ++++ doc/posix-functions/environ.texi | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index b5e537d722..926aea507b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-24 Bruno Haible + + * doc/posix-functions/environ.texi: Document the MacOS X problem. + 2008-02-20 Bob Proulx Enable use of older two part flavor 'git describe'. diff --git a/doc/posix-functions/environ.texi b/doc/posix-functions/environ.texi index d89187b1be..ba027d90ac 100644 --- a/doc/posix-functions/environ.texi +++ b/doc/posix-functions/environ.texi @@ -16,6 +16,18 @@ Portability problems not fixed by Gnulib: This variable is missing on some platforms: MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, IRIX 6.5, OSF/1 5.1, Cygwin. @item +On MacOS X 10, this variable is not declared. Up to MacOS X 10.4, one can use +@smallexample +extern char **environ; +@end smallexample +to get the variable declared. This does not work any more, however, in +shared libraries on MacOS X 10.5. Here is a workaround: Instead, one can use +@smallexample +#include +#define environ (*_NSGetEnviron()) +@end smallexample +This works at least on MacOS X 10.3 and newer. +@item The address of this variable is not a compile-time constant on some platforms: mingw. @end itemize -- 2.30.2