mxe/plugins/native/cygwin/gettext-0.19.3-localename.p...

169 lines
6.3 KiB
Diff

--- origsrc/gettext-runtime/gnulib-lib/localename.c 2014-10-16 01:00:08.000000000 -0500
+++ src/gettext-runtime/gnulib-lib/localename.c 2014-11-17 23:22:47.747353600 -0600
@@ -60,7 +60,7 @@
# endif
#endif
-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+#if defined WINDOWS_NATIVE /* Native Windows */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <winnls.h>
@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
#endif
-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+#if defined WINDOWS_NATIVE /* Native Windows */
/* Canonicalize a Windows native locale name to a Unix locale name.
NAME is a sufficiently large buffer.
@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
Ignore invalid LANG value set by the Terminal application. */
if (strcmp (retval, "UTF-8") != 0)
#endif
-#if defined __CYGWIN__
- /* Cygwin.
- Ignore dummy LANG value set by ~/.profile. */
- if (strcmp (retval, "C.UTF-8") != 0)
-#endif
return retval;
}
@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
"C.UTF-8" locale, which operates in the same way as the "C" locale.
*/
-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_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. */
@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
# endif
-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+# if defined WINDOWS_NATIVE /* Native Windows */
{
LCID lcid;
--- origsrc/gettext-runtime/intl/localename.c 2014-09-30 21:35:20.000000000 -0500
+++ src/gettext-runtime/intl/localename.c 2014-11-17 23:22:47.755854700 -0600
@@ -60,7 +60,7 @@
# endif
#endif
-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+#if defined WINDOWS_NATIVE_ /* Native Windows */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <winnls.h>
@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
#endif
-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+#if defined WINDOWS_NATIVE /* Native Windows */
/* Canonicalize a Windows native locale name to a Unix locale name.
NAME is a sufficiently large buffer.
@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
However it does not specify the exact format. Neither do SUSV2 and
ISO C 99. So we can use this feature only on selected systems (e.g.
those using GNU C Library). */
-#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
+#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) || defined(__CYGWIN__)
# define HAVE_LOCALE_NULL
#endif
@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
Ignore invalid LANG value set by the Terminal application. */
if (strcmp (retval, "UTF-8") != 0)
#endif
-#if defined __CYGWIN__
- /* Cygwin.
- Ignore dummy LANG value set by ~/.profile. */
- if (strcmp (retval, "C.UTF-8") != 0)
-#endif
return retval;
}
@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
"C.UTF-8" locale, which operates in the same way as the "C" locale.
*/
-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_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. */
@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
# endif
-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+# if defined WINDOWS_NATIVE /* Native Windows */
{
LCID lcid;
--- origsrc/gettext-tools/gnulib-lib/localename.c 2014-10-16 01:00:35.000000000 -0500
+++ src/gettext-tools/gnulib-lib/localename.c 2014-11-17 23:22:47.763355600 -0600
@@ -60,7 +60,7 @@
# endif
#endif
-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+#if defined WINDOWS_NATIVE_ /* Native Windows */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <winnls.h>
@@ -1412,7 +1412,7 @@ gl_locale_name_canonicalize (char *name)
#endif
-#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+#if defined WINDOWS_NATIVE /* Native Windows */
/* Canonicalize a Windows native locale name to a Unix locale name.
NAME is a sufficiently large buffer.
@@ -2770,7 +2770,7 @@ gl_locale_name_thread (int category, con
However it does not specify the exact format. Neither do SUSV2 and
ISO C 99. So we can use this feature only on selected systems (e.g.
those using GNU C Library). */
-#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__)
+#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) || defined(__CYGWIN__)
# define HAVE_LOCALE_NULL
#endif
@@ -2825,11 +2825,6 @@ gl_locale_name_environ (int category, co
Ignore invalid LANG value set by the Terminal application. */
if (strcmp (retval, "UTF-8") != 0)
#endif
-#if defined __CYGWIN__
- /* Cygwin.
- Ignore dummy LANG value set by ~/.profile. */
- if (strcmp (retval, "C.UTF-8") != 0)
-#endif
return retval;
}
@@ -2867,7 +2862,7 @@ gl_locale_name_default (void)
"C.UTF-8" locale, which operates in the same way as the "C" locale.
*/
-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_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. */
@@ -2922,7 +2917,7 @@ gl_locale_name_default (void)
# endif
-# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
+# if defined WINDOWS_NATIVE /* Native Windows */
{
LCID lcid;