Patch for path.cc & environ.cc

Chris Faylor cgf@cygnus.com
Mon Jun 12 18:56:00 GMT 2000


On Mon, Jun 12, 2000 at 06:54:16PM -0700, Carl Thompson wrote:
>> I _can't_ be the only user of cygwin running into the problem of
>> mixed directory separators in pathnames.  And in the position that
>> remedying the source of mixed slashes is way more difficult than
>> modifying cygwin.
>
>If I am understanding you, there must be lots of software that suffers from
>the same problem.  Think of all that Unix code that does something like
>this:
>
>   char datafile[MAXPATHLEN] = "";
>   const char* home = getenv("HOME");
>   if (home) strncpy(datafile, home, sizeof(datafile));
>   strncat(datafile, "/.GnomoVision/config", sizeof(datafile));
>   [ Do something with filename ]
>
>If I understand correctly, wouldn't this run afoul of the problem if
>the "HOME" environment variable were something like "C:\My Documents" ?  Or
>am I not getting it?

HOME is converted to POSIX format by Cygwin.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list