Mail Archives: cygwin/1998/03/17/14:29:32
> But I suspect that GETENV
>returns a null, and when it's passed to strncpy it decides to go belly up.
>I'm not sure if GETENV is supposed to return an empty string or a null? Any
>help on this one?
Sure, it's perfectly normal for getenv() to return NULL. If the requested
variable does not exist in the environment, it will return NULL. (If it
exists and is set to an empty string, then getenv() will return an empty
string.)
From the man page:
RETURN VALUES
If successful, getenv() returns a pointer to the value in
the current environment; otherwise, it returns a null
pointer.
marcus hall
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -