diff options
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 7 | ||||
-rw-r--r-- | gettext-runtime/intl/loadinfo.h | 4 | ||||
-rw-r--r-- | gettext-runtime/intl/localcharset.c | 15 | ||||
-rw-r--r-- | gettext-runtime/intl/localename.c | 11 |
4 files changed, 21 insertions, 16 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index b0e4930..72c4d3d 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,10 @@ +2006-05-17 Bruno Haible <bruno@clisp.org> + + Cygwin portability. + * loadinfo.h (PATH_SEPARATOR) [CYGWIN]: Define as ':'. + * localename.c (WIN32_NATIVE): Renamed from WIN32. + * localcharset.c (WIN32_NATIVE): Renamed from WIN32. + 2006-05-16 Bruno Haible <bruno@clisp.org> * localcharset.c [CYGWIN]: Include <windows.h>. diff --git a/gettext-runtime/intl/loadinfo.h b/gettext-runtime/intl/loadinfo.h index 41ef6a9..a7a1970 100644 --- a/gettext-runtime/intl/loadinfo.h +++ b/gettext-runtime/intl/loadinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2000-2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999, 2000-2003, 2005-2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -47,7 +47,7 @@ #endif /* Separator in PATH like lists of pathnames. */ -#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ +#if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __EMX__ || defined __DJGPP__ /* Win32, OS/2, DOS */ # define PATH_SEPARATOR ';' #else diff --git a/gettext-runtime/intl/localcharset.c b/gettext-runtime/intl/localcharset.c index e4e81ca..e8505bf 100644 --- a/gettext-runtime/intl/localcharset.c +++ b/gettext-runtime/intl/localcharset.c @@ -41,8 +41,7 @@ #endif #if defined _WIN32 || defined __WIN32__ -# undef WIN32 /* avoid warning on mingw32 */ -# define WIN32 +# define WIN32_NATIVE #endif #if defined __EMX__ @@ -50,7 +49,7 @@ # define OS2 #endif -#if !defined WIN32 +#if !defined WIN32_NATIVE # if HAVE_LANGINFO_CODESET # include <langinfo.h> # else @@ -62,7 +61,7 @@ # define WIN32_LEAN_AND_MEAN # include <windows.h> # endif -#elif defined WIN32 +#elif defined WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include <windows.h> #endif @@ -118,7 +117,7 @@ get_charset_aliases (void) cp = charset_aliases; if (cp == NULL) { -#if !(defined VMS || defined WIN32 || defined __CYGWIN__) +#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) FILE *fp; const char *dir; const char *base = "charset.alias"; @@ -244,7 +243,7 @@ get_charset_aliases (void) "DECKOREAN" "\0" "EUC-KR" "\0"; # endif -# if defined WIN32 || defined __CYGWIN__ +# if defined WIN32_NATIVE || defined __CYGWIN__ /* To avoid the troubles of installing a separate file in the same directory as the DLL and of retrieving the DLL's directory at runtime, simply inline the aliases here. */ @@ -296,7 +295,7 @@ locale_charset (void) const char *codeset; const char *aliases; -#if !(defined WIN32 || defined OS2) +#if !(defined WIN32_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET @@ -380,7 +379,7 @@ locale_charset (void) # endif -#elif defined WIN32 +#elif defined WIN32_NATIVE static char buf[2 + 10 + 1]; diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c index 7d661e4..1b8b99a 100644 --- a/gettext-runtime/intl/localename.c +++ b/gettext-runtime/intl/localename.c @@ -1,5 +1,5 @@ /* Determine the current selected locale. - Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -38,11 +38,10 @@ #endif #if defined _WIN32 || defined __WIN32__ -# undef WIN32 /* avoid warning on mingw32 */ -# define WIN32 +# define WIN32_NATIVE #endif -#ifdef WIN32 +#ifdef WIN32_NATIVE # define WIN32_LEAN_AND_MEAN # include <windows.h> /* List of language codes, sorted by value: @@ -1023,7 +1022,7 @@ _nl_locale_name_default (void) locale, customizing it for each location. POSIX:2001 does not require such a facility. */ -#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32)) +#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32_NATIVE)) /* The system does not have a way of setting the locale, other than the POSIX specified environment variables. We use C as default locale. */ @@ -1077,7 +1076,7 @@ _nl_locale_name_default (void) # endif -# if defined(WIN32) /* WIN32 */ +# if defined(WIN32_NATIVE) /* WIN32, not Cygwin */ { LCID lcid; LANGID langid; |