This is the mail archive of the
mailing list for the Cygwin project.
Re: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API
On Tue, May 02, 2006 at 03:32:44PM +0100, Dave Korn wrote:
>On 02 May 2006 15:18, Kaveh Goudarzi wrote:
>>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/external.cc) I
>>expected zero but I get another value (4294967295 ... uninitialized
>Return values are ints, not unsigneds. That one is -1. Which means
>Check errno for more information?
That's usually a good idea but I just noticed that cygwin-internal doesn't
set errno. There is no reason why it would have to, really, since the
interface is entirely local to cygwin and we can decide to do what we
want. However, I have changed it now so that it returns ENOSYS when it
is returning -1.
That won't help this particular case especially since I suspect that the
problem is that the OP is not using a snapshot.
>>Also I noticed that the address of environ seems always to be at
>>0x460090 ... is it safe to assume this to always be the case?
>No, absolutely not.
What he said. It's hard to believe that question would even be
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html