+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>.
-/* 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.
#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
#endif
#if defined _WIN32 || defined __WIN32__
-# undef WIN32 /* avoid warning on mingw32 */
-# define WIN32
+# define WIN32_NATIVE
#endif
#if defined __EMX__
# define OS2
#endif
-#if !defined WIN32
+#if !defined WIN32_NATIVE
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
# 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
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";
"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. */
const char *codeset;
const char *aliases;
-#if !(defined WIN32 || defined OS2)
+#if !(defined WIN32_NATIVE || defined OS2)
# if HAVE_LANGINFO_CODESET
# endif
-#elif defined WIN32
+#elif defined WIN32_NATIVE
static char buf[2 + 10 + 1];
/* 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:
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. */
# endif
-# if defined(WIN32) /* WIN32 */
+# if defined(WIN32_NATIVE) /* WIN32, not Cygwin */
{
LCID lcid;
LANGID langid;