# HG changeset patch # User Michael Goffioul # Date 1373666113 14400 # Node ID 2733829a184e272f710aba300e2100bde4016ce4 # Parent 1a25ea16434bfd21e86b155483226fa9facdcc39 [MSVC] enable glib compilation - update glib package to 2.36.3 - move old glib patch to mingw-glib-1-fixes.patch; this is a temporary solution, the patch contains many things that are not needed when cross-compiling static libraries diff -r 1a25ea16434b -r 2733829a184e dist-files.mk --- a/dist-files.mk Fri Jul 12 11:19:31 2013 -0400 +++ b/dist-files.mk Fri Jul 12 17:55:13 2013 -0400 @@ -280,6 +280,7 @@ msvc-fltk-1.patch \ msvc-fontconfig-1.patch \ msvc-gettext-1.patch \ + msvc-glib-1.patch \ msvc-gnutls-1.patch \ msvc-graphicsmagick-1.patch \ msvc-hdf5-1.patch \ diff -r 1a25ea16434b -r 2733829a184e index.html --- a/index.html Fri Jul 12 11:19:31 2013 -0400 +++ b/index.html Fri Jul 12 17:55:13 2013 -0400 @@ -1240,7 +1240,7 @@ glib - 2.34.0 + 2.36.3 GLib diff -r 1a25ea16434b -r 2733829a184e src/glib-1-fixes.patch --- a/src/glib-1-fixes.patch Fri Jul 12 11:19:31 2013 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1189 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Contains ad hoc patches for cross building. - -From eacb3702acc44de8e5a3c9a324cb9a81333e3737 Mon Sep 17 00:00:00 2001 -From: "a@mxe.cc" -Date: Thu, 23 Sep 2010 21:41:51 +0200 -Subject: [PATCH 1/8] optional gettext - - -diff --git a/configure.ac b/configure.ac -index 054485f..9321fbc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -482,8 +482,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 c710046..269bfdf 100644 ---- a/glib/gi18n.h -+++ b/glib/gi18n.h -@@ -22,7 +22,12 @@ - - #include - -+#ifdef ENABLE_NLS - #include -+#else -+#define gettext(String) (String) -+#endif -+ - #include - - #define _(String) gettext (String) --- -1.7.10.4 - - -From c88a15fbac3076f772894ebcd2003786b37603d4 Mon Sep 17 00:00:00 2001 -From: "a@mxe.cc" -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 4a8898e..5164bae 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.7.10.4 - - -From fdf03eb9fff0532fa6dea660a5665242f6ccac9e Mon Sep 17 00:00:00 2001 -From: Hans Petter Jansson -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 37a9e70..2e5ef9b 100644 ---- a/gio/giomodule.c -+++ b/gio/giomodule.c -@@ -782,10 +782,8 @@ extern GType _g_network_monitor_netlink_get_type (void); - - static HMODULE gio_dll = NULL; - --#ifdef DLL_EXPORT -- - BOOL WINAPI --DllMain (HINSTANCE hinstDLL, -+gio_DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved) - { -@@ -801,8 +799,6 @@ _g_io_win32_get_module (void) - return gio_dll; - } - --#endif -- - #undef GIO_MODULE_DIR - - /* GIO_MODULE_DIR is used only in code called just once, -diff --git a/glib/glib-init.c b/glib/glib-init.c -index f4edd5c..02bf678 100644 ---- a/glib/glib-init.c -+++ b/glib/glib-init.c -@@ -226,9 +226,9 @@ glib_init (void) - HMODULE glib_dll; - - BOOL WINAPI --DllMain (HINSTANCE hinstDLL, -- DWORD fdwReason, -- LPVOID lpvReserved) -+glib_DllMain (HINSTANCE hinstDLL, -+ DWORD fdwReason, -+ LPVOID lpvReserved) - { - switch (fdwReason) - { --- -1.7.10.4 - - -From 64c337b9654441cc1b90ed3ac86f928073ec208e Mon Sep 17 00:00:00 2001 -From: Hans Petter Jansson -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 9321fbc..5c6bb3e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1712,11 +1712,18 @@ dnl ***************************** - dnl ** Check for inotify (GIO) ** - dnl ***************************** - inotify_support=no --AC_CHECK_HEADERS([sys/inotify.h], --[ -+ -+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], -+ [ - inotify_support=yes - AC_CHECK_FUNCS(inotify_init1) --]) -+ ]) -+fi - - AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"]) - --- -1.7.10.4 - - -From c80c435bd8d92857eeb54273024ca8782fa089c6 Mon Sep 17 00:00:00 2001 -From: Hans Petter Jansson -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 5c6bb3e..8754c21 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -455,6 +455,8 @@ fi - - AC_MSG_RESULT($enable_iconv_cache) - -+# Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF -+AS_IF([false], [AC_CHECK_HEADER([stdint.h])]) - - dnl - dnl zlib support --- -1.7.10.4 - - -From e7e2c1c881813a2a17bfec7b63c673eb979b3833 Mon Sep 17 00:00:00 2001 -From: Hans Petter Jansson -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 9f7123f..b0d5779 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 - Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@ - Cflags: --- -1.7.10.4 - - -From c1f83b6ae587c99fefd482d0b1bfbe1d962320d4 Mon Sep 17 00:00:00 2001 -From: Hans Petter Jansson -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 c0c4581..bef8b99 100644 ---- a/glib/gmain.c -+++ b/glib/gmain.c -@@ -2157,12 +2157,15 @@ g_get_real_time (void) - #ifdef G_OS_WIN32 - static ULONGLONG (*g_GetTickCount64) (void) = NULL; - static guint32 g_win32_tick_epoch = 0; -+static gboolean g_win32_clock_is_initialized; - - G_GNUC_INTERNAL void - g_clock_win32_init (void) - { - HMODULE kernel32; - -+ g_win32_clock_is_initialized = TRUE; -+ - g_GetTickCount64 = NULL; - kernel32 = GetModuleHandle ("KERNEL32.DLL"); - if (kernel32 != NULL) -@@ -2281,6 +2284,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 5a9ac97..e4d1d48 100644 ---- a/glib/gthread-win32.c -+++ b/glib/gthread-win32.c -@@ -117,18 +117,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); - } -@@ -136,18 +146,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); - } - -@@ -158,6 +177,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); - -@@ -168,6 +190,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); - } - -@@ -176,6 +202,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 (); -@@ -190,30 +219,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)); - } - -@@ -222,12 +266,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); - } -@@ -235,36 +285,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); - } - -@@ -272,12 +340,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); - } -@@ -285,12 +359,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); - } - -@@ -298,6 +378,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); - } - -@@ -308,6 +391,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) -@@ -340,6 +426,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) -@@ -433,6 +522,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); - } -@@ -440,6 +532,9 @@ g_system_thread_free (GRealThread *thread) - void - g_system_thread_exit (void) - { -+ if (!g_threads_is_initialized) -+ g_thread_win32_init (); -+ - _endthreadex (0); - } - -@@ -448,6 +543,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 (); -@@ -465,6 +563,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; - -@@ -494,6 +595,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)); - } - -@@ -985,6 +1089,8 @@ g_thread_lookup_native_funcs (void) - G_GNUC_INTERNAL void - g_thread_win32_init (void) - { -+ g_threads_is_initialized = TRUE; -+ - if (!g_thread_lookup_native_funcs ()) - g_thread_xp_init (); - --- -1.7.10.4 - - -From f7b3f3f390131d41855da11622eb18870aec0731 Mon Sep 17 00:00:00 2001 -From: Mark Brand -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 55be9d2..f000f10 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -6,7 +6,7 @@ include $(top_srcdir)/Makefile.decl - - ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} - --SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs -+SUBDIRS = . m4macros glib gmodule gthread gobject gio po - DIST_SUBDIRS = $(SUBDIRS) build - if BUILD_MODULAR_TESTS - SUBDIRS += tests -@@ -67,8 +67,7 @@ BUILT_EXTRA_DIST = \ - README \ - INSTALL \ - ChangeLog \ -- config.h.win32 \ -- gtk-doc.make -+ config.h.win32 - - CONFIGURE_DEPENDENCIES = acglib.m4 - -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 < /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 63cf90d..0000000 ---- a/docs/reference/Makefile.am -+++ /dev/null -@@ -1,3 +0,0 @@ --include $(top_srcdir)/Makefile.decl -- --SUBDIRS = glib gobject gio -diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am -deleted file mode 100644 -index 64d95fe..0000000 ---- a/docs/reference/gio/Makefile.am -+++ /dev/null -@@ -1,179 +0,0 @@ --include $(top_srcdir)/Makefile.decl --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 \ -- gpollfilemonitor.h \ -- gregistrysettingsbackend.h \ -- gsettingsbackendinternal.h \ -- gsettings-mapping.h \ -- gsettingsschema-internal.h \ -- gsocketinputstream.h \ -- gsocketoutputstream.h \ -- gsocks4aproxy.h \ -- gsocks4proxy.h \ -- gsocks5proxy.h \ -- gthreadedresolver.h \ -- gunionvolumemonitor.h \ -- gunixmount.h \ -- gunixresolver.h \ -- gunixvolume.h \ -- gunixvolumemonitor.h \ -- gwin32appinfo.h \ -- gwin32mount.h \ -- gwin32resolver.h \ -- gwin32volumemonitor.h -- -- --# CFLAGS and LDFLAGS for compiling scan program. Only needed --# if $(DOC_MODULE).types is non-empty. --INCLUDES = \ -- $(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 --sgml-mode --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 \ -- 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 += \ -- 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 90c10aa..0000000 ---- a/docs/reference/gio/gdbus-object-manager-example/Makefile.am -+++ /dev/null -@@ -1,68 +0,0 @@ --include $(top_srcdir)/Makefile.decl --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. --INCLUDES = \ -- $(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 54918c8..0000000 ---- a/docs/reference/glib/Makefile.am -+++ /dev/null -@@ -1,128 +0,0 @@ --## Process this file with automake to produce Makefile.in --include $(top_srcdir)/Makefile.decl -- --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=--sgml-mode --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 -- --# 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 \ -- 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 48d88f8..0000000 ---- a/docs/reference/gobject/Makefile.am -+++ /dev/null -@@ -1,103 +0,0 @@ --## Process this file with automake to produce Makefile.in --include $(top_srcdir)/Makefile.decl -- --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=--sgml-mode --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. --INCLUDES = \ -- -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 --- -1.7.10.4 - diff -r 1a25ea16434b -r 2733829a184e src/glib.mk --- a/src/glib.mk Fri Jul 12 11:19:31 2013 -0400 +++ b/src/glib.mk Fri Jul 12 17:55:13 2013 -0400 @@ -3,7 +3,7 @@ PKG := glib $(PKG)_IGNORE := -$(PKG)_CHECKSUM := f695d4d3a6ded331e4d45f077a9774d6ca8a47e4 +$(PKG)_CHECKSUM := aafba69934b9ba77cc8cb0e5d8105aa1d8463eba $(PKG)_SUBDIR := glib-$($(PKG)_VERSION) $(PKG)_FILE := glib-$($(PKG)_VERSION).tar.xz $(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) @@ -58,6 +58,22 @@ $(LN_SF) `which glib-compile-resources` '$(HOST_BINDIR)' endef +ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) +define $(PKG)_BUILD + cd '$(1)' && PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' ./configure \ + $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ + $(ENABLE_SHARED_OR_STATIC) \ + --prefix='$(HOST_PREFIX)' \ + --with-threads=win32 \ + --with-pcre=system \ + --with-libiconv=gnu \ + --disable-modular-tests \ + && $(CONFIGURE_POST_HOOK) + + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef +else define $(PKG)_BUILD cd '$(1)' && ./autogen.sh rm -f '$(HOST_BINDIR)/glib-*' @@ -88,3 +104,4 @@ $(MAKE) -C '$(1)/gio' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= MISC_STUFF= $(MAKE) -C '$(1)' -j '$(JOBS)' install-pkgconfigDATA endef +endif diff -r 1a25ea16434b -r 2733829a184e src/mingw-glib-1-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/mingw-glib-1-fixes.patch Fri Jul 12 17:55:13 2013 -0400 @@ -0,0 +1,1189 @@ +This file is part of MXE. +See index.html for further information. + +Contains ad hoc patches for cross building. + +From eacb3702acc44de8e5a3c9a324cb9a81333e3737 Mon Sep 17 00:00:00 2001 +From: "a@mxe.cc" +Date: Thu, 23 Sep 2010 21:41:51 +0200 +Subject: [PATCH 1/8] optional gettext + + +diff --git a/configure.ac b/configure.ac +index 054485f..9321fbc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -482,8 +482,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 c710046..269bfdf 100644 +--- a/glib/gi18n.h ++++ b/glib/gi18n.h +@@ -22,7 +22,12 @@ + + #include + ++#ifdef ENABLE_NLS + #include ++#else ++#define gettext(String) (String) ++#endif ++ + #include + + #define _(String) gettext (String) +-- +1.7.10.4 + + +From c88a15fbac3076f772894ebcd2003786b37603d4 Mon Sep 17 00:00:00 2001 +From: "a@mxe.cc" +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 4a8898e..5164bae 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.7.10.4 + + +From fdf03eb9fff0532fa6dea660a5665242f6ccac9e Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson +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 37a9e70..2e5ef9b 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -782,10 +782,8 @@ extern GType _g_network_monitor_netlink_get_type (void); + + static HMODULE gio_dll = NULL; + +-#ifdef DLL_EXPORT +- + BOOL WINAPI +-DllMain (HINSTANCE hinstDLL, ++gio_DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) + { +@@ -801,8 +799,6 @@ _g_io_win32_get_module (void) + return gio_dll; + } + +-#endif +- + #undef GIO_MODULE_DIR + + /* GIO_MODULE_DIR is used only in code called just once, +diff --git a/glib/glib-init.c b/glib/glib-init.c +index f4edd5c..02bf678 100644 +--- a/glib/glib-init.c ++++ b/glib/glib-init.c +@@ -226,9 +226,9 @@ glib_init (void) + HMODULE glib_dll; + + BOOL WINAPI +-DllMain (HINSTANCE hinstDLL, +- DWORD fdwReason, +- LPVOID lpvReserved) ++glib_DllMain (HINSTANCE hinstDLL, ++ DWORD fdwReason, ++ LPVOID lpvReserved) + { + switch (fdwReason) + { +-- +1.7.10.4 + + +From 64c337b9654441cc1b90ed3ac86f928073ec208e Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson +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 9321fbc..5c6bb3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1712,11 +1712,18 @@ dnl ***************************** + dnl ** Check for inotify (GIO) ** + dnl ***************************** + inotify_support=no +-AC_CHECK_HEADERS([sys/inotify.h], +-[ ++ ++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], ++ [ + inotify_support=yes + AC_CHECK_FUNCS(inotify_init1) +-]) ++ ]) ++fi + + AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"]) + +-- +1.7.10.4 + + +From c80c435bd8d92857eeb54273024ca8782fa089c6 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson +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 5c6bb3e..8754c21 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -455,6 +455,8 @@ fi + + AC_MSG_RESULT($enable_iconv_cache) + ++# Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF ++AS_IF([false], [AC_CHECK_HEADER([stdint.h])]) + + dnl + dnl zlib support +-- +1.7.10.4 + + +From e7e2c1c881813a2a17bfec7b63c673eb979b3833 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson +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 9f7123f..b0d5779 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 + Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@ + Cflags: +-- +1.7.10.4 + + +From c1f83b6ae587c99fefd482d0b1bfbe1d962320d4 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson +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 c0c4581..bef8b99 100644 +--- a/glib/gmain.c ++++ b/glib/gmain.c +@@ -2157,12 +2157,15 @@ g_get_real_time (void) + #ifdef G_OS_WIN32 + static ULONGLONG (*g_GetTickCount64) (void) = NULL; + static guint32 g_win32_tick_epoch = 0; ++static gboolean g_win32_clock_is_initialized; + + G_GNUC_INTERNAL void + g_clock_win32_init (void) + { + HMODULE kernel32; + ++ g_win32_clock_is_initialized = TRUE; ++ + g_GetTickCount64 = NULL; + kernel32 = GetModuleHandle ("KERNEL32.DLL"); + if (kernel32 != NULL) +@@ -2281,6 +2284,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 5a9ac97..e4d1d48 100644 +--- a/glib/gthread-win32.c ++++ b/glib/gthread-win32.c +@@ -117,18 +117,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); + } +@@ -136,18 +146,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); + } + +@@ -158,6 +177,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); + +@@ -168,6 +190,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); + } + +@@ -176,6 +202,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 (); +@@ -190,30 +219,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)); + } + +@@ -222,12 +266,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); + } +@@ -235,36 +285,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); + } + +@@ -272,12 +340,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); + } +@@ -285,12 +359,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); + } + +@@ -298,6 +378,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); + } + +@@ -308,6 +391,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) +@@ -340,6 +426,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) +@@ -433,6 +522,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); + } +@@ -440,6 +532,9 @@ g_system_thread_free (GRealThread *thread) + void + g_system_thread_exit (void) + { ++ if (!g_threads_is_initialized) ++ g_thread_win32_init (); ++ + _endthreadex (0); + } + +@@ -448,6 +543,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 (); +@@ -465,6 +563,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; + +@@ -494,6 +595,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)); + } + +@@ -985,6 +1089,8 @@ g_thread_lookup_native_funcs (void) + G_GNUC_INTERNAL void + g_thread_win32_init (void) + { ++ g_threads_is_initialized = TRUE; ++ + if (!g_thread_lookup_native_funcs ()) + g_thread_xp_init (); + +-- +1.7.10.4 + + +From f7b3f3f390131d41855da11622eb18870aec0731 Mon Sep 17 00:00:00 2001 +From: Mark Brand +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 55be9d2..f000f10 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,7 +6,7 @@ include $(top_srcdir)/Makefile.decl + + ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} + +-SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs ++SUBDIRS = . m4macros glib gmodule gthread gobject gio po + DIST_SUBDIRS = $(SUBDIRS) build + if BUILD_MODULAR_TESTS + SUBDIRS += tests +@@ -67,8 +67,7 @@ BUILT_EXTRA_DIST = \ + README \ + INSTALL \ + ChangeLog \ +- config.h.win32 \ +- gtk-doc.make ++ config.h.win32 + + CONFIGURE_DEPENDENCIES = acglib.m4 + +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 < /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 63cf90d..0000000 +--- a/docs/reference/Makefile.am ++++ /dev/null +@@ -1,3 +0,0 @@ +-include $(top_srcdir)/Makefile.decl +- +-SUBDIRS = glib gobject gio +diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am +deleted file mode 100644 +index 64d95fe..0000000 +--- a/docs/reference/gio/Makefile.am ++++ /dev/null +@@ -1,179 +0,0 @@ +-include $(top_srcdir)/Makefile.decl +-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 \ +- gpollfilemonitor.h \ +- gregistrysettingsbackend.h \ +- gsettingsbackendinternal.h \ +- gsettings-mapping.h \ +- gsettingsschema-internal.h \ +- gsocketinputstream.h \ +- gsocketoutputstream.h \ +- gsocks4aproxy.h \ +- gsocks4proxy.h \ +- gsocks5proxy.h \ +- gthreadedresolver.h \ +- gunionvolumemonitor.h \ +- gunixmount.h \ +- gunixresolver.h \ +- gunixvolume.h \ +- gunixvolumemonitor.h \ +- gwin32appinfo.h \ +- gwin32mount.h \ +- gwin32resolver.h \ +- gwin32volumemonitor.h +- +- +-# CFLAGS and LDFLAGS for compiling scan program. Only needed +-# if $(DOC_MODULE).types is non-empty. +-INCLUDES = \ +- $(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 --sgml-mode --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 \ +- 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 += \ +- 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 90c10aa..0000000 +--- a/docs/reference/gio/gdbus-object-manager-example/Makefile.am ++++ /dev/null +@@ -1,68 +0,0 @@ +-include $(top_srcdir)/Makefile.decl +-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. +-INCLUDES = \ +- $(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 54918c8..0000000 +--- a/docs/reference/glib/Makefile.am ++++ /dev/null +@@ -1,128 +0,0 @@ +-## Process this file with automake to produce Makefile.in +-include $(top_srcdir)/Makefile.decl +- +-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=--sgml-mode --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 +- +-# 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 \ +- 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 48d88f8..0000000 +--- a/docs/reference/gobject/Makefile.am ++++ /dev/null +@@ -1,103 +0,0 @@ +-## Process this file with automake to produce Makefile.in +-include $(top_srcdir)/Makefile.decl +- +-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=--sgml-mode --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. +-INCLUDES = \ +- -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 +-- +1.7.10.4 + diff -r 1a25ea16434b -r 2733829a184e src/msvc-glib-1.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/msvc-glib-1.patch Fri Jul 12 17:55:13 2013 -0400 @@ -0,0 +1,459 @@ +diff -ur glib-2.36.3-orig/Makefile.in glib-2.36.3/Makefile.in +--- glib-2.36.3-orig/Makefile.in 2013-06-09 18:53:44 -0400 ++++ glib-2.36.3/Makefile.in 2013-07-12 14:13:58 -0400 +@@ -686,7 +686,7 @@ + gio-unix-2.0.pc.in gio-windows-2.0.pc.in check-abis.sh + TEST_PROGS = + ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} +-SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs \ ++SUBDIRS = . m4macros glib gmodule gthread gobject gio po \ + $(am__append_1) + DIST_SUBDIRS = $(SUBDIRS) build $(am__append_2) + bin_SCRIPTS = glib-gettextize +diff -ur glib-2.36.3-orig/configure glib-2.36.3/configure +--- glib-2.36.3-orig/configure 2013-06-09 18:53:42 -0400 ++++ glib-2.36.3/configure 2013-07-12 11:53:11 -0400 +@@ -28768,7 +28768,7 @@ + case "$host" in + *-*-mingw*) + +-$as_echo "#define _GLIB_EXTERN __attribute__((visibility(\"default\"))) __declspec(dllexport) extern" >>confdefs.h ++$as_echo "#define _GLIB_EXTERN __declspec(dllexport)" >>confdefs.h + +- CFLAGS="${CFLAGS} -fvisibility=hidden" ++ #CFLAGS="${CFLAGS} -fvisibility=hidden" + ;; +diff -ur glib-2.36.3-orig/depcomp glib-2.36.3/depcomp +--- glib-2.36.3-orig/depcomp 2013-06-09 18:53:47 -0400 ++++ glib-2.36.3/depcomp 2013-07-12 12:51:38 -0400 +@@ -542,7 +542,7 @@ + s//\1/ + s/\\/\\\\/g + p +-}' | $cygpath_u | sort -u | sed -n ' ++}' | $cygpath_u | /bin/sort -u | sed -n ' + s/ /\\ /g + s/\(.*\)/'"$tab"'\1 \\/p + s/.\(.*\) \\/\1:/ +@@ -751,7 +751,7 @@ + esac + done + "$@" -E 2>/dev/null | +- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" ++ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | /bin/sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" +diff -ur glib-2.36.3-orig/gio/Makefile.in glib-2.36.3/gio/Makefile.in +--- glib-2.36.3-orig/gio/Makefile.in 2013-06-09 18:53:45 -0400 ++++ glib-2.36.3/gio/Makefile.in 2013-07-12 13:09:58 -0400 +@@ -861,9 +861,9 @@ + SUBDIRS = gdbus-2.0/codegen $(am__append_1) $(am__append_4) \ + $(am__append_7) $(am__append_11) $(am__append_14) . \ + $(am__append_17) $(am__append_24) +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = gio-2.0.lib +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir) +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#noinst_DATA = gio-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir) ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib + AM_CPPFLAGS = -DG_LOG_DOMAIN=\"GLib-GIO\" $(gmodule_INCLUDES) \ + $(GLIB_DEBUG_FLAGS) -DGIO_COMPILATION \ + -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\" $(am__append_10) +@@ -1215,7 +1215,7 @@ + $(NULL) + + libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS) +-@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined ++@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined -export-symbols-regex "xXx" + @OS_WIN32_AND_DLL_COMPILATION_TRUE@gio_win32_res = gio-win32-res.o + @OS_WIN32_AND_DLL_COMPILATION_TRUE@gio_win32_res_ldflag = -Wl,$(gio_win32_res) + libgio_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) \ +diff -ur glib-2.36.3-orig/gio/tests/filter-cat.c glib-2.36.3/gio/tests/filter-cat.c +--- glib-2.36.3-orig/gio/tests/filter-cat.c 2013-06-02 19:20:53 -0400 ++++ glib-2.36.3/gio/tests/filter-cat.c 2013-07-12 13:27:31 -0400 +@@ -30,6 +30,15 @@ + #include + #include + ++#ifdef _MSC_VER ++# ifndef ssize_t ++ typedef int ssize_t; ++# endif ++# ifndef STDOUT_FILENO ++# define STDOUT_FILENO 1 ++# endif ++#endif ++ + static gchar **locations = NULL; + static char *from_charset = NULL; + static char *to_charset = NULL; +diff -ur glib-2.36.3-orig/gio/tests/gdbus-connection-loss.c glib-2.36.3/gio/tests/gdbus-connection-loss.c +--- glib-2.36.3-orig/gio/tests/gdbus-connection-loss.c 2013-06-09 18:03:17 -0400 ++++ glib-2.36.3/gio/tests/gdbus-connection-loss.c 2013-07-12 13:58:40 -0400 +@@ -124,7 +124,7 @@ + g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL)); + + /* wait for the service to come up */ +- usleep (500 * 1000); ++ g_usleep (500 * 1000); + + /* Create the connection in the main thread */ + error = NULL; +diff -ur glib-2.36.3-orig/gio/tests/gdbus-threading.c glib-2.36.3/gio/tests/gdbus-threading.c +--- glib-2.36.3-orig/gio/tests/gdbus-threading.c 2013-06-09 18:03:17 -0400 ++++ glib-2.36.3/gio/tests/gdbus-threading.c 2013-07-12 13:57:58 -0400 +@@ -590,7 +590,7 @@ + g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL)); + + /* wait for the service to come up */ +- usleep (500 * 1000); ++ g_usleep (500 * 1000); + + /* Create the connection in the main thread */ + error = NULL; +diff -ur glib-2.36.3-orig/glib/Makefile.in glib-2.36.3/glib/Makefile.in +--- glib-2.36.3-orig/glib/Makefile.in 2013-06-09 18:53:46 -0400 ++++ glib-2.36.3/glib/Makefile.in 2013-07-12 13:09:16 -0400 +@@ -669,8 +669,7 @@ + $(pcre_inc) \ + -DG_LOG_DOMAIN=\"GLib\" \ + $(GLIB_DEBUG_FLAGS) \ +- -DGLIB_COMPILATION \ +- -DPCRE_STATIC ++ -DGLIB_COMPILATION + + AM_CFLAGS = $(GLIB_WARN_CFLAGS) + MIRRORING_TAB_SOURCE = \ +@@ -687,9 +686,9 @@ + glib.rc + + lib_LTLIBRARIES = libglib-2.0.la +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = glib-2.0.lib +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir) +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#noinst_DATA = glib-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#install_ms_lib_cmd = $(INSTALL) glib-2.0.lib $(DESTDIR)$(libdir) ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/glib-2.0.lib + deprecated_sources = \ + deprecated/gallocator.c \ + deprecated/gcache.c \ +@@ -817,7 +816,7 @@ + gwin32.h \ + gprintf.h + +-@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined ++@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined -export-symbols-regex "xXx" + @OS_WIN32_AND_DLL_COMPILATION_TRUE@glib_win32_res = glib-win32-res.o + @OS_WIN32_AND_DLL_COMPILATION_TRUE@glib_win32_res_ldflag = -Wl,$(glib_win32_res) + @USE_SYSTEM_PCRE_FALSE@pcre_lib = pcre/libpcre.la +diff -ur glib-2.36.3-orig/glib/glib-init.c glib-2.36.3/glib/glib-init.c +--- glib-2.36.3-orig/glib/glib-init.c 2013-06-09 18:03:17 -0400 ++++ glib-2.36.3/glib/glib-init.c 2013-07-12 12:01:48 -0400 +@@ -31,6 +31,10 @@ + #include + #include + ++#if defined(_MSC_VER) && !defined(strcasecmp) ++# define strcasecmp _stricmp ++#endif ++ + /** + * g_mem_gc_friendly: + * +diff -ur glib-2.36.3-orig/glib/tests/gvariant.c glib-2.36.3/glib/tests/gvariant.c +--- glib-2.36.3-orig/glib/tests/gvariant.c 2013-06-09 18:03:18 -0400 ++++ glib-2.36.3/glib/tests/gvariant.c 2013-07-12 12:22:21 -0400 +@@ -32,8 +32,8 @@ + * pointers. it is necessary to have special support in the tests + * because on most machines malloc() is 8-aligned. + */ +-#define ALIGN_BITS (sizeof (struct { char a; union { \ +- guint64 x; void *y; gdouble z; } b; }) - 9) ++typedef struct { char a; union { guint64 x; void *y; gdouble z; } b; } ALIGN_BITS_STRUCT; ++#define ALIGN_BITS (sizeof (ALIGN_BITS_STRUCT) - 9) + + static gboolean + randomly (gdouble prob) +@@ -2195,7 +2195,7 @@ + serialise_tree (TreeInstance *tree, + GVariantSerialised *serialised) + { +- GVariantSerialised empty = { }; ++ GVariantSerialised empty = { 0, 0, 0 }; + + *serialised = empty; + tree_filler (serialised, tree); +diff -ur glib-2.36.3-orig/glib/tests/mappedfile.c glib-2.36.3/glib/tests/mappedfile.c +--- glib-2.36.3-orig/glib/tests/mappedfile.c 2013-06-09 18:03:18 -0400 ++++ glib-2.36.3/glib/tests/mappedfile.c 2013-07-12 12:24:52 -0400 +@@ -11,6 +11,10 @@ + #include + #include + ++#if defined(_MSC_VER) && !defined(W_OK) ++# define W_OK 2 ++#endif ++ + static void + test_basic (void) + { +diff -ur glib-2.36.3-orig/glib/tests/mem-overflow.c glib-2.36.3/glib/tests/mem-overflow.c +--- glib-2.36.3-orig/glib/tests/mem-overflow.c 2013-06-09 18:03:18 -0400 ++++ glib-2.36.3/glib/tests/mem-overflow.c 2013-07-12 12:29:07 -0400 +@@ -126,6 +126,7 @@ + g_free (q); + } + ++#ifndef _MSC_VER + typedef struct + { + } Empty; +@@ -147,6 +148,7 @@ + } + g_test_trap_assert_passed (); + } ++#endif + + int + main (int argc, +@@ -157,7 +159,9 @@ + g_test_bug_base ("http://bugzilla.gnome.org/"); + + g_test_add_func ("/mem/overflow", mem_overflow); ++#ifndef _MSC_VER + g_test_add_func ("/mem/empty-alloc", empty_alloc); ++#endif + + return g_test_run(); + } +diff -ur glib-2.36.3-orig/glib/tests/strfuncs.c glib-2.36.3/glib/tests/strfuncs.c +--- glib-2.36.3-orig/glib/tests/strfuncs.c 2013-06-02 19:20:53 -0400 ++++ glib-2.36.3/glib/tests/strfuncs.c 2013-07-12 12:34:53 -0400 +@@ -983,11 +983,13 @@ + check_strtod_string ("-infinity", -our_inf, FALSE, 0); + check_strtod_string ("-.75,0", -0.75, TRUE, 4); + ++#ifndef _MSC_VER + d = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0; + g_assert (d == g_ascii_strtod (g_ascii_dtostr (buffer, sizeof (buffer), d), NULL)); + + d = -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0; + g_assert (d == g_ascii_strtod (g_ascii_dtostr (buffer, sizeof (buffer), d), NULL)); ++#endif + + d = pow (2.0, -1024.1); + g_assert (d == g_ascii_strtod (g_ascii_dtostr (buffer, sizeof (buffer), d), NULL)); +diff -ur glib-2.36.3-orig/gmodule/Makefile.in glib-2.36.3/gmodule/Makefile.in +--- glib-2.36.3-orig/gmodule/Makefile.in 2013-06-09 18:53:46 -0400 ++++ glib-2.36.3/gmodule/Makefile.in 2013-07-12 13:10:55 -0400 +@@ -479,10 +479,10 @@ + libglib = $(top_builddir)/glib/libglib-2.0.la + top_builddir_full = `cd \$(top_builddir); pwd` + lib_LTLIBRARIES = libgmodule-2.0.la +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = gmodule-2.0.lib +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gmodule-2.0.lib $(DESTDIR)$(libdir) +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gmodule-2.0.lib +-@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#noinst_DATA = gmodule-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#install_ms_lib_cmd = $(INSTALL) gmodule-2.0.lib $(DESTDIR)$(libdir) ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gmodule-2.0.lib ++@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined -export-symbols-regex "xXx" + @OS_WIN32_AND_DLL_COMPILATION_TRUE@gmodule_win32_res = gmodule-win32-res.o + @OS_WIN32_AND_DLL_COMPILATION_TRUE@gmodule_win32_res_ldflag = -Wl,$(gmodule_win32_res) + libgmodule_2_0_la_CFLAGS = $(AM_CFLAGS) $(GLIB_HIDDEN_VISIBILITY_CFLAGS) +diff -ur glib-2.36.3-orig/gobject/Makefile.in glib-2.36.3/gobject/Makefile.in +--- glib-2.36.3-orig/gobject/Makefile.in 2013-06-09 18:53:46 -0400 ++++ glib-2.36.3/gobject/Makefile.in 2013-07-12 13:11:17 -0400 +@@ -558,10 +558,10 @@ + + # libraries to compile and install + lib_LTLIBRARIES = libgobject-2.0.la +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = gobject-2.0.lib +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir) +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib +-@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#noinst_DATA = gobject-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#install_ms_lib_cmd = $(INSTALL) gobject-2.0.lib $(DESTDIR)$(libdir) ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gobject-2.0.lib ++@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined -export-symbols-regex "xXx" + @OS_WIN32_AND_DLL_COMPILATION_TRUE@gobject_win32_res = gobject-win32-res.o + @OS_WIN32_AND_DLL_COMPILATION_TRUE@gobject_win32_res_ldflag = -Wl,$(gobject_win32_res) + libgobjectincludedir = $(includedir)/glib-2.0/gobject +diff -ur glib-2.36.3-orig/gobject/tests/param.c glib-2.36.3/gobject/tests/param.c +--- glib-2.36.3-orig/gobject/tests/param.c 2013-06-09 18:03:18 -0400 ++++ glib-2.36.3/gobject/tests/param.c 2013-07-12 13:06:13 -0400 +@@ -535,56 +535,56 @@ + + static gint valid_impl_types[48][4] = { + /* a b c GObject */ +- /* 'a-' */ { }, ++ /* 'a-' */ { 0 }, + /* 'a-r' */ { 'v', 'v', '<', '<' }, + /* 'a-w' */ { 'v', '>', '>', 'v' }, + /* 'a-rw' */ { 'v', '=', '=', '=' }, +- /* 'a-c */ { }, +- /* 'a-rc' */ { }, ++ /* 'a-c */ { 0 }, ++ /* 'a-rc' */ { 0 }, + /* 'a-wc' */ { 'v', '>', '>', 'v' }, + /* 'a-rwc' */ { 'v', '=', '=', '=' }, +- /* 'a-C */ { }, +- /* 'a-rC' */ { }, ++ /* 'a-C */ { 0 }, ++ /* 'a-rC' */ { 0 }, + /* 'a-wC' */ { 'v', '>', '>', 'v' }, + /* 'a-rwC' */ { 'v', '=', '=', '=' }, +- /* 'a-cC */ { }, +- /* 'a-rcC' */ { }, +- /* 'a-wcC' */ { }, +- /* 'a-rwcC' */ { }, ++ /* 'a-cC */ { 0 }, ++ /* 'a-rcC' */ { 0 }, ++ /* 'a-wcC' */ { 0 }, ++ /* 'a-rwcC' */ { 0 }, + +- /* 'b-' */ { }, ++ /* 'b-' */ { 0 }, + /* 'b-r' */ { '<', 'v', '<', '<' }, + /* 'b-w' */ { 'v', 'v', '>', 'v' }, + /* 'b-rw' */ { '=', 'v', '=', '=' }, +- /* 'b-c */ { }, +- /* 'b-rc' */ { }, ++ /* 'b-c */ { 0 }, ++ /* 'b-rc' */ { 0 }, + /* 'b-wc' */ { 'v', 'v', '>', 'v' }, + /* 'b-rwc' */ { '=', 'v', '=', '=' }, +- /* 'b-C */ { }, +- /* 'b-rC' */ { }, ++ /* 'b-C */ { 0 }, ++ /* 'b-rC' */ { 0 }, + /* 'b-wC' */ { 'v', 'v', '>', 'v' }, + /* 'b-rwC' */ { '=', 'v', '=', '=' }, +- /* 'b-cC */ { }, +- /* 'b-rcC' */ { }, +- /* 'b-wcC' */ { }, +- /* 'b-rwcC' */ { }, ++ /* 'b-cC */ { 0 }, ++ /* 'b-rcC' */ { 0 }, ++ /* 'b-wcC' */ { 0 }, ++ /* 'b-rwcC' */ { 0 }, + +- /* 'c-' */ { }, ++ /* 'c-' */ { 0 }, + /* 'c-r' */ { '<', '<', 'v', '<' }, + /* 'c-w' */ { '>', '>', 'v', 'v' }, + /* 'c-rw' */ { '=', '=', 'v', '=' }, +- /* 'c-c */ { }, +- /* 'c-rc' */ { }, ++ /* 'c-c */ { 0 }, ++ /* 'c-rc' */ { 0 }, + /* 'c-wc' */ { '>', '>', 'v', 'v' }, + /* 'c-rwc' */ { '=', '=', 'v', '=' }, +- /* 'c-C */ { }, +- /* 'c-rC' */ { }, ++ /* 'c-C */ { 0 }, ++ /* 'c-rC' */ { 0 }, + /* 'c-wC' */ { '>', '>', 'v', 'v' }, + /* 'c-rwC' */ { '=', '=', 'v', '=' }, +- /* 'c-cC */ { }, +- /* 'c-rcC' */ { }, +- /* 'c-wcC' */ { }, +- /* 'c-rwcC' */ { } ++ /* 'c-cC */ { 0 }, ++ /* 'c-rcC' */ { 0 }, ++ /* 'c-wcC' */ { 0 }, ++ /* 'c-rwcC' */ { 0 } + }; + + /* We also try to change the flags. We must ensure that all +@@ -624,16 +624,16 @@ + */ + static gint valid_impl_flags[16][16] = { + /* '' r w rw c rc wc rwc C rC wC rwC cC rcC wcC rwcC */ +- /* '*-' */ { }, ++ /* '*-' */ { 0 }, + /* '*-r' */ { 'i', 'v', 'f', 'v', 'i', 'i', 'f', 'v', 'i', 'i', 'f', 'v', 'i', 'i', 'i', 'i' }, + /* '*-w' */ { 'i', 'f', 'v', 'v', 'i', 'i', 'v', 'v', 'i', 'i', 'r', 'r', 'i', 'i', 'i', 'i' }, + /* '*-rw' */ { 'i', 'f', 'f', 'v', 'i', 'i', 'f', 'v', 'i', 'i', 'f', 'r', 'i', 'i', 'i', 'i' }, +- /* '*-c */ { }, +- /* '*-rc' */ { }, ++ /* '*-c */ { 0 }, ++ /* '*-rc' */ { 0 }, + /* '*-wc' */ { 'i', 'f', 'v', 'v', 'i', 'i', 'v', 'v', 'i', 'i', 'r', 'r', 'i', 'i', 'i', 'i' }, + /* '*-rwc' */ { 'i', 'f', 'f', 'v', 'i', 'i', 'f', 'v', 'i', 'i', 'f', 'r', 'i', 'i', 'i', 'i' }, +- /* '*-C */ { }, +- /* '*-rC' */ { }, ++ /* '*-C */ { 0 }, ++ /* '*-rC' */ { 0 }, + /* '*-wC' */ { 'i', 'f', 'v', 'v', 'i', 'i', 'v', 'v', 'i', 'i', 'v', 'v', 'i', 'i', 'i', 'i' }, + /* '*-rwC' */ { 'i', 'f', 'f', 'v', 'i', 'i', 'f', 'v', 'i', 'i', 'f', 'v', 'i', 'i', 'i', 'i' }, + }; +diff -ur glib-2.36.3-orig/gthread/Makefile.in glib-2.36.3/gthread/Makefile.in +--- glib-2.36.3-orig/gthread/Makefile.in 2013-06-09 18:53:47 -0400 ++++ glib-2.36.3/gthread/Makefile.in 2013-07-12 12:55:10 -0400 +@@ -468,9 +468,9 @@ + libglib = $(top_builddir)/glib/libglib-2.0.la + top_builddir_full = `cd \$(top_builddir); pwd` + lib_LTLIBRARIES = libgthread-2.0.la +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = gthread-2.0.lib +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gthread-2.0.lib $(DESTDIR)$(libdir) +-@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gthread-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#noinst_DATA = gthread-2.0.lib ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#install_ms_lib_cmd = $(INSTALL) gthread-2.0.lib $(DESTDIR)$(libdir) ++@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@#uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gthread-2.0.lib + @PLATFORM_WIN32_TRUE@no_undefined = -no-undefined + @OS_WIN32_AND_DLL_COMPILATION_TRUE@export_symbols = -export-symbols $(srcdir)/gthread.def + @OS_WIN32_AND_DLL_COMPILATION_TRUE@gthread_def = gthread.def +diff -ur glib-2.36.3-orig/gthread/gthread.def glib-2.36.3/gthread/gthread.def +--- glib-2.36.3-orig/gthread/gthread.def 2011-08-15 20:51:30 -0400 ++++ glib-2.36.3/gthread/gthread.def 2013-07-12 12:59:25 -0400 +@@ -1,3 +1,3 @@ + EXPORTS +- g_thread_init +- g_thread_init_with_errorcheck_mutexes ++g_thread_init ++g_thread_init_with_errorcheck_mutexes +diff -ur glib-2.36.3-orig/tests/libmoduletestplugin_a.c glib-2.36.3/tests/libmoduletestplugin_a.c +--- glib-2.36.3-orig/tests/libmoduletestplugin_a.c 2013-06-02 19:20:49 -0400 ++++ glib-2.36.3/tests/libmoduletestplugin_a.c 2013-07-12 14:19:02 -0400 +@@ -30,11 +30,11 @@ + #include + #include + +-void gplugin_a_func (void); +-void gplugin_clash_func (void); +-void g_clash_func (void); +-void gplugin_say_boo_func (void); +-void gplugin_a_module_func (GModule *module); ++G_MODULE_EXPORT void gplugin_a_func (void); ++G_MODULE_EXPORT void gplugin_clash_func (void); ++G_MODULE_EXPORT void g_clash_func (void); ++G_MODULE_EXPORT void gplugin_say_boo_func (void); ++G_MODULE_EXPORT void gplugin_a_module_func (GModule *module); + + G_MODULE_EXPORT gchar* gplugin_a_state; + +diff -ur glib-2.36.3-orig/tests/libmoduletestplugin_b.c glib-2.36.3/tests/libmoduletestplugin_b.c +--- glib-2.36.3-orig/tests/libmoduletestplugin_b.c 2013-06-02 19:20:49 -0400 ++++ glib-2.36.3/tests/libmoduletestplugin_b.c 2013-07-12 14:20:00 -0400 +@@ -31,13 +31,13 @@ + + G_MODULE_EXPORT gchar* gplugin_b_state; + +-const gchar* g_module_check_init (GModule *module); +-void g_module_unload (GModule *module); ++G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module); ++G_MODULE_EXPORT void g_module_unload (GModule *module); + +-void gplugin_b_func (void); +-void gplugin_clash_func (void); +-void g_clash_func (void); +-void gplugin_say_boo_func (void); ++G_MODULE_EXPORT void gplugin_b_func (void); ++G_MODULE_EXPORT void gplugin_clash_func (void); ++G_MODULE_EXPORT void g_clash_func (void); ++G_MODULE_EXPORT void gplugin_say_boo_func (void); + + G_MODULE_EXPORT const gchar* + g_module_check_init (GModule *module)