This is the mail archive of the
mailing list for the Cygwin project.
Re: Strange things...
- To: Keetnet at wilmington dot net (Keet / Foxbird)
- Subject: Re: Strange things...
- From: Geoffrey Noer <noer at cygnus dot com>
- Date: Mon, 16 Mar 1998 15:33:59 -0800 (PST)
- Cc: gnu-win32 at cygnus dot com
Keet / Foxbird wrote:
> Well, in response to my previous message, and with no help from very very
> few, I debuged my program the old fashioned way. Putting 'fprintf(stderr,
> "Line 1")' every so often in the code so I could see where the problem
> arose and I found the culprit. The program reads a value from the
> environment and then copies it into a string. 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?
Running man setenv on a Solaris box:
> RETURN VALUES
> If successful, getenv() returns a pointer to the value in
> the current environment; otherwise, it returns a null
Cygwin32 getenv does this so it looks right to me.
For help on using this list (especially unsubscribing), send a message to
"firstname.lastname@example.org" with one line of text: "help".