comparison src/mingw-glib-1-fixes.patch @ 4291:436a81e04861

glib: update to v2.48.1 * src/glib.mk: update version, checksum * src/mingw-glib-1-fixes.patch: update patch
author John D
date Sun, 25 Dec 2016 18:51:46 -0500
parents 96e96221fe09
children
comparison
equal deleted inserted replaced
4290:c85991d2fed4 4291:436a81e04861
1 This file is part of MXE. 1 diff -ur glib-2.48.1.orig/autogen.sh glib-2.48.1/autogen.sh
2 See index.html for further information. 2 --- glib-2.48.1.orig/autogen.sh 2016-12-25 13:21:25.730080418 -0500
3 3 +++ glib-2.48.1/autogen.sh 2016-12-25 13:22:17.474289395 -0500
4 Contains ad hoc patches for cross building.
5
6 From 55d5dab8f12c55064b48da8a4a42bfe8fa97f8f9 Mon Sep 17 00:00:00 2001
7 From: MXE
8 Date: Thu, 23 Sep 2010 21:41:51 +0200
9 Subject: [PATCH 1/8] optional gettext
10
11
12 diff -ur a/configure.ac b/configure.ac
13 --- a/configure.ac 2013-06-10 00:53:13.000000000 +0200
14 +++ b/configure.ac 2013-06-29 05:15:59.920660258 +0200
15 @@ -483,8 +483,8 @@
16 GLIB_GNU_GETTEXT
17
18 if test "$gt_cv_have_gettext" != "yes" ; then
19 - AC_MSG_ERROR([
20 -*** You must have either have gettext support in your C library, or use the
21 + AC_MSG_WARN([
22 +*** You should have either have gettext support in your C library, or use the
23 *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
24 ])
25 fi
26 diff -ur a/glib/gi18n.h b/glib/gi18n.h
27 --- a/glib/gi18n.h 2011-08-16 02:51:30.000000000 +0200
28 +++ b/glib/gi18n.h 2013-06-29 05:17:17.620663625 +0200
29 @@ -22,7 +22,12 @@
30
31 #include <glib.h>
32
33 +#ifdef ENABLE_NLS
34 #include <libintl.h>
35 +#else
36 +#define gettext(String) (String)
37 +#endif
38 +
39 #include <string.h>
40
41 #define _(String) gettext (String)
42
43
44 From 4dee17aeb7c45a84a44e3fe2dcca4d8bfd1916a3 Mon Sep 17 00:00:00 2001
45 From: MXE
46 Date: Thu, 23 Sep 2010 21:42:46 +0200
47 Subject: [PATCH 2/8] fix tool paths
48
49
50 diff -ur a/glib-2.0.pc.in b/glib-2.0.pc.in
51 --- a/glib-2.0.pc.in 2012-03-12 01:42:41.000000000 +0100
52 +++ b/glib-2.0.pc.in 2013-06-29 05:18:02.624665578 +0200
53 @@ -3,9 +3,9 @@
54 libdir=@libdir@
55 includedir=@includedir@
56
57 -glib_genmarshal=glib-genmarshal
58 -gobject_query=gobject-query
59 -glib_mkenums=glib-mkenums
60 +glib_genmarshal=@bindir@/glib-genmarshal
61 +gobject_query=@bindir@/gobject-query
62 +glib_mkenums=@bindir@/glib-mkenums
63
64 Name: GLib
65 Description: C Utility Library
66
67
68 From 981260cfec055fbd58986d9e1b7ef27cdc036e30 Mon Sep 17 00:00:00 2001
69 From: MXE
70 Date: Fri, 15 Jun 2012 15:25:01 +0200
71 Subject: [PATCH 3/8] Avoid DllMain symbol conflict when linking statically
72
73
74 diff -ur a/gio/giomodule.c b/gio/giomodule.c
75 --- a/gio/giomodule.c 2013-06-03 01:20:49.000000000 +0200
76 +++ b/gio/giomodule.c 2013-06-29 05:19:55.560670478 +0200
77 @@ -900,14 +900,12 @@
78
79 static HMODULE gio_dll = NULL;
80
81 -#ifdef DLL_EXPORT
82 -
83 -BOOL WINAPI DllMain (HINSTANCE hinstDLL,
84 +BOOL WINAPI gio_DllMain (HINSTANCE hinstDLL,
85 DWORD fdwReason,
86 LPVOID lpvReserved);
87
88 BOOL WINAPI
89 -DllMain (HINSTANCE hinstDLL,
90 +gio_DllMain (HINSTANCE hinstDLL,
91 DWORD fdwReason,
92 LPVOID lpvReserved)
93 {
94 @@ -917,8 +915,6 @@
95 return TRUE;
96 }
97
98 -#endif
99 -
100 void *
101 _g_io_win32_get_module (void)
102 {
103 diff -ur a/glib/glib-init.c b/glib/glib-init.c
104 --- a/glib/glib-init.c 2013-06-10 00:03:17.000000000 +0200
105 +++ b/glib/glib-init.c 2013-06-29 05:20:43.480672556 +0200
106 @@ -223,14 +223,14 @@
107
108 #if defined (G_OS_WIN32)
109
110 -BOOL WINAPI DllMain (HINSTANCE hinstDLL,
111 +BOOL WINAPI glib_DllMain (HINSTANCE hinstDLL,
112 DWORD fdwReason,
113 LPVOID lpvReserved);
114
115 HMODULE glib_dll;
116
117 BOOL WINAPI
118 -DllMain (HINSTANCE hinstDLL,
119 +glib_DllMain (HINSTANCE hinstDLL,
120 DWORD fdwReason,
121 LPVOID lpvReserved)
122 {
123
124
125 From 1b51f3ef3e38d5db3c15cde0fe4429dab1f7a6d0 Mon Sep 17 00:00:00 2001
126 From: MXE
127 Date: Fri, 15 Jun 2012 15:27:22 +0200
128 Subject: [PATCH 4/8] Allow building without inotify support
129
130
131 diff -ur a/configure.ac b/configure.ac
132 --- a/configure.ac 2013-06-10 00:53:13.000000000 +0200
133 +++ b/configure.ac 2013-06-29 05:23:45.264680443 +0200
134 @@ -1726,11 +1726,17 @@
135 dnl ** Check for inotify (GIO) **
136 dnl *****************************
137 inotify_support=no
138 -AC_CHECK_HEADERS([sys/inotify.h],
139 -[
140 +AC_ARG_ENABLE(inotify,
141 + AC_HELP_STRING([--disable-inotify],
142 + [build without inotify support]))
143 +
144 +if test "x$enable_inotify" != "xno"; then
145 + AC_CHECK_HEADERS([sys/inotify.h],
146 + [
147 inotify_support=yes
148 AC_CHECK_FUNCS(inotify_init1)
149 -])
150 + ])
151 +fi
152
153 AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"])
154
155
156
157 From 5ec5d101cb75c096f39228da85d2caba52b9002f Mon Sep 17 00:00:00 2001
158 From: MXE
159 Date: Fri, 15 Jun 2012 15:28:14 +0200
160 Subject: [PATCH 5/8] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
161 Backported from upstream
162
163
164 diff -ur a/configure.ac b/configure.ac
165 --- a/configure.ac 2013-06-10 00:53:13.000000000 +0200
166 +++ b/configure.ac 2013-06-29 05:24:29.720682366 +0200
167 @@ -456,6 +456,8 @@
168
169 AC_MSG_RESULT($enable_iconv_cache)
170
171 +# Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF
172 +AS_IF([false], [AC_CHECK_HEADER([stdint.h])])
173
174 dnl
175 dnl zlib support
176
177
178 From d5c7bf3b57ced0c6dfb416cf7b439fba210d2a8b Mon Sep 17 00:00:00 2001
179 From: MXE
180 Date: Fri, 15 Jun 2012 15:29:06 +0200
181 Subject: [PATCH 6/8] Link with dnsapi
182
183
184 diff -ur a/gio-2.0.pc.in b/gio-2.0.pc.in
185 --- a/gio-2.0.pc.in 2013-01-20 20:48:44.000000000 +0100
186 +++ b/gio-2.0.pc.in 2013-06-29 05:25:16.328684390 +0200
187 @@ -13,6 +13,6 @@
188 Version: @VERSION@
189 Requires: glib-2.0 gobject-2.0
190 Requires.private: gmodule-no-export-2.0
191 -Libs: -L${libdir} -lgio-2.0
192 +Libs: -L${libdir} -lgio-2.0 -ldnsapi
193 Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@
194 Cflags:
195
196
197
198 From e0338b4fdd95e8273c84ba1daeea660c589d152a Mon Sep 17 00:00:00 2001
199 From: MXE
200 Date: Fri, 15 Jun 2012 15:29:38 +0200
201 Subject: [PATCH 7/8] Ensure globals are initialized even when DllMain is not
202 being run
203
204
205 diff -ur a/glib/gmain.c b/glib/gmain.c
206 --- a/glib/gmain.c 2013-06-10 00:03:18.000000000 +0200
207 +++ b/glib/gmain.c 2013-06-29 05:33:10.568704963 +0200
208 @@ -2490,12 +2490,15 @@
209 #ifdef G_OS_WIN32
210 static ULONGLONG (*g_GetTickCount64) (void) = NULL;
211 static guint32 g_win32_tick_epoch = 0;
212 +static gboolean g_win32_clock_is_initialized;
213
214 void
215 g_clock_win32_init (void)
216 {
217 HMODULE kernel32;
218
219 + g_win32_clock_is_initialized = TRUE;
220 +
221 g_GetTickCount64 = NULL;
222 kernel32 = GetModuleHandle ("KERNEL32.DLL");
223 if (kernel32 != NULL)
224 @@ -2614,6 +2617,9 @@
225 * timeBeginPeriod() to increase it as much as they want
226 */
227
228 + if (!g_win32_clock_is_initialized)
229 + g_clock_win32_init ();
230 +
231 if (g_GetTickCount64 != NULL)
232 {
233 guint32 ticks_as_32bit;
234 diff -ur a/glib/gthread-win32.c b/glib/gthread-win32.c
235 --- a/glib/gthread-win32.c 2013-06-03 01:20:49.000000000 +0200
236 +++ b/glib/gthread-win32.c 2013-06-29 05:49:13.580746730 +0200
237 @@ -118,18 +118,28 @@
238 void (__stdcall * WakeConditionVariable) (gpointer cond);
239 } GThreadImplVtable;
240
241 +/* Needed for static builds where DllMain initializer doesn't get called */
242 +static gboolean g_threads_is_initialized;
243 +G_GNUC_INTERNAL void g_thread_win32_init (void);
244 +
245 static GThreadImplVtable g_thread_impl_vtable;
246
247 /* {{{1 GMutex */
248 void
249 g_mutex_init (GMutex *mutex)
250 {
251 + if (!g_threads_is_initialized)
252 + g_thread_win32_init ();
253 +
254 g_thread_impl_vtable.InitializeSRWLock (mutex);
255 }
256
257 void
258 g_mutex_clear (GMutex *mutex)
259 {
260 + if (!g_threads_is_initialized)
261 + g_thread_win32_init ();
262 +
263 if (g_thread_impl_vtable.DeleteSRWLock != NULL)
264 g_thread_impl_vtable.DeleteSRWLock (mutex);
265 }
266 @@ -137,18 +147,27 @@
267 void
268 g_mutex_lock (GMutex *mutex)
269 {
270 + if (!g_threads_is_initialized)
271 + g_thread_win32_init ();
272 +
273 g_thread_impl_vtable.AcquireSRWLockExclusive (mutex);
274 }
275
276 gboolean
277 g_mutex_trylock (GMutex *mutex)
278 {
279 + if (!g_threads_is_initialized)
280 + g_thread_win32_init ();
281 +
282 return g_thread_impl_vtable.TryAcquireSRWLockExclusive (mutex);
283 }
284
285 void
286 g_mutex_unlock (GMutex *mutex)
287 {
288 + if (!g_threads_is_initialized)
289 + g_thread_win32_init ();
290 +
291 g_thread_impl_vtable.ReleaseSRWLockExclusive (mutex);
292 }
293
294 @@ -159,6 +178,9 @@
295 {
296 CRITICAL_SECTION *cs;
297
298 + if (!g_threads_is_initialized)
299 + g_thread_win32_init ();
300 +
301 cs = g_slice_new (CRITICAL_SECTION);
302 InitializeCriticalSection (cs);
303
304 @@ -169,6 +191,10 @@
305 g_rec_mutex_impl_free (CRITICAL_SECTION *cs)
306 {
307 DeleteCriticalSection (cs);
308 +
309 + if (!g_threads_is_initialized)
310 + g_thread_win32_init ();
311 +
312 g_slice_free (CRITICAL_SECTION, cs);
313 }
314
315 @@ -177,6 +203,9 @@
316 {
317 CRITICAL_SECTION *impl = mutex->p;
318
319 + if (!g_threads_is_initialized)
320 + g_thread_win32_init ();
321 +
322 if G_UNLIKELY (mutex->p == NULL)
323 {
324 impl = g_rec_mutex_impl_new ();
325 @@ -191,30 +220,45 @@
326 void
327 g_rec_mutex_init (GRecMutex *mutex)
328 {
329 + if (!g_threads_is_initialized)
330 + g_thread_win32_init ();
331 +
332 mutex->p = g_rec_mutex_impl_new ();
333 }
334
335 void
336 g_rec_mutex_clear (GRecMutex *mutex)
337 {
338 + if (!g_threads_is_initialized)
339 + g_thread_win32_init ();
340 +
341 g_rec_mutex_impl_free (mutex->p);
342 }
343
344 void
345 g_rec_mutex_lock (GRecMutex *mutex)
346 {
347 + if (!g_threads_is_initialized)
348 + g_thread_win32_init ();
349 +
350 EnterCriticalSection (g_rec_mutex_get_impl (mutex));
351 }
352
353 void
354 g_rec_mutex_unlock (GRecMutex *mutex)
355 {
356 + if (!g_threads_is_initialized)
357 + g_thread_win32_init ();
358 +
359 LeaveCriticalSection (mutex->p);
360 }
361
362 gboolean
363 g_rec_mutex_trylock (GRecMutex *mutex)
364 {
365 + if (!g_threads_is_initialized)
366 + g_thread_win32_init ();
367 +
368 return TryEnterCriticalSection (g_rec_mutex_get_impl (mutex));
369 }
370
371 @@ -223,12 +267,18 @@
372 void
373 g_rw_lock_init (GRWLock *lock)
374 {
375 + if (!g_threads_is_initialized)
376 + g_thread_win32_init ();
377 +
378 g_thread_impl_vtable.InitializeSRWLock (lock);
379 }
380
381 void
382 g_rw_lock_clear (GRWLock *lock)
383 {
384 + if (!g_threads_is_initialized)
385 + g_thread_win32_init ();
386 +
387 if (g_thread_impl_vtable.DeleteSRWLock != NULL)
388 g_thread_impl_vtable.DeleteSRWLock (lock);
389 }
390 @@ -236,36 +286,54 @@
391 void
392 g_rw_lock_writer_lock (GRWLock *lock)
393 {
394 + if (!g_threads_is_initialized)
395 + g_thread_win32_init ();
396 +
397 g_thread_impl_vtable.AcquireSRWLockExclusive (lock);
398 }
399
400 gboolean
401 g_rw_lock_writer_trylock (GRWLock *lock)
402 {
403 + if (!g_threads_is_initialized)
404 + g_thread_win32_init ();
405 +
406 return g_thread_impl_vtable.TryAcquireSRWLockExclusive (lock);
407 }
408
409 void
410 g_rw_lock_writer_unlock (GRWLock *lock)
411 {
412 + if (!g_threads_is_initialized)
413 + g_thread_win32_init ();
414 +
415 g_thread_impl_vtable.ReleaseSRWLockExclusive (lock);
416 }
417
418 void
419 g_rw_lock_reader_lock (GRWLock *lock)
420 {
421 + if (!g_threads_is_initialized)
422 + g_thread_win32_init ();
423 +
424 g_thread_impl_vtable.AcquireSRWLockShared (lock);
425 }
426
427 gboolean
428 g_rw_lock_reader_trylock (GRWLock *lock)
429 {
430 + if (!g_threads_is_initialized)
431 + g_thread_win32_init ();
432 +
433 return g_thread_impl_vtable.TryAcquireSRWLockShared (lock);
434 }
435
436 void
437 g_rw_lock_reader_unlock (GRWLock *lock)
438 {
439 + if (!g_threads_is_initialized)
440 + g_thread_win32_init ();
441 +
442 g_thread_impl_vtable.ReleaseSRWLockShared (lock);
443 }
444
445 @@ -273,12 +341,18 @@
446 void
447 g_cond_init (GCond *cond)
448 {
449 + if (!g_threads_is_initialized)
450 + g_thread_win32_init ();
451 +
452 g_thread_impl_vtable.InitializeConditionVariable (cond);
453 }
454
455 void
456 g_cond_clear (GCond *cond)
457 {
458 + if (!g_threads_is_initialized)
459 + g_thread_win32_init ();
460 +
461 if (g_thread_impl_vtable.DeleteConditionVariable)
462 g_thread_impl_vtable.DeleteConditionVariable (cond);
463 }
464 @@ -286,12 +360,18 @@
465 void
466 g_cond_signal (GCond *cond)
467 {
468 + if (!g_threads_is_initialized)
469 + g_thread_win32_init ();
470 +
471 g_thread_impl_vtable.WakeConditionVariable (cond);
472 }
473
474 void
475 g_cond_broadcast (GCond *cond)
476 {
477 + if (!g_threads_is_initialized)
478 + g_thread_win32_init ();
479 +
480 g_thread_impl_vtable.WakeAllConditionVariable (cond);
481 }
482
483 @@ -299,6 +379,9 @@
484 g_cond_wait (GCond *cond,
485 GMutex *entered_mutex)
486 {
487 + if (!g_threads_is_initialized)
488 + g_thread_win32_init ();
489 +
490 g_thread_impl_vtable.SleepConditionVariableSRW (cond, entered_mutex, INFINITE, 0);
491 }
492
493 @@ -309,6 +392,9 @@
494 {
495 gint64 span;
496
497 + if (!g_threads_is_initialized)
498 + g_thread_win32_init ();
499 +
500 span = end_time - g_get_monotonic_time ();
501
502 if G_UNLIKELY (span < 0)
503 @@ -341,6 +427,9 @@
504
505 if G_UNLIKELY (impl == 0)
506 {
507 + if (!g_threads_is_initialized)
508 + g_thread_win32_init ();
509 +
510 EnterCriticalSection (&g_private_lock);
511 impl = (DWORD) key->p;
512 if (impl == 0)
513 @@ -434,6 +523,9 @@
514 {
515 GThreadWin32 *wt = (GThreadWin32 *) thread;
516
517 + if (!g_threads_is_initialized)
518 + g_thread_win32_init ();
519 +
520 win32_check_for_error (CloseHandle (wt->handle));
521 g_slice_free (GThreadWin32, wt);
522 }
523 @@ -441,6 +533,9 @@
524 void
525 g_system_thread_exit (void)
526 {
527 + if (!g_threads_is_initialized)
528 + g_thread_win32_init ();
529 +
530 _endthreadex (0);
531 }
532
533 @@ -449,6 +544,9 @@
534 {
535 GThreadWin32 *self = data;
536
537 + if (!g_threads_is_initialized)
538 + g_thread_win32_init ();
539 +
540 self->proxy (self);
541
542 g_system_thread_exit ();
543 @@ -466,6 +564,9 @@
544 GThreadWin32 *thread;
545 guint ignore;
546
547 + if (!g_threads_is_initialized)
548 + g_thread_win32_init ();
549 +
550 thread = g_slice_new0 (GThreadWin32);
551 thread->proxy = func;
552
553 @@ -495,6 +596,9 @@
554 {
555 GThreadWin32 *wt = (GThreadWin32 *) thread;
556
557 + if (!g_threads_is_initialized)
558 + g_thread_win32_init ();
559 +
560 win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
561 }
562
563 @@ -986,6 +1090,8 @@
564 void
565 g_thread_win32_init (void)
566 {
567 + g_threads_is_initialized = TRUE;
568 +
569 if (!g_thread_lookup_native_funcs ())
570 g_thread_xp_init ();
571
572
573
574 From ce0f7354ac995f3b21cccabec880413d37f02fb6 Mon Sep 17 00:00:00 2001
575 From: MXE
576 Date: Mon, 18 Jun 2012 16:02:12 +0200
577 Subject: [PATCH 8/8] kill docs and gtk-doc dependence (mxe-specific)
578
579
580 diff -urN a/autogen.sh b/autogen.sh
581 --- a/autogen.sh 2012-08-18 19:32:04.000000000 +0200
582 +++ b/autogen.sh 2013-06-29 05:50:43.972750651 +0200
583 @@ -7,18 +7,6 @@ 4 @@ -7,18 +7,6 @@
584 olddir=`pwd` 5 olddir=`pwd`
585 cd "$srcdir" 6 cd "$srcdir"
586 7
587 -GTKDOCIZE=$(which gtkdocize 2>/dev/null) 8 -GTKDOCIZE=$(which gtkdocize 2>/dev/null)
597 -fi 18 -fi
598 - 19 -
599 AUTORECONF=`which autoreconf` 20 AUTORECONF=`which autoreconf`
600 if test -z $AUTORECONF; then 21 if test -z $AUTORECONF; then
601 echo "*** No autoreconf found, please install it ***" 22 echo "*** No autoreconf found, please install it ***"
602 diff -urN a/configure.ac b/configure.ac 23 diff -ur glib-2.48.1.orig/configure.ac glib-2.48.1/configure.ac
603 --- a/configure.ac 2013-06-10 00:53:13.000000000 +0200 24 --- glib-2.48.1.orig/configure.ac 2016-12-25 13:21:25.725080302 -0500
604 +++ b/configure.ac 2013-06-29 05:52:05.224754174 +0200 25 +++ glib-2.48.1/configure.ac 2016-12-25 13:22:17.472289348 -0500
605 @@ -2645,13 +2645,6 @@ 26 @@ -465,8 +465,8 @@
606 dnl ************************** 27 GLIB_GNU_GETTEXT
607 dnl *** Checks for gtk-doc *** 28
608 dnl ************************** 29 if test "$gt_cv_have_gettext" != "yes" ; then
609 -# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have 30 - AC_MSG_ERROR([
610 -# it on it's own line. 31 -*** You must have either have gettext support in your C library, or use the
611 -m4_ifdef([GTK_DOC_CHECK], [ 32 + AC_MSG_WARN([
612 -GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) 33 +*** You should have either have gettext support in your C library, or use the
613 -],[ 34 *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
614 -AM_CONDITIONAL([ENABLE_GTK_DOC],[false]) 35 ])
615 -]) 36 fi
616 37 @@ -509,6 +509,8 @@
617 AC_ARG_ENABLE(man, 38 dnl when using libtool 2.x create libtool early, because it's used in configure
618 [AS_HELP_STRING([--enable-man], 39 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
619 diff -urN a/docs/Makefile.am b/docs/Makefile.am 40
620 --- a/docs/Makefile.am 2013-06-10 00:03:17.000000000 +0200 41 +# Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF
621 +++ b/docs/Makefile.am 1970-01-01 01:00:00.000000000 +0100 42 +AS_IF([false], [AC_CHECK_HEADER([stdint.h])])
622 @@ -1,11 +0,0 @@ 43
623 -## Process this file with automake to produce Makefile.in 44 AS_IF([test "$glib_native_win32" = "yes"], [
624 -include $(top_srcdir)/Makefile.decl 45 if test x$enable_static = xyes -a x$enable_shared = xyes; then
46 Only in glib-2.48.1: configure.ac.orig
47 Only in glib-2.48.1: configure.ac.rej
48 Only in glib-2.48.1/docs: Makefile.am.orig
49 Only in glib-2.48.1/docs: Makefile.am.rej
50 Only in glib-2.48.1/docs/reference/gio: gdbus-object-manager-example
51 Only in glib-2.48.1/docs/reference/gio: Makefile.am.orig
52 Only in glib-2.48.1/docs/reference/gio: Makefile.am.rej
53 Only in glib-2.48.1/docs/reference/glib: Makefile.am.orig
54 Only in glib-2.48.1/docs/reference/glib: Makefile.am.rej
55 Only in glib-2.48.1/docs/reference/gobject: Makefile.am.orig
56 Only in glib-2.48.1/docs/reference/gobject: Makefile.am.rej
57 Only in glib-2.48.1/docs/reference: Makefile.am.orig
58 Only in glib-2.48.1/docs/reference: Makefile.am.rej
59 diff -ur glib-2.48.1.orig/gio/giomodule.c glib-2.48.1/gio/giomodule.c
60 --- glib-2.48.1.orig/gio/giomodule.c 2016-12-25 13:21:25.751080909 -0500
61 +++ glib-2.48.1/gio/giomodule.c 2016-12-25 13:22:17.470289301 -0500
62 @@ -921,14 +921,12 @@
63
64 static HMODULE gio_dll = NULL;
65
66 -#ifdef DLL_EXPORT
625 - 67 -
626 -SUBDIRS = reference 68 -BOOL WINAPI DllMain (HINSTANCE hinstDLL,
69 +BOOL WINAPI gio_DllMain (HINSTANCE hinstDLL,
70 DWORD fdwReason,
71 LPVOID lpvReserved);
72
73 BOOL WINAPI
74 -DllMain (HINSTANCE hinstDLL,
75 +gio_DllMain (HINSTANCE hinstDLL,
76 DWORD fdwReason,
77 LPVOID lpvReserved)
78 {
79 @@ -938,8 +936,6 @@
80 return TRUE;
81 }
82
83 -#endif
627 - 84 -
628 -EXTRA_DIST += debugging.txt macros.txt 85 void *
629 - 86 _g_io_win32_get_module (void)
630 -files: 87 {
631 - @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ 88 Only in glib-2.48.1/gio: giomodule.c.orig
632 - echo $$p; \ 89 Only in glib-2.48.1: gio-2.0.pc.in.orig
633 - done 90 Only in glib-2.48.1: gio-2.0.pc.in.rej
634 diff -urN a/docs/reference/gio/gdbus-object-manager-example/Makefile.am b/docs/reference/gio/gdbus-object-manager-example/Makefile.am 91 diff -ur glib-2.48.1.orig/glib/gi18n.h glib-2.48.1/glib/gi18n.h
635 --- a/docs/reference/gio/gdbus-object-manager-example/Makefile.am 2013-06-10 00:03:17.000000000 +0200 92 --- glib-2.48.1.orig/glib/gi18n.h 2016-12-25 13:21:25.775081470 -0500
636 +++ b/docs/reference/gio/gdbus-object-manager-example/Makefile.am 1970-01-01 01:00:00.000000000 +0100 93 +++ glib-2.48.1/glib/gi18n.h 2016-12-25 13:22:17.469289278 -0500
637 @@ -1,68 +0,0 @@ 94 @@ -20,7 +20,12 @@
638 -include $(top_srcdir)/Makefile.decl 95
639 -NULL = 96 #include <glib.h>
640 - 97
641 -# The name of the module. 98 +#ifdef ENABLE_NLS
642 -DOC_MODULE=gdbus-object-manager-example 99 #include <libintl.h>
643 - 100 +#else
644 -# The top-level SGML file. 101 +#define gettext(String) (String)
645 -DOC_MAIN_SGML_FILE=gdbus-object-manager-example-docs.xml 102 +#endif
646 - 103 +
647 -# Extra options to supply to gtkdoc-scan 104 #include <string.h>
648 -SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" 105
649 - 106 #define _(String) gettext (String)
650 -# The directory containing the source code. Relative to $(srcdir) 107 Only in glib-2.48.1/glib: gi18n.h.orig
651 -DOC_SOURCE_DIR=$(top_builddir)/gio/tests/gdbus-object-manager-example 108 diff -ur glib-2.48.1.orig/glib/glib-init.c glib-2.48.1/glib/glib-init.c
652 - 109 --- glib-2.48.1.orig/glib/glib-init.c 2016-12-25 13:21:25.780081587 -0500
653 -HFILE_GLOB=$(top_builddir)/gio/tests/gdbus-object-manager-example/*.h 110 +++ glib-2.48.1/glib/glib-init.c 2016-12-25 13:22:17.470289301 -0500
654 -CFILE_GLOB=$(top_builddir)/gio/tests/gdbus-object-manager-example/*.c 111 @@ -245,14 +245,14 @@
655 - 112
656 -# Headers to ignore 113 #if defined (G_OS_WIN32)
657 -IGNORE_HFILES = \ 114
658 - $(NULL) 115 -BOOL WINAPI DllMain (HINSTANCE hinstDLL,
659 - 116 +BOOL WINAPI glib_DllMain (HINSTANCE hinstDLL,
660 -# CFLAGS and LDFLAGS for compiling scan program. Only needed 117 DWORD fdwReason,
661 -# if $(DOC_MODULE).types is non-empty. 118 LPVOID lpvReserved);
662 -AM_CPPFLAGS = \ 119
663 - $(gio_INCLUDES) \ 120 HMODULE glib_dll;
664 - $(GLIB_DEBUG_FLAGS) 121
665 - 122 BOOL WINAPI
666 -GTKDOC_LIBS = \ 123 -DllMain (HINSTANCE hinstDLL,
667 - $(top_builddir)/glib/libglib-2.0.la \ 124 +glib_DllMain (HINSTANCE hinstDLL,
668 - $(top_builddir)/gobject/libgobject-2.0.la \ 125 DWORD fdwReason,
669 - $(top_builddir)/gmodule/libgmodule-2.0.la \ 126 LPVOID lpvReserved)
670 - $(top_builddir)/gio/libgio-2.0.la \ 127 {
671 - $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la \ 128 Only in glib-2.48.1/glib: glib-init.c.orig
672 - $(NULL) 129 diff -ur glib-2.48.1.orig/glib/gmain.c glib-2.48.1/glib/gmain.c
673 - 130 --- glib-2.48.1.orig/glib/gmain.c 2016-12-25 13:21:25.793081890 -0500
674 -# Extra options to supply to gtkdoc-mkdb 131 +++ glib-2.48.1/glib/gmain.c 2016-12-25 13:22:17.473289371 -0500
675 -MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=g \ 132 @@ -2609,12 +2609,15 @@
676 - $(NULL) 133 #if defined (G_OS_WIN32)
677 - 134 static ULONGLONG (*g_GetTickCount64) (void) = NULL;
678 -# Images to copy into HTML directory 135 static guint32 g_win32_tick_epoch = 0;
679 -HTML_IMAGES = \ 136 +static gboolean g_win32_clock_is_initialized;
680 - $(NULL) 137
681 - 138 void
682 -content_files = \ 139 g_clock_win32_init (void)
683 - $(NULL) 140 {
684 - 141 HMODULE kernel32;
685 -expand_content_files = \ 142
686 - $(NULL) 143 + g_win32_clock_is_initialized = TRUE;
687 - 144 +
688 -extra_files = \ 145 g_GetTickCount64 = NULL;
689 - $(NULL) 146 kernel32 = GetModuleHandle ("KERNEL32.DLL");
690 - 147 if (kernel32 != NULL)
691 -include $(top_srcdir)/gtk-doc.make 148 @@ -2673,6 +2676,9 @@
692 - 149 * timeBeginPeriod() to increase it as much as they want
693 -EXTRA_DIST += \ 150 */
694 - $(NULL) 151
695 - 152 + if (!g_win32_clock_is_initialized)
696 -MAINTAINERCLEANFILES = $(BUILT_SOURCES) 153 + g_clock_win32_init ();
697 - 154 +
698 -dist-hook-local: all-local 155 if (g_GetTickCount64 != NULL)
699 - 156 {
700 -gdbus-object-manager-example-docs-clean: clean 157 guint32 ticks_as_32bit;
701 - cd $(srcdir) && rm -rf xml html 158 Only in glib-2.48.1/glib: gmain.c.orig
702 - 159 diff -ur glib-2.48.1.orig/glib/gstrfuncs.c glib-2.48.1/glib/gstrfuncs.c
703 -# Nuke installed docs (don't know how to avoid installing them) 160 --- glib-2.48.1.orig/glib/gstrfuncs.c 2016-12-25 13:21:25.797081984 -0500
704 -install-data-hook : 161 +++ glib-2.48.1/glib/gstrfuncs.c 2016-12-25 14:23:07.518480108 -0500
705 - rm -rf $(DESTDIR)$(datadir)/gtk-doc/html/gdbus-object-manager-example 162 @@ -1272,7 +1272,7 @@
706 diff -urN a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am 163 gchar buf[1024];
707 --- a/docs/reference/gio/Makefile.am 2013-06-10 00:03:17.000000000 +0200 164 GError *error = NULL;
708 +++ b/docs/reference/gio/Makefile.am 1970-01-01 01:00:00.000000000 +0100 165
709 @@ -1,179 +0,0 @@ 166 -#if defined(G_OS_WIN32)
710 -include $(top_srcdir)/Makefile.decl 167 +#if defined(G_OS_WIN32) && !defined(__MINGW32__)
711 -NULL = 168 strerror_s (buf, sizeof (buf), errnum);
712 - 169 msg = buf;
713 -SUBDIRS = gdbus-object-manager-example 170 #elif defined(HAVE_STRERROR_R)
714 - 171 diff -ur glib-2.48.1.orig/glib/gthread-win32.c glib-2.48.1/glib/gthread-win32.c
715 -# The name of the module. 172 --- glib-2.48.1.orig/glib/gthread-win32.c 2016-12-25 13:21:25.780081587 -0500
716 -DOC_MODULE=gio 173 +++ glib-2.48.1/glib/gthread-win32.c 2016-12-25 13:22:17.474289395 -0500
717 - 174 @@ -116,18 +116,28 @@
718 -# The top-level SGML file. 175 void (__stdcall * WakeConditionVariable) (gpointer cond);
719 -DOC_MAIN_SGML_FILE=gio-docs.xml 176 } GThreadImplVtable;
720 - 177
721 -# Extra options to supply to gtkdoc-scan 178 +/* Needed for static builds where DllMain initializer doesn't get called */
722 -SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \ 179 +static gboolean g_threads_is_initialized;
723 - --ignore-decorators="G_GNUC_WARN_UNUSED_RESULT" 180 +G_GNUC_INTERNAL void g_thread_win32_init (void);
724 - 181 +
725 -# The directory containing the source code. Relative to $(srcdir) 182 static GThreadImplVtable g_thread_impl_vtable;
726 -DOC_SOURCE_DIR=$(top_srcdir)/gio 183
727 - 184 /* {{{1 GMutex */
728 -BUILT_HFILES=gioenumtypes.h 185 void
729 -HFILE_GLOB=$(top_srcdir)/gio/*.h 186 g_mutex_init (GMutex *mutex)
730 -CFILE_GLOB=$(top_srcdir)/gio/*.c 187 {
731 - 188 + if (!g_threads_is_initialized)
732 -IGNORE_HFILES = \ 189 + g_thread_win32_init ();
733 - fam \ 190 +
734 - fen \ 191 g_thread_impl_vtable.InitializeSRWLock (mutex);
735 - gdbus-2.0 \ 192 }
736 - gvdb \ 193
737 - inotify \ 194 void
738 - libasyncns \ 195 g_mutex_clear (GMutex *mutex)
739 - tests \ 196 {
740 - win32 \ 197 + if (!g_threads_is_initialized)
741 - xdgmime \ 198 + g_thread_win32_init ();
742 - gapplicationimpl.h \ 199 +
743 - gasynchelper.h \ 200 if (g_thread_impl_vtable.DeleteSRWLock != NULL)
744 - gcontenttypeprivate.h \ 201 g_thread_impl_vtable.DeleteSRWLock (mutex);
745 - gdbusauth.h \ 202 }
746 - gdbusauthmechanismanon.h \ 203 @@ -135,18 +145,27 @@
747 - gdbusauthmechanismexternal.h \ 204 void
748 - gdbusauthmechanism.h \ 205 g_mutex_lock (GMutex *mutex)
749 - gdbusauthmechanismsha1.h \ 206 {
750 - gdbusprivate.h \ 207 + if (!g_threads_is_initialized)
751 - gdelayedsettingsbackend.h \ 208 + g_thread_win32_init ();
752 - gdummyfile.h \ 209 +
753 - gdummyproxyresolver.h \ 210 g_thread_impl_vtable.AcquireSRWLockExclusive (mutex);
754 - gdummytlsbackend.h \ 211 }
755 - gfileattribute-priv.h \ 212
756 - gfileinfo-priv.h \ 213 gboolean
757 - giomodule-priv.h \ 214 g_mutex_trylock (GMutex *mutex)
758 - glocaldirectorymonitor.h \ 215 {
759 - glocalfileenumerator.h \ 216 + if (!g_threads_is_initialized)
760 - glocalfile.h \ 217 + g_thread_win32_init ();
761 - glocalfileinfo.h \ 218 +
762 - glocalfileinputstream.h \ 219 return g_thread_impl_vtable.TryAcquireSRWLockExclusive (mutex);
763 - glocalfileiostream.h \ 220 }
764 - glocalfilemonitor.h \ 221
765 - glocalfileoutputstream.h \ 222 void
766 - glocalvfs.h \ 223 g_mutex_unlock (GMutex *mutex)
767 - gmountprivate.h \ 224 {
768 - gnativevolumemonitor.h \ 225 + if (!g_threads_is_initialized)
769 - gnetworkingprivate.h \ 226 + g_thread_win32_init ();
770 - gnetworkmonitorbase.h \ 227 +
771 - gnetworkmonitornetlink.h \ 228 g_thread_impl_vtable.ReleaseSRWLockExclusive (mutex);
772 - gpollfilemonitor.h \ 229 }
773 - gregistrysettingsbackend.h \ 230
774 - gsettingsbackendinternal.h \ 231 @@ -157,6 +176,9 @@
775 - gsettings-mapping.h \ 232 {
776 - gsettingsschema-internal.h \ 233 CRITICAL_SECTION *cs;
777 - gsocketinputstream.h \ 234
778 - gsocketoutputstream.h \ 235 + if (!g_threads_is_initialized)
779 - gsocks4aproxy.h \ 236 + g_thread_win32_init ();
780 - gsocks4proxy.h \ 237 +
781 - gsocks5proxy.h \ 238 cs = g_slice_new (CRITICAL_SECTION);
782 - gthreadedresolver.h \ 239 InitializeCriticalSection (cs);
783 - gunionvolumemonitor.h \ 240
784 - gunixmount.h \ 241 @@ -167,6 +189,10 @@
785 - gunixresolver.h \ 242 g_rec_mutex_impl_free (CRITICAL_SECTION *cs)
786 - gunixvolume.h \ 243 {
787 - gunixvolumemonitor.h \ 244 DeleteCriticalSection (cs);
788 - gwin32appinfo.h \ 245 +
789 - gwin32mount.h \ 246 + if (!g_threads_is_initialized)
790 - gwin32resolver.h \ 247 + g_thread_win32_init ();
791 - gwin32volumemonitor.h 248 +
792 - 249 g_slice_free (CRITICAL_SECTION, cs);
793 - 250 }
794 -# CFLAGS and LDFLAGS for compiling scan program. Only needed 251
795 -# if $(DOC_MODULE).types is non-empty. 252 @@ -175,6 +201,9 @@
796 -AM_CPPFLAGS = \ 253 {
797 - $(gio_INCLUDES) \ 254 CRITICAL_SECTION *impl = mutex->p;
798 - $(GLIB_DEBUG_FLAGS) 255
799 - 256 + if (!g_threads_is_initialized)
800 -GTKDOC_LIBS = \ 257 + g_thread_win32_init ();
801 - $(top_builddir)/glib/libglib-2.0.la \ 258 +
802 - $(top_builddir)/gobject/libgobject-2.0.la \ 259 if G_UNLIKELY (mutex->p == NULL)
803 - $(top_builddir)/gmodule/libgmodule-2.0.la \ 260 {
804 - $(top_builddir)/gio/libgio-2.0.la \ 261 impl = g_rec_mutex_impl_new ();
805 - $(NULL) 262 @@ -189,30 +218,45 @@
806 - 263 void
807 -# Extra options to supply to gtkdoc-mkdb 264 g_rec_mutex_init (GRecMutex *mutex)
808 -MKDB_OPTIONS = --output-format=xml --sgml-mode --name-space=g \ 265 {
809 - --ignore-files='libasyncns tests' 266 + if (!g_threads_is_initialized)
810 - 267 + g_thread_win32_init ();
811 -# Images to copy into HTML directory 268 +
812 -HTML_IMAGES = \ 269 mutex->p = g_rec_mutex_impl_new ();
813 - gvfs-overview.png \ 270 }
814 - menu-example.png \ 271
815 - menu-model.png 272 void
816 - 273 g_rec_mutex_clear (GRecMutex *mutex)
817 -content_files = \ 274 {
818 - version.xml \ 275 + if (!g_threads_is_initialized)
819 - overview.xml \ 276 + g_thread_win32_init ();
820 - migrating-posix.xml \ 277 +
821 - migrating-gnome-vfs.xml \ 278 g_rec_mutex_impl_free (mutex->p);
822 - migrating-gconf.xml \ 279 }
823 - migrating-gdbus.xml \ 280
824 - gio-querymodules.xml \ 281 void
825 - glib-compile-schemas.xml\ 282 g_rec_mutex_lock (GRecMutex *mutex)
826 - glib-compile-resources.xml \ 283 {
827 - gsettings.xml \ 284 + if (!g_threads_is_initialized)
828 - gresource.xml \ 285 + g_thread_win32_init ();
829 - gdbus.xml \ 286 +
830 - gdbus-codegen.xml \ 287 EnterCriticalSection (g_rec_mutex_get_impl (mutex));
831 - $(NULL) 288 }
832 - 289
833 -expand_content_files = \ 290 void
834 - overview.xml \ 291 g_rec_mutex_unlock (GRecMutex *mutex)
835 - migrating-posix.xml \ 292 {
836 - migrating-gnome-vfs.xml \ 293 + if (!g_threads_is_initialized)
837 - migrating-gconf.xml \ 294 + g_thread_win32_init ();
838 - migrating-gdbus.xml \ 295 +
839 - gdbus-codegen.xml \ 296 LeaveCriticalSection (mutex->p);
840 - $(NULL) 297 }
841 - 298
842 -extra_files = \ 299 gboolean
843 - version.xml.in \ 300 g_rec_mutex_trylock (GRecMutex *mutex)
844 - gvfs-overview.odg 301 {
845 - 302 + if (!g_threads_is_initialized)
846 -# Extra options to supply to gtkdoc-fixref 303 + g_thread_win32_init ();
847 -FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html --extra-dir=$(srcdir)/../gobject/html 304 +
848 - 305 return TryEnterCriticalSection (g_rec_mutex_get_impl (mutex));
849 -include $(top_srcdir)/gtk-doc.make 306 }
850 - 307
851 -EXTRA_DIST += \ 308 @@ -221,12 +265,18 @@
852 - version.xml.in 309 void
853 - 310 g_rw_lock_init (GRWLock *lock)
854 -man_MANS = 311 {
855 - 312 + if (!g_threads_is_initialized)
856 -if ENABLE_MAN 313 + g_thread_win32_init ();
857 - 314 +
858 -man_MANS += \ 315 g_thread_impl_vtable.InitializeSRWLock (lock);
859 - gio-querymodules.1 \ 316 }
860 - glib-compile-schemas.1 \ 317
861 - glib-compile-resources.1 \ 318 void
862 - gsettings.1 \ 319 g_rw_lock_clear (GRWLock *lock)
863 - gresource.1 \ 320 {
864 - gdbus.1 \ 321 + if (!g_threads_is_initialized)
865 - gdbus-codegen.1 322 + g_thread_win32_init ();
866 - 323 +
867 -XSLTPROC_FLAGS = \ 324 if (g_thread_impl_vtable.DeleteSRWLock != NULL)
868 - --nonet \ 325 g_thread_impl_vtable.DeleteSRWLock (lock);
869 - --stringparam man.output.quietly 1 \ 326 }
870 - --stringparam funcsynopsis.style ansi \ 327 @@ -234,36 +284,54 @@
871 - --stringparam man.th.extra1.suppress 1 \ 328 void
872 - --stringparam man.authors.section.enabled 0 \ 329 g_rw_lock_writer_lock (GRWLock *lock)
873 - --stringparam man.copyright.section.enabled 0 330 {
874 - 331 + if (!g_threads_is_initialized)
875 -.xml.1: 332 + g_thread_win32_init ();
876 - $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< 333 +
877 - 334 g_thread_impl_vtable.AcquireSRWLockExclusive (lock);
878 -endif 335 }
879 - 336
880 -CLEANFILES ?= 337 gboolean
881 -CLEANFILES += $(man_MANS) 338 g_rw_lock_writer_trylock (GRWLock *lock)
882 - 339 {
883 -EXTRA_DIST += $(man_MANS) 340 + if (!g_threads_is_initialized)
884 - 341 + g_thread_win32_init ();
885 -dist-hook-local: all-local 342 +
886 - 343 return g_thread_impl_vtable.TryAcquireSRWLockExclusive (lock);
887 -gio-docs-clean: clean 344 }
888 - cd $(srcdir) && rm -rf xml html 345
889 diff -urN a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am 346 void
890 --- a/docs/reference/glib/Makefile.am 2013-06-10 00:03:17.000000000 +0200 347 g_rw_lock_writer_unlock (GRWLock *lock)
891 +++ b/docs/reference/glib/Makefile.am 1970-01-01 01:00:00.000000000 +0100 348 {
892 @@ -1,128 +0,0 @@ 349 + if (!g_threads_is_initialized)
893 -## Process this file with automake to produce Makefile.in 350 + g_thread_win32_init ();
894 -include $(top_srcdir)/Makefile.decl 351 +
895 - 352 g_thread_impl_vtable.ReleaseSRWLockExclusive (lock);
896 -AUTOMAKE_OPTIONS = 1.6 353 }
897 - 354
898 -# The name of the module. 355 void
899 -DOC_MODULE=glib 356 g_rw_lock_reader_lock (GRWLock *lock)
900 - 357 {
901 -# The top-level SGML file. 358 + if (!g_threads_is_initialized)
902 -DOC_MAIN_SGML_FILE=glib-docs.xml 359 + g_thread_win32_init ();
903 - 360 +
904 -# The directory containing the source code. Relative to $(srcdir) 361 g_thread_impl_vtable.AcquireSRWLockShared (lock);
905 -DOC_SOURCE_DIR=$(top_srcdir)/glib $(top_srcdir)/gmodule 362 }
906 - 363
907 -# Extra options to supply to gtkdoc-scan 364 gboolean
908 -SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" --ignore-decorators="GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT" 365 g_rw_lock_reader_trylock (GRWLock *lock)
909 - 366 {
910 -# Extra options to supply to gtkdoc-mkdb 367 + if (!g_threads_is_initialized)
911 -MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=g 368 + g_thread_win32_init ();
912 - 369 +
913 -# Used for dependencies 370 return g_thread_impl_vtable.TryAcquireSRWLockShared (lock);
914 -HFILE_GLOB=$(top_srcdir)/glib/*.h $(top_srcdir)/gmodule/*.h 371 }
915 -CFILE_GLOB=$(top_srcdir)/glib/*.c $(top_srcdir)/gmodule/*.c 372
916 - 373 void
917 -# Ignore some private headers 374 g_rw_lock_reader_unlock (GRWLock *lock)
918 -IGNORE_HFILES = \ 375 {
919 - gallocator.h \ 376 + if (!g_threads_is_initialized)
920 - gdatasetprivate.h \ 377 + g_thread_win32_init ();
921 - glibintl.h \ 378 +
922 - gbsearcharray.h \ 379 g_thread_impl_vtable.ReleaseSRWLockShared (lock);
923 - glib-private.h \ 380 }
924 - gmoduleconf.h \ 381
925 - gthreadprivate.h \ 382 @@ -271,12 +339,18 @@
926 - gunibreak.h \ 383 void
927 - gunicomp.h \ 384 g_cond_init (GCond *cond)
928 - gunidecomp.h \ 385 {
929 - gunichartables.h \ 386 + if (!g_threads_is_initialized)
930 - glib_probes.h \ 387 + g_thread_win32_init ();
931 - glib_trace.h \ 388 +
932 - libcharset.h \ 389 g_thread_impl_vtable.InitializeConditionVariable (cond);
933 - gdebug.h \ 390 }
934 - gprintfint.h \ 391
935 - gmirroringtable.h \ 392 void
936 - gscripttable.h \ 393 g_cond_clear (GCond *cond)
937 - glib-mirroring-tab \ 394 {
938 - gnulib \ 395 + if (!g_threads_is_initialized)
939 - pcre \ 396 + g_thread_win32_init ();
940 - update-pcre \ 397 +
941 - gbytesprivate.h \ 398 if (g_thread_impl_vtable.DeleteConditionVariable)
942 - gvariant-internal.h \ 399 g_thread_impl_vtable.DeleteConditionVariable (cond);
943 - gvariant-serialiser.h \ 400 }
944 - gvariant-core.h \ 401 @@ -284,12 +358,18 @@
945 - gvarianttypeinfo.h \ 402 void
946 - gwakeup.h 403 g_cond_signal (GCond *cond)
947 - 404 {
948 -# Images to copy into HTML directory 405 + if (!g_threads_is_initialized)
949 -HTML_IMAGES = \ 406 + g_thread_win32_init ();
950 - file-name-encodings.png \ 407 +
951 - mainloop-states.gif 408 g_thread_impl_vtable.WakeConditionVariable (cond);
952 - 409 }
953 -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) 410
954 -content_files = \ 411 void
955 - cross.xml \ 412 g_cond_broadcast (GCond *cond)
956 - running.xml \ 413 {
957 - building.xml \ 414 + if (!g_threads_is_initialized)
958 - changes.xml \ 415 + g_thread_win32_init ();
959 - compiling.xml \ 416 +
960 - programming.xml \ 417 g_thread_impl_vtable.WakeAllConditionVariable (cond);
961 - resources.xml \ 418 }
962 - regex-syntax.xml \ 419
963 - version.xml \ 420 @@ -297,6 +377,9 @@
964 - glib-gettextize.xml \ 421 g_cond_wait (GCond *cond,
965 - gtester.xml \ 422 GMutex *entered_mutex)
966 - gtester-report.xml \ 423 {
967 - gvariant-varargs.xml \ 424 + if (!g_threads_is_initialized)
968 - gvariant-text.xml 425 + g_thread_win32_init ();
969 - 426 +
970 -expand_content_files = \ 427 g_thread_impl_vtable.SleepConditionVariableSRW (cond, entered_mutex, INFINITE, 0);
971 - compiling.xml 428 }
972 - 429
973 -# Extra options to supply to gtkdoc-fixref 430 @@ -307,6 +390,9 @@
974 -FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../gobject/html --extra-dir=$(srcdir)/../gio/html 431 {
975 - 432 gint64 span;
976 -# include common portion ... 433
977 -include $(top_srcdir)/gtk-doc.make 434 + if (!g_threads_is_initialized)
978 - 435 + g_thread_win32_init ();
979 -# Other files to distribute 436 +
980 -EXTRA_DIST += \ 437 span = end_time - g_get_monotonic_time ();
981 - file-name-encodings.png \ 438
982 - file-name-encodings.sxd \ 439 if G_UNLIKELY (span < 0)
983 - mainloop-states.fig \ 440 @@ -339,6 +425,9 @@
984 - mainloop-states.png \ 441
985 - mainloop-states.eps \ 442 if G_UNLIKELY (impl == 0)
986 - version.xml.in 443 {
987 - 444 + if (!g_threads_is_initialized)
988 -######################################################################## 445 + g_thread_win32_init ();
989 - 446 +
990 -man_MANS = 447 EnterCriticalSection (&g_private_lock);
991 - 448 impl = (DWORD) key->p;
992 -if ENABLE_MAN 449 if (impl == 0)
993 - 450 @@ -432,6 +521,9 @@
994 -man_MANS += \ 451 {
995 - glib-gettextize.1 \ 452 GThreadWin32 *wt = (GThreadWin32 *) thread;
996 - gtester.1 \ 453
997 - gtester-report.1 454 + if (!g_threads_is_initialized)
998 - 455 + g_thread_win32_init ();
999 -XSLTPROC_FLAGS = \ 456 +
1000 - --nonet \ 457 win32_check_for_error (CloseHandle (wt->handle));
1001 - --stringparam man.output.quietly 1 \ 458 g_slice_free (GThreadWin32, wt);
1002 - --stringparam funcsynopsis.style ansi \ 459 }
1003 - --stringparam man.th.extra1.suppress 1 \ 460 @@ -439,6 +531,9 @@
1004 - --stringparam man.authors.section.enabled 0 \ 461 void
1005 - --stringparam man.copyright.section.enabled 0 462 g_system_thread_exit (void)
1006 - 463 {
1007 -.xml.1: 464 + if (!g_threads_is_initialized)
1008 - $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< 465 + g_thread_win32_init ();
1009 - 466 +
1010 -endif 467 _endthreadex (0);
1011 - 468 }
1012 -CLEANFILES ?= 469
1013 -CLEANFILES += $(man_MANS) 470 @@ -447,6 +542,9 @@
1014 - 471 {
1015 -EXTRA_DIST += $(man_MANS) 472 GThreadWin32 *self = data;
1016 - 473
1017 -dist-hook-local: all-local 474 + if (!g_threads_is_initialized)
1018 - 475 + g_thread_win32_init ();
1019 -glib-docs-clean: clean 476 +
1020 - cd $(srcdir) && rm -rf xml html 477 self->proxy (self);
1021 diff -urN a/docs/reference/gobject/Makefile.am b/docs/reference/gobject/Makefile.am 478
1022 --- a/docs/reference/gobject/Makefile.am 2013-06-10 00:03:17.000000000 +0200 479 g_system_thread_exit ();
1023 +++ b/docs/reference/gobject/Makefile.am 1970-01-01 01:00:00.000000000 +0100 480 @@ -464,6 +562,9 @@
1024 @@ -1,104 +0,0 @@ 481 GThreadWin32 *thread;
1025 -## Process this file with automake to produce Makefile.in 482 guint ignore;
1026 -include $(top_srcdir)/Makefile.decl 483
1027 - 484 + if (!g_threads_is_initialized)
1028 -AUTOMAKE_OPTIONS = 1.6 485 + g_thread_win32_init ();
1029 - 486 +
1030 -# The name of the module. 487 thread = g_slice_new0 (GThreadWin32);
1031 -DOC_MODULE=gobject 488 thread->proxy = func;
1032 - 489
1033 -# The top-level SGML file. 490 @@ -493,6 +594,9 @@
1034 -DOC_MAIN_SGML_FILE=gobject-docs.xml 491 {
1035 - 492 GThreadWin32 *wt = (GThreadWin32 *) thread;
1036 -# The directory containing the source code. Relative to $(srcdir) 493
1037 -DOC_SOURCE_DIR=$(top_srcdir)/gobject 494 + if (!g_threads_is_initialized)
1038 - 495 + g_thread_win32_init ();
1039 -# Extra options to supply to gtkdoc-scan 496 +
1040 -SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \ 497 win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
1041 - --ignore-decorators="G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT" 498 }
1042 - 499
1043 -# Extra options to supply to gtkdoc-mkdb 500 @@ -1041,6 +1145,8 @@
1044 -MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=g 501 void
1045 - 502 g_thread_win32_init (void)
1046 -# Used for dependencies 503 {
1047 -HFILE_GLOB=$(top_srcdir)/gobject/*.h 504 + g_threads_is_initialized = TRUE;
1048 -CFILE_GLOB=$(top_srcdir)/gobject/*.c 505 +
1049 - 506 if (!g_thread_lookup_native_funcs ())
1050 -# Headers to ignore 507 g_thread_xp_init ();
1051 -IGNORE_HFILES = \ 508
1052 - tests \ 509 Only in glib-2.48.1/glib: gthread-win32.c.orig
1053 - gobject_trace.h \ 510 diff -ur glib-2.48.1.orig/glib-2.0.pc.in glib-2.48.1/glib-2.0.pc.in
1054 - gtype-private.h \ 511 --- glib-2.48.1.orig/glib-2.0.pc.in 2016-12-25 13:21:25.734080512 -0500
1055 - gatomicarray.h 512 +++ glib-2.48.1/glib-2.0.pc.in 2016-12-25 13:22:17.469289278 -0500
1056 - 513 @@ -3,9 +3,9 @@
1057 - 514 libdir=@libdir@
1058 -# CFLAGS and LDFLAGS for compiling scan program. Only needed 515 includedir=@includedir@
1059 -# if $(DOC_MODULE).types is non-empty. 516
1060 -AM_CPPFLAGS = \ 517 -glib_genmarshal=glib-genmarshal
1061 - -I$(srcdir) \ 518 -gobject_query=gobject-query
1062 - $(gobject_INCLUDES) \ 519 -glib_mkenums=glib-mkenums
1063 - $(GLIB_DEBUG_FLAGS) 520 +glib_genmarshal=@bindir@/glib-genmarshal
1064 - 521 +gobject_query=@bindir@/gobject-query
1065 -GTKDOC_LIBS = \ 522 +glib_mkenums=@bindir@/glib-mkenums
1066 - $(top_builddir)/glib/libglib-2.0.la \ 523
1067 - $(top_builddir)/gobject/libgobject-2.0.la 524 Name: GLib
1068 - 525 Description: C Utility Library
1069 -# Images to copy into HTML directory 526 Only in glib-2.48.1: Makefile.am.orig
1070 -HTML_IMAGES = \ 527 Only in glib-2.48.1: Makefile.am.rej
1071 - images/glue.png
1072 -
1073 -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
1074 -content_files = version.xml \
1075 - glib-mkenums.xml \
1076 - glib-genmarshal.xml \
1077 - gobject-query.xml \
1078 - tut_gobject.xml \
1079 - tut_gsignal.xml \
1080 - tut_gtype.xml \
1081 - tut_howto.xml \
1082 - tut_intro.xml \
1083 - tut_tools.xml
1084 -
1085 -# Extra options to supply to gtkdoc-fixref
1086 -FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html
1087 -
1088 -include $(top_srcdir)/gtk-doc.make
1089 -
1090 -# Other files to distribute
1091 -EXTRA_DIST += \
1092 - gobject.cI \
1093 - version.xml.in
1094 -
1095 -########################################################################
1096 -
1097 -man_MANS =
1098 -
1099 -if ENABLE_MAN
1100 -
1101 -man_MANS += \
1102 - glib-mkenums.1 \
1103 - glib-genmarshal.1 \
1104 - gobject-query.1
1105 -
1106 -
1107 -XSLTPROC_FLAGS = \
1108 - --nonet \
1109 - --stringparam man.output.quietly 1 \
1110 - --stringparam funcsynopsis.style ansi \
1111 - --stringparam man.th.extra1.suppress 1 \
1112 - --stringparam man.authors.section.enabled 0 \
1113 - --stringparam man.copyright.section.enabled 0
1114 -
1115 -.xml.1:
1116 - $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
1117 -
1118 -endif
1119 -
1120 -CLEANFILES ?=
1121 -CLEANFILES += $(man_MANS)
1122 -
1123 -EXTRA_DIST += $(man_MANS)
1124 -
1125 -dist-hook-local: all-local
1126 -
1127 -gobject-docs-clean: clean
1128 - cd $(srcdir) && rm -rf xml html
1129 diff -urN a/docs/reference/Makefile.am b/docs/reference/Makefile.am
1130 --- a/docs/reference/Makefile.am 2013-06-10 00:03:17.000000000 +0200
1131 +++ b/docs/reference/Makefile.am 1970-01-01 01:00:00.000000000 +0100
1132 @@ -1,3 +0,0 @@
1133 -include $(top_srcdir)/Makefile.decl
1134 -
1135 -SUBDIRS = glib gobject gio
1136 diff -urN a/Makefile.am b/Makefile.am
1137 --- a/Makefile.am 2013-06-10 00:03:17.000000000 +0200
1138 +++ b/Makefile.am 2013-06-29 05:50:18.224749533 +0200
1139 @@ -6,7 +6,7 @@
1140
1141 ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
1142
1143 -SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs
1144 +SUBDIRS = . m4macros glib gmodule gthread gobject gio po
1145 DIST_SUBDIRS = $(SUBDIRS) build
1146 if BUILD_MODULAR_TESTS
1147 SUBDIRS += tests
1148 @@ -71,8 +71,7 @@
1149 README \
1150 INSTALL \
1151 ChangeLog \
1152 - config.h.win32 \
1153 - gtk-doc.make
1154 + config.h.win32
1155
1156 CONFIGURE_DEPENDENCIES = acglib.m4
1157