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