delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/08/23:39:03

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
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Thu, 8 Jun 2000 23:38:21 -0400
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Patch for path.cc
Message-ID: <20000608233821.B19277@cygnus.com>
Reply-To: cygwin AT sourceware DOT cygnus DOT com
Mail-Followup-To: cygwin AT sourceware DOT cygnus DOT com
References: <4 DOT 2 DOT 2 DOT 20000608203034 DOT 00b4fd20 AT mailhost>
Mime-Version: 1.0
User-Agent: Mutt/1.2i
In-Reply-To: <4.2.2.20000608203034.00b4fd20@mailhost>; from munch@powertv.com on Thu, Jun 08, 2000 at 08:30:48PM -0700

Since we've recently made the change to cygwin to consider the
existence of a '\' as a Windows path, we are not going to be
applying this patch.  Sorry.

cgf

On Thu, Jun 08, 2000 at 08:30:48PM -0700, John Paulson wrote:
>Problem:
>
>   At work we develop using cygwin.  Some source is inhouse,
>   other comes from outside.  Most source has "/" as the path
>   delimiter.  However, some outside source has "\" in various
>   places (such as #include).  Cygwin prior to 1.1 (b20 and 99r1)
>   handled this properly.  Cygwin 1.1 and later don't; the "\"
>   forces interpretation as an MS-DOS path and the "/" aren't
>   properly translated.  We don't want to edit files to convert
>   "\" to "/"; that is not acceptable.
>
>
>Solution:
>
>   This change will treat a path as an MS-DOS path if one of two
>   conditions are true:
>
>     The path has a ":" character in it, or
>     The path has a "\" character and no "/" character.
>
>   The previous test was if either ":" or "\" was present.
>
>
>ChangeLog entry
>
>2000-06-08  munch paulson  <munch AT powertv DOT com>
>
>	* path.cc (mount_info::conv_to_win32_path): if both '\' and '/' in
>	path then treat as posix path, not win.
>
>
>
>Patch
>
>*** path.cc.orig	Thu Jun  8 19:32:08 2000
>--- path.cc	Thu Jun  8 19:40:04 2000
>***************
>*** 942,950 ****
>     if (dst == NULL)
>       goto out;		/* Sanity check. */
>
>!   /* An MS-DOS spec has either a : or a \.  If this is found, short
>        circuit most of the rest of this function. */
>!   if (strpbrk (src_path, ":\\") != NULL)
>       {
>         debug_printf ("%s already win32", src_path);
>         rc = normalize_win32_path (current_directory_name, src_path, dst);
>--- 942,951 ----
>     if (dst == NULL)
>       goto out;		/* Sanity check. */
>
>!   /* An MS-DOS spec has either a : or a \ and no /.  If this is found, short
>        circuit most of the rest of this function. */
>!   if (strchr (src_path, ':') != NULL
>!       || (strchr (src_path, '\\') != NULL && strchr (src_path, '/') == NULL))
>       {
>         debug_printf ("%s already win32", src_path);
>         rc = normalize_win32_path (current_directory_name, src_path, dst);
>
>----------------------------
>John Paulson
>PowerTV, Inc.
>Tel: 408/777-4769
>Fax: 408/777-0176
>mailto:paulson AT powertv DOT com
>http://www.powertv.com/

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