Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Message-ID: <3945A2EF.5C5466E1@carlthompson.net>
Date: Mon, 12 Jun 2000 19:56:47 -0700
From: Carl Thompson <cet@carlthompson.net>
X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686)
MIME-Version: 1.0
To: David Bolen <db3l@fitlinxx.com>
Cc: Cygwin List <cygwin@sourceware.cygnus.com>
Subject: Re: Patch for path.cc & environ.cc
References: <1DB8BA4BAC88D3118B2300508B5A552CD925C9@mail.fitlinxx.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Thank you, your explanation cleared things up for me considerably.  I see
now that the number of cases that will have problems with this is much
smaller than I thought.

Carl Thompson

David Bolen wrote:
> 
> Carl Thompson [cet@carlthompson.net] writes:
> 
> > OK, switch HOME to something like GNOMOVISION_DIR.  Lot's of software does
> > that.  Or does Cygwin convert all paths found in the environment?
> 
> I'm not sure there would be a need, nor that even HOME would be a problem in
> the original example.
> 
> Let's say that GNOMOVISION_DIR was set to "C:\Program Files\Gnomovision",
> and then the code took that setting and added "/somedirectory/somefile" to
> it.  Now, there's no problem using mixed separators - that'll work fine.
> But because it has a \ in it, Cygwin will assume it's a window path and not
> use the mount settings.  But that's what you want in this case -
> GNOMOVISION_DIR _is_ a Windows path.  Conversely if it just had "/" then you
> can configure and treat it as a Cygwin path.
> 
> The same would even hold true for HOME - although with HOME, given that it's
> something that Unix utilities may depend on, is translated into a
> Cygwin/POSIX path, so that a typical Unix application wouldn't have to deal
> with any Window-isms in the setting (e.g., not expect to find backslashes
> there).
> 
> I think the only time the behavior may create issues is if you have a path
> using \, but which really wants to reference the Cygwin mount locations.
> But it seems somewhat strange that someone thinking of a Unix filesystem and
> Cygwin mounts would ever choose to use \.  That's not the same as saying an
> NT user with Cygwin apps never uses a path with a \ in it, only that when
> doing so, it's more likely the path really is a Windows path.
> 
> About the only real risk I can see is a Cygwin application using /
> consistently, but then getting user input (or configured input perhaps) for
> a suffix on a path that uses \, since that would change the specification.
> This is different than a full path (or prefix) since in that case treating
> the root of the path per-Windows would be fine.  But I'm not sure how Cygwin
> could reliably handle that case, and since the application in question would
> be Unix oriented (else why build with Cygwin) it should be expecting / from
> the user/config I expect.
> 
> -- David
> 
> /-----------------------------------------------------------------------\
>  \               David Bolen            \   E-mail: db3l@fitlinxx.com  /
>   |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
>  /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
> \-----------------------------------------------------------------------/
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

