[Python-checkins] python/dist/src/Modules posixmodule.c,2.249,2.250

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Thu, 01 Aug 2002 14:57:51 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv2237/Modules

Modified Files:
	posixmodule.c 
Log Message:
- Get _environ through the NSEnviron call in a MacOSX framework. This allows
  us to completely decouple the framework from the executable, so we
  can use a two-level namespace.
- Do framework builds with a twolevel namespace.
- Reorganized the code that creates the minimal framework in the build
  directory, to make it more robust against incomplete frameworks (from
  earlier aborted builds, or builds of previous Python versions).


Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.249
retrieving revision 2.250
diff -C2 -d -r2.249 -r2.250
*** posixmodule.c	30 Jul 2002 12:27:43 -0000	2.249
--- posixmodule.c	1 Aug 2002 21:57:49 -0000	2.250
***************
*** 277,282 ****
  
  /* Return a dictionary corresponding to the POSIX environment table */
! 
! #if !defined(_MSC_VER) && ( !defined(__WATCOMC__) || defined(__QNX__) )
  extern char **environ;
  #endif /* !_MSC_VER */
--- 277,287 ----
  
  /* Return a dictionary corresponding to the POSIX environment table */
! #ifdef WITH_NEXT_FRAMEWORK
! /* On Darwin/MacOSX a shared library or framework has no access to
! ** environ directly, we must obtain it with _NSGetEnviron().
! */
! #include <crt_externs.h>
! static char **environ;
! #elif !defined(_MSC_VER) && ( !defined(__WATCOMC__) || defined(__QNX__) )
  extern char **environ;
  #endif /* !_MSC_VER */
***************
*** 290,293 ****
--- 295,302 ----
  	if (d == NULL)
  		return NULL;
+ #ifdef WITH_NEXT_FRAMEWORK
+ 	if (environ == NULL)
+ 		environ = *_NSGetEnviron();
+ #endif
  	if (environ == NULL)
  		return d;