]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Cygwin defines WIN32 itself in <windows.h> !
authorBruno Haible <bruno@clisp.org>
Wed, 17 May 2006 10:36:36 +0000 (10:36 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:21 +0000 (12:13 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/loadinfo.h
gettext-runtime/intl/localcharset.c
gettext-runtime/intl/localename.c

index b0e4930fe59e170d42af30608d93b0c8f95aab88..72c4d3d5c6ece4ee9e2345656be9f59d9363c530 100644 (file)
@@ -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>.
index 41ef6a92a6de50c92ddb85cc4e9ff4cfded533fb..a7a19703103efe2f331f61f65a0b684339f10032 100644 (file)
@@ -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
index e4e81ca3c040fc5bc15d74cc334bd2f3ad4b45e1..e8505bfa908a8e43e5d77f0900356ce94dfe5f04 100644 (file)
@@ -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];
 
index 7d661e490c0b45da0ee0fdd42f4c601a267984b5..1b8b99a1af1c4471f87d24b28425cbd156368fd9 100644 (file)
@@ -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
 #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;