changeset 5053:eebff8c51a9b

Treat Cygwin like Windows regarding pathname syntax.
author Bruno Haible <bruno@clisp.org>
date Wed, 28 Apr 2004 11:26:25 +0000
parents eb0bc80187ba
children 9d3da8ac8823
files lib/ChangeLog lib/findprog.c lib/localcharset.c lib/pathname.h lib/progreloc.c
diffstat 5 files changed, 22 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog	Tue Apr 27 22:11:37 2004 +0000
+++ b/lib/ChangeLog	Wed Apr 28 11:26:25 2004 +0000
@@ -1,3 +1,15 @@
+2004-04-28  Bruno Haible  <bruno@clisp.org>
+
+	* findprog.c (find_in_path): Treat Cygwin like Windows, since it also
+	implicitly appends .exe to executables.
+	* localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
+	accepts Windows pathnames.
+	* pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
+	Cygwin like Windows, since it now accepts Windows pathnames.
+	* progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): Treat
+	Cygwin like Windows, since it now accepts Windows pathnames.
+	Reported by Derek Robert Price <derek@ximbiot.com>.
+
 2004-04-20  Jim Meyering  <jim@meyering.net>
 
 	* getndelim2.c (getndelim2): Upon realloc failure, don't leak memory.
--- a/lib/findprog.c	Tue Apr 27 22:11:37 2004 +0000
+++ b/lib/findprog.c	Wed Apr 28 11:26:25 2004 +0000
@@ -1,5 +1,5 @@
 /* Locating a program in PATH.
-   Copyright (C) 2001-2003 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -39,8 +39,8 @@
 const char *
 find_in_path (const char *progname)
 {
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-  /* Win32, OS/2, DOS */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
   /* The searching rules with .COM, .EXE, .BAT, .CMD etc. suffixes are
      too complicated.  Leave it to the OS.  */
   return progname;
--- a/lib/localcharset.c	Tue Apr 27 22:11:37 2004 +0000
+++ b/lib/localcharset.c	Wed Apr 28 11:26:25 2004 +0000
@@ -72,8 +72,8 @@
 # define relocate(pathname) (pathname)
 #endif
 
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-  /* Win32, OS/2, DOS */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
 #endif
 
--- a/lib/pathname.h	Tue Apr 27 22:11:37 2004 +0000
+++ b/lib/pathname.h	Wed Apr 28 11:26:25 2004 +0000
@@ -1,5 +1,5 @@
 /* Pathname support.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,8 +24,8 @@
                         it may be concatenated to a directory pathname.
    IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
  */
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-  /* Win32, OS/2, DOS */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
 # define HAS_DEVICE(P) \
     ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
--- a/lib/progreloc.c	Tue Apr 27 22:11:37 2004 +0000
+++ b/lib/progreloc.c	Wed Apr 28 11:26:25 2004 +0000
@@ -59,8 +59,8 @@
    ISSLASH(C)           tests whether C is a directory separator character.
    IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
  */
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
-  /* Win32, OS/2, DOS */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+  /* Win32, Cygwin, OS/2, DOS */
 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
 # define HAS_DEVICE(P) \
     ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \