From dc76e6e4a571b134102aa89a6b500478fb49a73a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 28 Apr 2004 11:26:25 +0000 Subject: [PATCH] Treat Cygwin like Windows regarding pathname syntax. --- lib/ChangeLog | 12 ++++++++++++ lib/findprog.c | 6 +++--- lib/localcharset.c | 4 ++-- lib/pathname.h | 6 +++--- lib/progreloc.c | 4 ++-- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 3e770a89b5..69383b3181 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 48c3edf6c5..469acfd2e4 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 0953d0aa65..66099d5e31 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 7b817a4f72..75daa65940 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 13ecb436e4..0f87c1c92c 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')) \ -- 2.30.2