Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1--- a/glib/configure.ac 2013-08-04 20:21:20.808722600 -0500
2+++ b/glib/configure.ac 2013-08-04 18:30:21.852852200 -0500
3@@ -1880,7 +1880,7 @@ dnl ************************************
4
5 AC_MSG_CHECKING(for platform-dependent source)
6 case "$host" in
7- *-*-cygwin*|*-*-mingw*)
8+ *-*-mingw*)
9 PLATFORMDEP=gwin32.lo
10 ;;
11 *)
12@@ -2594,9 +2594,6 @@ dnl *** Win32 API libs ***
13 dnl **********************
14
15 case $host in
16- *-*-cygwin*)
17- G_LIBS_EXTRA="-luser32 -lkernel32"
18- ;;
19 *-*-mingw*)
20 G_LIBS_EXTRA="-lws2_32 -lole32 -lwinmm -lshlwapi"
21 ;;
22--- a/glib/glib/gatomic.c 2013-08-04 20:21:20.907728300 -0500
23+++ b/glib/glib/gatomic.c 2013-08-04 18:11:14.000000000 -0500
24@@ -464,7 +464,7 @@ gsize
25 return g_atomic_pointer_xor ((volatile gpointer *) atomic, val);
26 }
27
28-#elif defined (G_PLATFORM_WIN32)
29+#elif defined (G_OS_WIN32)
30
31 #include <windows.h>
32 #if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200)
33--- a/glib/glib/gcharset.c 2013-08-04 20:21:20.925729300 -0500
34+++ b/glib/glib/gcharset.c 2013-08-04 18:11:14.000000000 -0500
35@@ -496,7 +496,7 @@ guess_category_value (const gchar *categ
36 if ((retval != NULL) && (retval[0] != '\0'))
37 return retval;
38
39-#ifdef G_PLATFORM_WIN32
40+#ifdef G_OS_WIN32
41 /* g_win32_getlocale() first checks for LC_ALL, LC_MESSAGES and
42 * LANG, which we already did above. Oh well. The main point of
43 * calling g_win32_getlocale() is to get the thread's locale as used
44--- a/glib/glib/gconvert.c 2013-08-04 20:21:20.933729800 -0500
45+++ b/glib/glib/gconvert.c 2013-08-04 18:11:14.000000000 -0500
46@@ -33,9 +33,6 @@
47
48 #ifdef G_OS_WIN32
49 #include "win_iconv.c"
50-#endif
51-
52-#ifdef G_PLATFORM_WIN32
53 #define STRICT
54 #include <windows.h>
55 #undef STRICT
56@@ -1258,7 +1255,7 @@ g_locale_from_utf8 (const gchar *utf8str
57 charset, "UTF-8", bytes_read, bytes_written, error);
58 }
59
60-#ifndef G_PLATFORM_WIN32
61+#ifndef G_OS_WIN32
62
63 typedef struct _GFilenameCharsetCache GFilenameCharsetCache;
64
65@@ -1374,7 +1371,7 @@ g_get_filename_charsets (const gchar ***
66 return cache->is_utf8;
67 }
68
69-#else /* G_PLATFORM_WIN32 */
70+#else /* G_OS_WIN32 */
71
72 gboolean
73 g_get_filename_charsets (const gchar ***filename_charsets)
74@@ -1403,7 +1400,7 @@ g_get_filename_charsets (const gchar ***
75 #endif
76 }
77
78-#endif /* G_PLATFORM_WIN32 */
79+#endif /* G_OS_WIN32 */
80
81 static gboolean
82 get_filename_charset (const gchar **filename_charset)
83--- a/glib/glib/gfileutils.c 2013-08-04 20:21:20.942730300 -0500
84+++ b/glib/glib/gfileutils.c 2013-08-04 18:11:14.000000000 -0500
85@@ -2153,7 +2153,7 @@ g_path_skip_root (const gchar *file_name
86 {
87 g_return_val_if_fail (file_name != NULL, NULL);
88
89-#ifdef G_PLATFORM_WIN32
90+#ifdef G_OS_WIN32
91 /* Skip \\server\share or //server/share */
92 if (G_IS_DIR_SEPARATOR (file_name[0]) &&
93 G_IS_DIR_SEPARATOR (file_name[1]) &&
94@@ -2163,7 +2163,6 @@ g_path_skip_root (const gchar *file_name
95 gchar *p;
96 p = strchr (file_name + 2, G_DIR_SEPARATOR);
97
98-#ifdef G_OS_WIN32
99 {
100 gchar *q;
101
102@@ -2171,7 +2170,6 @@ g_path_skip_root (const gchar *file_name
103 if (p == NULL || (q != NULL && q < p))
104 p = q;
105 }
106-#endif
107
108 if (p && p > file_name + 2 && p[1])
109 {
110--- a/glib/glib/glib.h 2013-08-04 20:21:20.949730700 -0500
111+++ b/glib/glib/glib.h 2013-08-04 18:11:14.000000000 -0500
112@@ -96,7 +96,7 @@
113 #include <glib/gvariant.h>
114 #include <glib/gversion.h>
115 #include <glib/gversionmacros.h>
116-#ifdef G_PLATFORM_WIN32
117+#ifdef G_OS_WIN32
118 #include <glib/gwin32.h>
119 #endif
120
121--- a/glib/glib/gutf8.c 2013-08-04 20:21:20.984732700 -0500
122+++ b/glib/glib/gutf8.c 2013-08-04 18:11:14.000000000 -0500
123@@ -27,7 +27,7 @@
124 #endif
125 #include <string.h>
126
127-#ifdef G_PLATFORM_WIN32
128+#ifdef G_OS_WIN32
129 #include <stdio.h>
130 #define STRICT
131 #include <windows.h>
132--- a/glib/glib/gutils.c 2013-08-04 20:21:21.015734500 -0500
133+++ b/glib/glib/gutils.c 2013-08-04 18:11:14.000000000 -0500
134@@ -72,7 +72,7 @@
135 #include "garray.h"
136 #include "glibintl.h"
137
138-#ifdef G_PLATFORM_WIN32
139+#ifdef G_OS_WIN32
140 #include "gconvert.h"
141 #include "gwin32.h"
142 #endif
143@@ -86,16 +86,13 @@
144 * These are portable utility functions.
145 */
146
147-#ifdef G_PLATFORM_WIN32
148+#ifdef G_OS_WIN32
149 # include <windows.h>
150 # ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
151 # define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2
152 # define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4
153 # endif
154 # include <lmcons.h> /* For UNLEN */
155-#endif /* G_PLATFORM_WIN32 */
156-
157-#ifdef G_OS_WIN32
158 # include <direct.h>
159 # include <shlobj.h>
160 /* older SDK (e.g. msvc 5.0) does not have these*/
161@@ -131,7 +128,7 @@
162 #include <langinfo.h>
163 #endif
164
165-#ifdef G_PLATFORM_WIN32
166+#ifdef G_OS_WIN32
167
168 gchar *
169 _glib_get_dll_directory (void)
170--- a/glib/glib/gutils.h 2013-08-04 20:21:21.067737500 -0500
171+++ b/glib/glib/gutils.h 2013-08-04 18:11:14.000000000 -0500
172@@ -350,7 +350,7 @@ g_bit_storage (gulong number)
173 * On non-Windows platforms, expands to nothing.
174 */
175
176-#ifndef G_PLATFORM_WIN32
177+#ifndef G_OS_WIN32
178 # define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
179 #else
180 # define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \
181@@ -378,7 +378,7 @@ DllMain (HINSTANCE hinstDLL, \
182
183 #endif /* !G_DISABLE_DEPRECATED */
184
185-#endif /* G_PLATFORM_WIN32 */
186+#endif /* G_OS_WIN32 */
187
188 G_END_DECLS
189
190--- a/glib/glib/gwin32.h 2013-08-04 20:21:21.081738300 -0500
191+++ b/glib/glib/gwin32.h 2013-08-04 18:11:14.000000000 -0500
192@@ -33,7 +33,7 @@
193
194 #include <glib/gtypes.h>
195
196-#ifdef G_PLATFORM_WIN32
197+#ifdef G_OS_WIN32
198
199 G_BEGIN_DECLS
200
201@@ -41,8 +41,6 @@ G_BEGIN_DECLS
202 #define MAXPATHLEN 1024
203 #endif
204
205-#ifdef G_OS_WIN32
206-
207 /*
208 * To get prototypes for the following POSIXish functions, you have to
209 * include the indicated non-POSIX headers. The functions are defined
210@@ -68,7 +66,6 @@ G_BEGIN_DECLS
211 GLIB_AVAILABLE_IN_ALL
212 gint g_win32_ftruncate (gint f,
213 guint size);
214-#endif /* G_OS_WIN32 */
215
216 /* The MS setlocale uses locale names of the form "English_United
217 * States.1252" etc. We want the Unixish standard form "en", "zh_TW"
218@@ -112,7 +109,7 @@ gchar* g_win32_locale_filename_
219
220 G_END_DECLS
221
222-#endif /* G_PLATFORM_WIN32 */
223+#endif /* G_OS_WIN32 */
224
225 #ifdef G_OS_WIN32
226 #ifdef _WIN64
227--- a/glib/glib/libcharset/localcharset.c 2013-08-04 20:21:21.095739100 -0500
228+++ b/glib/glib/libcharset/localcharset.c 2013-08-04 18:11:14.000000000 -0500
229@@ -46,10 +46,6 @@
230 # include <locale.h>
231 # endif
232 # endif
233-# ifdef __CYGWIN__
234-# define WIN32_LEAN_AND_MEAN
235-# include <windows.h>
236-# endif
237 #elif defined WIN32_NATIVE
238 # define WIN32_LEAN_AND_MEAN
239 # include <windows.h>
240@@ -111,7 +107,7 @@ _g_locale_get_charset_aliases (void)
241 cp = charset_aliases;
242 if (cp == NULL)
243 {
244-#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
245+#if !(defined VMS || defined WIN32_NATIVE)
246 FILE *fp;
247 const char *dir;
248 const char *base = "charset.alias";
249@@ -237,7 +233,7 @@ _g_locale_get_charset_aliases (void)
250 "DECKOREAN" "\0" "EUC-KR" "\0";
251 # endif
252
253-# if defined WIN32_NATIVE || defined __CYGWIN__
254+# if defined WIN32_NATIVE
255 /* To avoid the troubles of installing a separate file in the same
256 directory as the DLL and of retrieving the DLL's directory at
257 runtime, simply inline the aliases here. */
258@@ -292,53 +288,6 @@ _g_locale_charset_raw (void)
259 /* Most systems support nl_langinfo (CODESET) nowadays. */
260 codeset = nl_langinfo (CODESET);
261
262-# ifdef __CYGWIN__
263- /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
264- returns "US-ASCII". As long as this is not fixed, return the suffix
265- of the locale name from the environment variables (if present) or
266- the codepage as a number. */
267- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
268- {
269- const char *locale;
270- static char buf[2 + 10 + 1];
271-
272- locale = getenv ("LC_ALL");
273- if (locale == NULL || locale[0] == '\0')
274- {
275- locale = getenv ("LC_CTYPE");
276- if (locale == NULL || locale[0] == '\0')
277- locale = getenv ("LANG");
278- }
279- if (locale != NULL && locale[0] != '\0')
280- {
281- /* If the locale name contains an encoding after the dot, return
282- it. */
283- const char *dot = strchr (locale, '.');
284-
285- if (dot != NULL)
286- {
287- const char *modifier;
288-
289- dot++;
290- /* Look for the possible @... trailer and remove it, if any. */
291- modifier = strchr (dot, '@');
292- if (modifier == NULL)
293- return dot;
294- if (modifier - dot < sizeof (buf))
295- {
296- memcpy (buf, dot, modifier - dot);
297- buf [modifier - dot] = '\0';
298- return buf;
299- }
300- }
301- }
302-
303- /* Woe32 has a function returning the locale's codepage as a number. */
304- sprintf (buf, "CP%u", GetACP ());
305- codeset = buf;
306- }
307-# endif
308-
309 # else
310
311 /* On old systems which lack it, use setlocale or getenv. */
312diff --git a/glib/gtypes.h b/glib/gtypes.h
313index c18e0bf..816685a 100644
314--- a/glib/glib/gtypes.h
315+++ b/glib/glib/gtypes.h
316@@ -462,7 +462,7 @@ G_END_DECLS
317 * properly get exported in Windows DLLs.
318 */
319 #ifndef GLIB_VAR
320-# ifdef G_PLATFORM_WIN32
321+# ifdef G_OS_WIN32
322 # ifdef GLIB_STATIC_COMPILATION
323 # define GLIB_VAR extern
324 # else /* !GLIB_STATIC_COMPILATION */