summaryrefslogtreecommitdiffstats
path: root/generic/tclEnv.c
diff options
context:
space:
mode:
authordas <das>2007-08-07 05:04:21 (GMT)
committerdas <das>2007-08-07 05:04:21 (GMT)
commitdb5f2ea3a4f1f2430b9349b6a32c4205c1aba0b3 (patch)
tree174e6ed92cecc0fc88f4748722b54cbff094ba9a /generic/tclEnv.c
parent6defebeafdc2b6272b3a90a42a80de6e53225cfc (diff)
downloadtcl-db5f2ea3a4f1f2430b9349b6a32c4205c1aba0b3.zip
tcl-db5f2ea3a4f1f2430b9349b6a32c4205c1aba0b3.tar.gz
tcl-db5f2ea3a4f1f2430b9349b6a32c4205c1aba0b3.tar.bz2
* generic/tclEnv.c: improve environ handling on Mac OS X (adapted
* unix/tclUnixPort.h: from Apple changes in Darwin tcl-64).
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r--generic/tclEnv.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index 30bce65..96bc9e0 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEnv.c,v 1.33 2007/04/23 17:34:06 kennykb Exp $
+ * RCS: @(#) $Id: tclEnv.c,v 1.34 2007/08/07 05:04:21 das Exp $
*/
#include "tclInt.h"
@@ -37,16 +37,6 @@ static int environSize = 0; /* Non-zero means that the environ array was
#endif
/*
- * For MacOS X
- */
-
-#if defined(__APPLE__) && defined(__DYNAMIC__)
-#include <crt_externs.h>
-__private_extern__ char **environ;
-char **environ = NULL;
-#endif
-
-/*
* Declarations for local functions defined in this file:
*/
@@ -91,14 +81,6 @@ TclSetupEnv(
int i;
/*
- * For MacOS X, need to get the real system environment.
- */
-
-#if defined(__APPLE__) && defined(__DYNAMIC__)
- environ = *_NSGetEnviron();
-#endif
-
- /*
* Synchronize the values in the environ array with the contents of the
* Tcl "env" variable. To do this:
* 1) Remove the trace that fires when the "env" var is unset.
@@ -210,18 +192,6 @@ TclSetEnv(
}
environ = ourEnviron = newEnviron;
environSize = length + 5;
-
-#if defined(__APPLE__) && defined(__DYNAMIC__)
- /*
- * Install the new environment array where the system routines can
- * see it.
- */
-
- {
- char ***e = _NSGetEnviron();
- *e = environ;
- }
-#endif /* __APPLE__ && __DYNAMIC__ */
}
index = length;
environ[index + 1] = NULL;