This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: [ANN] mingw32-egcs native dev toolchain
- To: Kees van Veen <cvn at interchain dot nl>, Gunther Ebert <gunther dot ebert at ixos-leipzig dot de>
- Subject: Re: [ANN] mingw32-egcs native dev toolchain
- From: "Larry Hall (RFK Partners Inc)" <lhall at rfk dot com>
- Date: Tue, 11 Nov 1997 11:51:18 -0500
- Cc: gnu-win32 at cygnus dot com
At 11:46 AM 11/11/97 +0100, Kees van Veen wrote:
>I'm not using mingw32, but b18 with Sergey's patches.
>
>I have another question though.
>
>A while ago I posted a message about getenv() not returning the values
>of
>my environment variables when called from a relocatable dll.
>
>I found out that if I call _getenv() instead of getenv() that problem
>does not
>occur. The same goes for execv(), execvp() and system(), to name a few.
>It seems only the underscore functions export the environment.
>
>Can anybody explain why this is?
>
>I now use '#define getenv _getenv' etc to get around this, but is there
>a way
>to force the compiler/linker to do this for me?
>
>Regards,
>Kees van Veen (cvn@interchain.nl)
I won't state this definitively but I suspect you are calling the Win32
function directly by using _getenv() as opposed to using the b18 wrapper.
I don't know why the cygwin32 implementation of this function doesn't work
right. MS commonly puts an underscore in front of these function names, I
believe to differentiate the MBCS versions of these function from the
UNICODE (underscore functions being MBCS). They then define the original
function name to the MBCS or UNICODE function appropriately.
I think what you're doing will work although you might miss the cygwin32
"flavoring" of the environment if what I think your getting with this holds
true.
Larry Hall lhall@rfk.com
RFK Partners, Inc. (781) 239-1053
8 Grove Street (781) 239-1655 - FAX
Wellesley, MA, 02181
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".