This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Tue, 2 May 2006 15:32:44 +0100
- Subject: RE: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API
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?)
Return values are ints, not unsigneds. That one is -1. Which means
'error'!
> Any ideas?
Check errno for more information?
> 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.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/