* dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill out
p.envptr.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | |||||||
|  | 2011-03-27  Christopher Faylor  <me.cygwin2011@cgf.cx> | ||||||
|  |  | ||||||
|  | 	* dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill | ||||||
|  | 	out p.envptr. | ||||||
|  |  | ||||||
| 2011-03-25  Corinna Vinschen  <corinna@vinschen.de> | 2011-03-25  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed | 	* mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed | ||||||
|   | |||||||
| @@ -76,6 +76,9 @@ dll::init () | |||||||
|   int ret = 1; |   int ret = 1; | ||||||
|  |  | ||||||
|   /* This should be a no-op.  Why didn't we just import this variable? */ |   /* This should be a no-op.  Why didn't we just import this variable? */ | ||||||
|  |   if (!p.envptr) | ||||||
|  |     p.envptr = &__cygwin_environ; | ||||||
|  |   else | ||||||
|     *(p.envptr) = __cygwin_environ; |     *(p.envptr) = __cygwin_environ; | ||||||
|  |  | ||||||
|   /* Don't run constructors or the "main" if we've forked. */ |   /* Don't run constructors or the "main" if we've forked. */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user