From: Bruno Haible Date: Wed, 28 Apr 2004 11:13:59 +0000 (+0000) Subject: Improved Cygwin support. X-Git-Tag: v0.14.2~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cc6e361fa03f77e33c971e10f07f962e667f665;p=thirdparty%2Fgettext.git Improved Cygwin support. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index dc70e4847..48604df74 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,20 @@ +2004-04-28 Bruno Haible + + * basename.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Treat Cygwin like + Windows, since it now accepts Windows pathnames. + * 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. + * relocatable.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN): + Treat Cygwin like Windows, since it now accepts Windows pathnames. + (compute_curr_prefix): Likewise. + * 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-23 Bruno Haible * localcharset.c (get_charset_aliases): Allow the CHARSETALIASDIR diff --git a/gettext-tools/lib/basename.c b/gettext-tools/lib/basename.c index 5c5894122..d99334738 100644 --- a/gettext-tools/lib/basename.c +++ b/gettext-tools/lib/basename.c @@ -1,5 +1,5 @@ /* Return the name-within-directory of a file name. - Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1996-1999, 2000-2002, 2004 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. @@ -31,8 +31,8 @@ #include #include -#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 HAS_DEVICE(P) \ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ && (P)[1] == ':') diff --git a/gettext-tools/lib/findprog.c b/gettext-tools/lib/findprog.c index 48c3edf6c..469acfd2e 100644 --- a/gettext-tools/lib/findprog.c +++ b/gettext-tools/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/gettext-tools/lib/localcharset.c b/gettext-tools/lib/localcharset.c index 990420ba4..a3e52ef37 100644 --- a/gettext-tools/lib/localcharset.c +++ b/gettext-tools/lib/localcharset.c @@ -73,8 +73,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/gettext-tools/lib/pathname.h b/gettext-tools/lib/pathname.h index bac881798..1bce49bf7 100644 --- a/gettext-tools/lib/pathname.h +++ b/gettext-tools/lib/pathname.h @@ -1,5 +1,5 @@ /* Pathname support. - Copyright (C) 2001-2003 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 @@ -29,8 +29,8 @@ extern "C" { 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/gettext-tools/lib/progreloc.c b/gettext-tools/lib/progreloc.c index 355474980..21a2c810c 100644 --- a/gettext-tools/lib/progreloc.c +++ b/gettext-tools/lib/progreloc.c @@ -60,8 +60,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')) \ diff --git a/gettext-tools/lib/relocatable.c b/gettext-tools/lib/relocatable.c index bf7c70854..c14b53f97 100644 --- a/gettext-tools/lib/relocatable.c +++ b/gettext-tools/lib/relocatable.c @@ -1,5 +1,5 @@ /* Provide relocatable packages. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003-2004 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it @@ -72,8 +72,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')) \ @@ -234,8 +234,8 @@ compute_curr_prefix (const char *orig_installprefix, same = true; break; } -#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ - /* Win32, OS/2, DOS - case insignificant filesystem */ +#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ + /* Win32, Cygwin, OS/2, DOS - case insignificant filesystem */ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi) != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi)) break;