Mercurial > mxe-octave
comparison src/msvc-gettext-1.patch @ 3285:67bcfe6539c7
[MSVC] update gettext compilation.
* src/gettext.mk: Compile full gettext package.
* src/msvc-gettext-1.patch: Update patch and extend to full gettext
sources.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Tue, 05 Nov 2013 09:05:23 -0500 |
parents | f8299bb6c872 |
children |
comparison
equal
deleted
inserted
replaced
3284:5f4998342dca | 3285:67bcfe6539c7 |
---|---|
1 diff -ur gettext-0.18.2-orig/gettext-runtime/intl/export.h gettext-0.18.2/gettext-runtime/intl/export.h | 1 diff -ur gettext-0.18.3.1-orig/gettext-runtime/gnulib-lib/unistd.in.h gettext-0.18.3.1/gettext-runtime/gnulib-lib/unistd.in.h |
2 --- gettext-0.18.2-orig/gettext-runtime/intl/export.h 2012-12-04 01:28:58 -0500 | 2 --- gettext-0.18.3.1-orig/gettext-runtime/gnulib-lib/unistd.in.h 2013-08-15 12:24:01 -0400 |
3 +++ gettext-0.18.2/gettext-runtime/intl/export.h 2013-06-15 22:18:02 -0400 | 3 +++ gettext-0.18.3.1/gettext-runtime/gnulib-lib/unistd.in.h 2013-11-04 17:59:39 -0500 |
4 @@ -115,7 +115,7 @@ | |
5 the getopt module only in gettext-tools/gnulib-lib/, not in | |
6 gettext-tools/libgettextpo/, but there is only a single | |
7 GNULIB_UNISTD_H_GETOPT variable for both. */ | |
8 -#if @GNULIB_UNISTD_H_GETOPT@ && !defined GTPO_CONFIG_H && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT | |
9 +#if @GNULIB_UNISTD_H_GETOPT@ && !defined GTPO_CONFIG_H && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT && !defined _MSC_VER | |
10 # define __need_getopt | |
11 # include <getopt.h> | |
12 #endif | |
13 diff -ur gettext-0.18.3.1-orig/gettext-runtime/intl/export.h gettext-0.18.3.1/gettext-runtime/intl/export.h | |
14 --- gettext-0.18.3.1-orig/gettext-runtime/intl/export.h 2012-12-09 20:59:06 -0500 | |
15 +++ gettext-0.18.3.1/gettext-runtime/intl/export.h 2013-11-04 17:58:54 -0500 | |
4 @@ -2,5 +2,13 @@ | 16 @@ -2,5 +2,13 @@ |
5 #if @HAVE_VISIBILITY@ && BUILDING_LIBINTL | 17 #if @HAVE_VISIBILITY@ && BUILDING_LIBINTL |
6 #define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) | 18 #define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) |
7 #else | 19 #else |
8 +#ifdef _MSC_VER | 20 +#ifdef _MSC_VER |
13 +#endif | 25 +#endif |
14 +#else | 26 +#else |
15 #define LIBINTL_DLL_EXPORTED | 27 #define LIBINTL_DLL_EXPORTED |
16 #endif | 28 #endif |
17 +#endif | 29 +#endif |
30 diff -ur gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/ostream.h gettext-0.18.3.1/gettext-tools/gnulib-lib/ostream.h | |
31 --- gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/ostream.h 2013-08-15 12:32:44 -0400 | |
32 +++ gettext-0.18.3.1/gettext-tools/gnulib-lib/ostream.h 2013-11-04 19:05:15 -0500 | |
33 @@ -108,6 +108,13 @@ | |
34 | |
35 #endif | |
36 | |
37 +#ifdef __cplusplus | |
38 +extern "C" { | |
39 +#endif | |
40 +extern const typeinfo_t ostream_typeinfo; | |
41 +#ifdef __cplusplus | |
42 +}; | |
43 +#endif | |
44 extern const typeinfo_t ostream_typeinfo; | |
45 #define ostream_SUPERCLASSES &ostream_typeinfo, NULL | |
46 #define ostream_SUPERCLASSES_LENGTH (1 + 1) | |
47 diff -ur gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/stdbool.in.h gettext-0.18.3.1/gettext-tools/gnulib-lib/stdbool.in.h | |
48 --- gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/stdbool.in.h 2013-08-15 12:25:00 -0400 | |
49 +++ gettext-0.18.3.1/gettext-tools/gnulib-lib/stdbool.in.h 2013-11-04 19:30:41 -0500 | |
50 @@ -67,7 +67,9 @@ | |
51 #endif | |
52 | |
53 #ifdef __cplusplus | |
54 -# define _Bool bool | |
55 +# ifndef _MSC_VER | |
56 +# define _Bool bool | |
57 +# endif | |
58 # define bool bool | |
59 #else | |
60 # if defined __BEOS__ && !defined __HAIKU__ | |
61 diff -ur gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/styled-ostream.h gettext-0.18.3.1/gettext-tools/gnulib-lib/styled-ostream.h | |
62 --- gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/styled-ostream.h 2013-08-15 12:32:45 -0400 | |
63 +++ gettext-0.18.3.1/gettext-tools/gnulib-lib/styled-ostream.h 2013-11-04 19:15:11 -0500 | |
64 @@ -132,6 +132,13 @@ | |
65 | |
66 #endif | |
67 | |
68 +#ifdef __cplusplus | |
69 +extern "C" { | |
70 +#endif | |
71 +extern DLL_VARIABLE const typeinfo_t styled_ostream_typeinfo; | |
72 +#ifdef __cplusplus | |
73 +}; | |
74 +#endif | |
75 extern DLL_VARIABLE const typeinfo_t styled_ostream_typeinfo; | |
76 #define styled_ostream_SUPERCLASSES &styled_ostream_typeinfo, ostream_SUPERCLASSES | |
77 #define styled_ostream_SUPERCLASSES_LENGTH (1 + ostream_SUPERCLASSES_LENGTH) | |
78 diff -ur gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/unistd.in.h gettext-0.18.3.1/gettext-tools/gnulib-lib/unistd.in.h | |
79 --- gettext-0.18.3.1-orig/gettext-tools/gnulib-lib/unistd.in.h 2013-08-15 12:25:01 -0400 | |
80 +++ gettext-0.18.3.1/gettext-tools/gnulib-lib/unistd.in.h 2013-11-04 18:00:01 -0500 | |
81 @@ -115,7 +115,7 @@ | |
82 the getopt module only in gettext-tools/gnulib-lib/, not in | |
83 gettext-tools/libgettextpo/, but there is only a single | |
84 GNULIB_UNISTD_H_GETOPT variable for both. */ | |
85 -#if @GNULIB_UNISTD_H_GETOPT@ && !defined GTPO_CONFIG_H && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT | |
86 +#if @GNULIB_UNISTD_H_GETOPT@ && !defined GTPO_CONFIG_H && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT && !defined _MSC_VER | |
87 # define __need_getopt | |
88 # include <getopt.h> | |
89 #endif | |
90 diff -ur gettext-0.18.3.1-orig/gettext-tools/libgettextpo/Makefile.in gettext-0.18.3.1/gettext-tools/libgettextpo/Makefile.in | |
91 --- gettext-0.18.3.1-orig/gettext-tools/libgettextpo/Makefile.in 2013-08-15 12:31:14 -0400 | |
92 +++ gettext-0.18.3.1/gettext-tools/libgettextpo/Makefile.in 2013-11-04 20:09:54 -0500 | |
93 @@ -2446,7 +2446,7 @@ | |
94 sf=`echo "$$f" | sed -e 's,\\.[^.]*$$,,'`.c; \ | |
95 test -f $$sf || sf=$(srcdir)/$$sf; \ | |
96 of=`echo "$$f" | sed -e 's,^.*/,,' -e 's,\\.[^.]*$$,,'`.$(OBJEXT); \ | |
97 - $(COMPILE) -c $$sf || { rm -f config.h; exit 1; }; \ | |
98 + $(COMPILE) -c $$sf 2>&1 1>/dev/null || { rm -f config.h; exit 1; }; \ | |
99 sh ./exported.sh $$of 1>&5; \ | |
100 rm -f $$of `echo "$$of" | sed -e 's,\\.$(OBJEXT)$$,.lo,'`; \ | |
101 ;; \ | |
102 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/hostname.c gettext-0.18.3.1/gettext-tools/src/hostname.c | |
103 --- gettext-0.18.3.1-orig/gettext-tools/src/hostname.c 2012-12-09 20:59:06 -0500 | |
104 +++ gettext-0.18.3.1/gettext-tools/src/hostname.c 2013-11-04 19:57:29 -0500 | |
105 @@ -46,7 +46,9 @@ | |
106 #endif | |
107 | |
108 /* Get MAXHOSTNAMELEN. */ | |
109 +#ifdef HAVE_SYS_PARAM_H | |
110 #include <sys/param.h> | |
111 +#endif | |
112 #ifndef MAXHOSTNAMELEN | |
113 # define MAXHOSTNAMELEN 64 | |
114 #endif | |
115 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/lang-table.h gettext-0.18.3.1/gettext-tools/src/lang-table.h | |
116 --- gettext-0.18.3.1-orig/gettext-tools/src/lang-table.h 2012-12-09 20:59:06 -0500 | |
117 +++ gettext-0.18.3.1/gettext-tools/src/lang-table.h 2013-11-04 19:51:49 -0500 | |
118 @@ -26,10 +26,16 @@ | |
119 const char *english; | |
120 }; | |
121 | |
122 +#ifdef __cplusplus | |
123 +extern "C" { | |
124 +#endif | |
125 extern struct language_table_entry language_table[]; | |
126 extern const size_t language_table_size; | |
127 | |
128 extern struct language_table_entry language_variant_table[]; | |
129 extern const size_t language_variant_table_size; | |
130 +#ifdef __cplusplus | |
131 +}; | |
132 +#endif | |
133 | |
134 #endif /* _LANG_TABLE_H */ | |
135 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/read-po.h gettext-0.18.3.1/gettext-tools/src/read-po.h | |
136 --- gettext-0.18.3.1-orig/gettext-tools/src/read-po.h 2012-12-09 20:59:06 -0500 | |
137 +++ gettext-0.18.3.1/gettext-tools/src/read-po.h 2013-11-04 19:36:01 -0500 | |
138 @@ -21,6 +21,12 @@ | |
139 #include "read-catalog-abstract.h" | |
140 | |
141 /* Describes a .po / .pot file parser. */ | |
142 +#ifdef __cplusplus | |
143 +extern "C" { | |
144 +#endif | |
145 extern DLL_VARIABLE const struct catalog_input_format input_format_po; | |
146 +#ifdef __cplusplus | |
147 +}; | |
148 +#endif | |
149 | |
150 #endif /* _READ_PO_H */ | |
151 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/read-properties.h gettext-0.18.3.1/gettext-tools/src/read-properties.h | |
152 --- gettext-0.18.3.1-orig/gettext-tools/src/read-properties.h 2012-12-09 20:59:06 -0500 | |
153 +++ gettext-0.18.3.1/gettext-tools/src/read-properties.h 2013-11-04 19:36:33 -0500 | |
154 @@ -21,6 +21,12 @@ | |
155 #include "read-catalog-abstract.h" | |
156 | |
157 /* Describes a .properties file parser. */ | |
158 +#ifdef __cplusplus | |
159 +extern "C" { | |
160 +#endif | |
161 extern DLL_VARIABLE const struct catalog_input_format input_format_properties; | |
162 +#ifdef __cplusplus | |
163 +}; | |
164 +#endif | |
165 | |
166 #endif /* _READ_PROPERTIES_H */ | |
167 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/read-stringtable.h gettext-0.18.3.1/gettext-tools/src/read-stringtable.h | |
168 --- gettext-0.18.3.1-orig/gettext-tools/src/read-stringtable.h 2012-12-09 20:59:06 -0500 | |
169 +++ gettext-0.18.3.1/gettext-tools/src/read-stringtable.h 2013-11-04 19:41:03 -0500 | |
170 @@ -21,6 +21,12 @@ | |
171 #include "read-catalog-abstract.h" | |
172 | |
173 /* Describes a .strings file parser. */ | |
174 +#ifdef __cplusplus | |
175 +extern "C" { | |
176 +#endif | |
177 extern DLL_VARIABLE const struct catalog_input_format input_format_stringtable; | |
178 +#ifdef __cplusplus | |
179 +}; | |
180 +#endif | |
181 | |
182 #endif /* _READ_STRINGTABLE_H */ | |
183 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/write-po.h gettext-0.18.3.1/gettext-tools/src/write-po.h | |
184 --- gettext-0.18.3.1-orig/gettext-tools/src/write-po.h 2012-12-09 20:59:06 -0500 | |
185 +++ gettext-0.18.3.1/gettext-tools/src/write-po.h 2013-11-04 19:45:28 -0500 | |
186 @@ -63,7 +63,13 @@ | |
187 message_print_style_escape (bool flag); | |
188 | |
189 /* Describes a PO file in .po syntax. */ | |
190 +#ifdef __cplusplus | |
191 +extern "C" { | |
192 +#endif | |
193 extern DLL_VARIABLE const struct catalog_output_format output_format_po; | |
194 +#ifdef __cplusplus | |
195 +}; | |
196 +#endif | |
197 | |
198 | |
199 #ifdef __cplusplus | |
200 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/write-properties.h gettext-0.18.3.1/gettext-tools/src/write-properties.h | |
201 --- gettext-0.18.3.1-orig/gettext-tools/src/write-properties.h 2012-12-09 20:59:06 -0500 | |
202 +++ gettext-0.18.3.1/gettext-tools/src/write-properties.h 2013-11-04 19:45:58 -0500 | |
203 @@ -21,6 +21,12 @@ | |
204 #include "write-catalog.h" | |
205 | |
206 /* Describes a PO file in Java .properties syntax. */ | |
207 +#ifdef __cplusplus | |
208 +extern "C" { | |
209 +#endif | |
210 extern DLL_VARIABLE const struct catalog_output_format output_format_properties; | |
211 +#ifdef __cplusplus | |
212 +}; | |
213 +#endif | |
214 | |
215 #endif /* _WRITE_PROPERTIES_H */ | |
216 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/write-stringtable.h gettext-0.18.3.1/gettext-tools/src/write-stringtable.h | |
217 --- gettext-0.18.3.1-orig/gettext-tools/src/write-stringtable.h 2012-12-09 20:59:06 -0500 | |
218 +++ gettext-0.18.3.1/gettext-tools/src/write-stringtable.h 2013-11-04 19:47:57 -0500 | |
219 @@ -21,6 +21,12 @@ | |
220 #include "write-catalog.h" | |
221 | |
222 /* Describes a PO file in .strings syntax. */ | |
223 +#ifdef __cplusplus | |
224 +extern "C" { | |
225 +#endif | |
226 extern DLL_VARIABLE const struct catalog_output_format output_format_stringtable; | |
227 +#ifdef __cplusplus | |
228 +}; | |
229 +#endif | |
230 | |
231 #endif /* _WRITE_STRINGTABLE_H */ | |
232 diff -ur gettext-0.18.3.1-orig/gettext-tools/src/x-lua.c gettext-0.18.3.1/gettext-tools/src/x-lua.c | |
233 --- gettext-0.18.3.1-orig/gettext-tools/src/x-lua.c 2013-08-12 08:07:22 -0400 | |
234 +++ gettext-0.18.3.1/gettext-tools/src/x-lua.c 2013-11-04 19:43:20 -0500 | |
235 @@ -281,9 +281,10 @@ | |
236 | |
237 if (c == '[') | |
238 { | |
239 + int esigns = 0; | |
240 + | |
241 c = phase1_getc (); | |
242 | |
243 - int esigns = 0; | |
244 while (c == '=') | |
245 { | |
246 esigns++; | |
247 @@ -477,6 +478,8 @@ | |
248 int c; | |
249 int c2; | |
250 int c_start; | |
251 + int esigns = 0; | |
252 + int esigns2 = 0; | |
253 | |
254 if (phase3_pushback_length) | |
255 { | |
256 @@ -707,7 +710,6 @@ | |
257 c = phase1_getc (); | |
258 | |
259 /* Count the number of equal signs. */ | |
260 - int esigns = 0; | |
261 while (c == '=') | |
262 { | |
263 esigns++; | |
264 @@ -742,7 +744,6 @@ | |
265 c = phase1_getc (); | |
266 | |
267 /* Count the number of equal signs. */ | |
268 - int esigns2 = 0; | |
269 while (c == '=') | |
270 { | |
271 esigns2++; |