From: Bruno Haible Date: Wed, 28 Apr 2004 11:26:25 +0000 (+0000) Subject: Treat Cygwin like Windows regarding pathname syntax. X-Git-Tag: cvs-readonly~4133 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=dc76e6e4a571b134102aa89a6b500478fb49a73a;p=gnulib.git Treat Cygwin like Windows regarding pathname syntax. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 3e770a89b..69383b318 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,15 @@ +2004-04-28 Bruno Haible + + * 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 . + 2004-04-20 Jim Meyering * getndelim2.c (getndelim2): Upon realloc failure, don't leak memory. diff --git a/lib/findprog.c b/lib/findprog.c index 48c3edf6c..469acfd2e 100644 --- a/lib/findprog.c +++ b/lib/findprog.c @@ -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 , 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; diff --git a/lib/localcharset.c b/lib/localcharset.c index 0953d0aa6..66099d5e3 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -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 diff --git a/lib/pathname.h b/lib/pathname.h index 7b817a4f7..75daa6594 100644 --- a/lib/pathname.h +++ b/lib/pathname.h @@ -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')) \ diff --git a/lib/progreloc.c b/lib/progreloc.c index 13ecb436e..0f87c1c92 100644 --- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -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')) \