diff options
author | das <das@noemail.net> | 2007-08-07 05:04:21 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2007-08-07 05:04:21 (GMT) |
commit | 630a22961d924da0a50bd725359fdc17359c74a1 (patch) | |
tree | 174e6ed92cecc0fc88f4748722b54cbff094ba9a /unix/tclUnixPort.h | |
parent | dfb52f80a8e8247e4b3539022cbd21db1d7fe18b (diff) | |
download | tcl-630a22961d924da0a50bd725359fdc17359c74a1.zip tcl-630a22961d924da0a50bd725359fdc17359c74a1.tar.gz tcl-630a22961d924da0a50bd725359fdc17359c74a1.tar.bz2 |
* generic/tclEnv.c: improve environ handling on Mac OS X (adapted
* unix/tclUnixPort.h: from Apple changes in Darwin tcl-64).
FossilOrigin-Name: 3bd24ce9b54a570e6e83a78781b15c4f53dc1f63
Diffstat (limited to 'unix/tclUnixPort.h')
-rw-r--r-- | unix/tclUnixPort.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 99dc65b..cf0d810 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.56 2006/11/13 08:23:11 das Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.57 2007/08/07 05:04:21 das Exp $ */ #ifndef _TCLUNIXPORT @@ -484,10 +484,16 @@ extern int errno; * Variables provided by the C library: */ -#if defined(_sgi) || defined(__sgi) || (defined(__APPLE__) && defined(__DYNAMIC__)) -# define environ _environ -#endif +#if defined(__APPLE__) && defined(__DYNAMIC__) +# include <crt_externs.h> +# define environ (*_NSGetEnviron()) +# define USE_PUTENV 1 +#else +# if defined(_sgi) || defined(__sgi) +# define environ _environ +# endif extern char **environ; +#endif /* * At present (12/91) not all stdlib.h implementations declare strtod. |