summaryrefslogtreecommitdiffstats
path: root/plugins/native/cygwin/gettext-0.19.3-localename.patch
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/native/cygwin/gettext-0.19.3-localename.patch')
-rw-r--r--plugins/native/cygwin/gettext-0.19.3-localename.patch168
1 files changed, 168 insertions, 0 deletions
diff --git a/plugins/native/cygwin/gettext-0.19.3-localename.patch b/plugins/native/cygwin/gettext-0.19.3-localename.patch
new file mode 100644
index 0000000..e0f00aa
--- /dev/null
+++ b/plugins/native/cygwin/gettext-0.19.3-localename.patch
@@ -0,0 +1,168 @@
+--- 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;
+