This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

Kaveh Goudarzi wrote:

>         I downloaded the src for cygwin and compiled my code
> as below (cygwin is where I did the cvs pull).
> gcc -o envs-test.exe env-test.c -I  cygwin/src/winsup/cygwin/include/sys
>         I call cygwin_internal ( CW_SYNC_WINENV )  prior to
> the call to GetEnvironmentStrings ... the strange thing is the
> value that comes back ... looking at the code (cygwin/src/winsup/cygwin/
> I expected zero but I get another value (4294967295 ... uninitialized return?)

You need to be careful with the versions here.  You shouldn't try to use
current headers with an old DLL.  In this case CW_SYNC_WINENV was not a
feature in the released vesion 1.5.19, but was added to CVS after its
release.  If you just take a standard Cygwin install and try to compile
a program that calls cygwin_internal (CW_SYNC_WINENV) you should get a
compile error.  This is your signal that you need to use a snapshot --
both headers and DLL.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]