summaryrefslogtreecommitdiffstats
path: root/gettext-0.19.3-localename.patch
blob: 0630292340f49469d87fcd33416daf815c568291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
--- origsrc/gettext-0.19.3/gettext-runtime/gnulib-lib/localename.c	2014-10-16 01:00:08.000000000 -0500
+++ src/gettext-0.19.3/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-0.19.3/gettext-runtime/intl/localename.c	2014-09-30 21:35:20.000000000 -0500
+++ src/gettext-0.19.3/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-0.19.3/gettext-tools/gnulib-lib/localename.c	2014-10-16 01:00:35.000000000 -0500
+++ src/gettext-0.19.3/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;