summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordas <das@noemail.net>2007-08-07 05:04:47 (GMT)
committerdas <das@noemail.net>2007-08-07 05:04:47 (GMT)
commit3b072ce440bebb14cac3471082aeaabbdf545542 (patch)
tree3bbf2749497a8d2a6bce94be18b879e1fec2b0ca /unix
parentf4f96e325ce4da65e19936a76ff9815015114446 (diff)
downloadtcl-3b072ce440bebb14cac3471082aeaabbdf545542.zip
tcl-3b072ce440bebb14cac3471082aeaabbdf545542.tar.gz
tcl-3b072ce440bebb14cac3471082aeaabbdf545542.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: a9a78987d9dbff3cc3746645cb04e51462fd5049
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixPort.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index d98e8e4..203d319 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.27.2.18 2007/04/21 22:42:49 kennykb Exp $
+ * RCS: @(#) $Id: tclUnixPort.h,v 1.27.2.19 2007/08/07 05:04:48 das Exp $
*/
#ifndef _TCLUNIXPORT
@@ -491,10 +491,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.