Treat Cygwin like Windows regarding pathname syntax.
authorBruno Haible <bruno@clisp.org>
Wed, 28 Apr 2004 11:26:25 +0000 (11:26 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 28 Apr 2004 11:26:25 +0000 (11:26 +0000)
lib/ChangeLog
lib/findprog.c
lib/localcharset.c
lib/pathname.h
lib/progreloc.c

index 3e770a8..69383b3 100644 (file)
@@ -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.
index 48c3edf..469acfd 100644 (file)
@@ -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;
index 0953d0a..66099d5 100644 (file)
@@ -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
 
index 7b817a4..75daa65 100644 (file)
@@ -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')) \
index 13ecb43..0f87c1c 100644 (file)
@@ -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')) \