www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/12/22:19:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <394599A9.5A430C7C@carlthompson.net>
Date: Mon, 12 Jun 2000 19:17:13 -0700
From: Carl Thompson <cet AT carlthompson DOT net>
X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686)
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Patch for path.cc & environ.cc
References: <4 DOT 2 DOT 2 DOT 20000612181028 DOT 00b48990 AT mailhost> <39459448 DOT 1C0B87AD AT carlthompson DOT net> <20000612215609 DOT B8887 AT cygnus DOT com>

Chris Faylor wrote:

> ...

> >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.

OK, switch HOME to something like GNOMOVISION_DIR.  Lot's of software does
that.  Or does Cygwin convert all paths found in the environment?

> cgf

Carl Thompson

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019