# HG changeset patch
# User Markus Mützel <markus.muetzel@gmx.de>
# Date 1550918153 -3600
#      Sat Feb 23 11:35:53 2019 +0100
# Node ID 5cc3c987a44cc846f98e01941cd5d3256573e4d9
# Parent  f5a1bf89669cfb4cc8bd0984c20ceb939043af2e
Update glib to v2.50.2 (bug #55769).

* src/glib.mk: Update version, checksum and build rules.
* src/glib-1-fixes.patch: Add new file from mxe.cc
* src/mingw-glib-1-fixes.patch, src/mingw-glib-2-fixes.patch: Remove files.
* dist-files.mk: Update src file list.

diff -r f5a1bf89669c -r 5cc3c987a44c dist-files.mk
--- a/dist-files.mk	Thu Feb 21 13:56:52 2019 -0500
+++ b/dist-files.mk	Sat Feb 23 11:35:53 2019 +0100
@@ -137,6 +137,7 @@
   gl2ps.mk \
   glew-test.c \
   glew.mk \
+  glib-1-fixes.patch \
   glib.mk \
   glibmm.mk \
   glpk.mk \
@@ -331,8 +332,6 @@
   mingw-cairo-1-ssize-t-defined.patch \
   mingw-cfitsio-1-fixes.patch \
   mingw-epstool-1-fixes.patch \
-  mingw-glib-1-fixes.patch \
-  mingw-glib-2-fixes.patch \
   mingw-glpk-1-fixes.patch \
   mingw-hdf5-1.patch \
   mingw-lapack-1-xerbla.patch \
diff -r f5a1bf89669c -r 5cc3c987a44c src/glib-1-fixes.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/glib-1-fixes.patch	Sat Feb 23 11:35:53 2019 +0100
@@ -0,0 +1,643 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Thu, 23 Sep 2010 21:42:46 +0200
+Subject: [PATCH 1/9] fix tool paths
+
+
+diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in
+index 1111111..2222222 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
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hans Petter Jansson <hpj@cl.no>
+Date: Fri, 15 Jun 2012 15:25:01 +0200
+Subject: [PATCH 2/9] Avoid DllMain symbol conflict when linking statically
+
+Adjusted by Boris Nagaev on 29-Jan-2017 to fix
+https://gist.github.com/starius/f4fc85939352cb50122ba29e0f5b140d
+when updating to glib-2.50.2.
+
+diff --git a/gio/giomodule.c b/gio/giomodule.c
+index 1111111..2222222 100644
+--- a/gio/giomodule.c
++++ b/gio/giomodule.c
+@@ -928,14 +928,12 @@ extern GType g_cocoa_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)
+ {
+@@ -945,8 +943,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 1111111..2222222 100644
+--- a/glib/glib-init.c
++++ b/glib/glib-init.c
+@@ -245,14 +245,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)
+ {
+diff --git a/gobject/gtype.c b/gobject/gtype.c
+index 1111111..2222222 100644
+--- a/gobject/gtype.c
++++ b/gobject/gtype.c
+@@ -4450,7 +4450,7 @@ gobject_init (void)
+   _g_signal_init ();
+ }
+ 
+-#if defined (G_OS_WIN32)
++#if 0
+ 
+ BOOL WINAPI DllMain (HINSTANCE hinstDLL,
+                      DWORD     fdwReason,
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hans Petter Jansson <hpj@cl.no>
+Date: Fri, 15 Jun 2012 15:27:22 +0200
+Subject: [PATCH 3/9] Allow building without inotify support
+
+
+diff --git a/configure.ac b/configure.ac
+index 1111111..2222222 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1599,10 +1599,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"])
+ 
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hans Petter Jansson <hpj@cl.no>
+Date: Fri, 15 Jun 2012 15:28:14 +0200
+Subject: [PATCH 4/9] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF.
+ Backported from upstream
+
+
+diff --git a/configure.ac b/configure.ac
+index 1111111..2222222 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -511,6 +511,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
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hans Petter Jansson <hpj@cl.no>
+Date: Fri, 15 Jun 2012 15:29:06 +0200
+Subject: [PATCH 5/9] Link with dnsapi
+
+
+diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in
+index 1111111..2222222 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:
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Hans Petter Jansson <hpj@cl.no>
+Date: Fri, 15 Jun 2012 15:29:38 +0200
+Subject: [PATCH 6/9] Ensure globals are initialized even when DllMain is not
+ being run
+
+
+diff --git a/glib/gmain.c b/glib/gmain.c
+index 1111111..2222222 100644
+--- a/glib/gmain.c
++++ b/glib/gmain.c
+@@ -2657,12 +2657,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)
+@@ -2721,6 +2724,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 1111111..2222222 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));
+ }
+ 
+@@ -1041,6 +1145,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 ();
+ 
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Gerardo Ballabio <gerardo.ballabio@gmail.com>
+Date: Sun, 16 Aug 2015 13:18:24 +0200
+Subject: [PATCH 7/9] Remove an annoying runtime warning
+
+that pops up when using GtkApplication in Gtk+ 3 programs.
+
+diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
+index 1111111..2222222 100644
+--- a/gio/gdbusaddress.c
++++ b/gio/gdbusaddress.c
+@@ -1387,6 +1387,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC
+ __declspec(dllexport) void CALLBACK
+ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow)
+ {
++  /*
+   GDBusDaemon *daemon;
+   GMainLoop *loop;
+   const char *address;
+@@ -1418,6 +1419,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow
+ 
+   g_main_loop_unref (loop);
+   g_object_unref (daemon);
++  */
+ }
+ 
+ static gchar *
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: aquiles2k <aj@elane2k.com>
+Date: Wed, 6 Apr 2016 22:39:53 +0300
+Subject: [PATCH 8/9] fix error "won't overwrite defined macro" on OSX
+
+See https://github.com/mxe/mxe/issues/1281
+
+diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
+index 1111111..2222222 100644
+--- a/m4macros/glib-gettext.m4
++++ b/m4macros/glib-gettext.m4
+@@ -36,8 +36,8 @@ dnl We go to great lengths to make sure that aclocal won't
+ dnl try to pull in the installed version of these macros
+ dnl when running aclocal in the glib directory.
+ dnl
+-m4_copy([AC_DEFUN],[glib_DEFUN])
+-m4_copy([AC_REQUIRE],[glib_REQUIRE])
++m4_copy_force([AC_DEFUN],[glib_DEFUN])
++m4_copy_force([AC_REQUIRE],[glib_REQUIRE])
+ dnl
+ dnl At the end, if we're not within glib, we'll define the public
+ dnl definitions in terms of our private definitions.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Mon, 26 Feb 2018 16:09:53 +1100
+Subject: [PATCH 9/9] darwin: disable g_cocoa_notification_backend
+
+
+diff --git a/gio/Makefile.am b/gio/Makefile.am
+index 1111111..2222222 100644
+--- a/gio/Makefile.am
++++ b/gio/Makefile.am
+@@ -279,10 +279,6 @@ unix_sources = \
+ 
+ appinfo_sources += $(unix_appinfo_sources)
+ 
+-if OS_COCOA
+-unix_sources += gcocoanotificationbackend.c
+-endif
+-
+ giounixincludedir=$(includedir)/gio-unix-2.0/gio
+ giounixinclude_HEADERS = \
+ 	gdesktopappinfo.h	\
+diff --git a/gio/giomodule.c b/gio/giomodule.c
+index 1111111..2222222 100644
+--- a/gio/giomodule.c
++++ b/gio/giomodule.c
+@@ -918,9 +918,6 @@ extern GType g_proxy_resolver_portal_get_type (void);
+ extern GType g_network_monitor_portal_get_type (void);
+ #endif
+ 
+-#ifdef HAVE_COCOA
+-extern GType g_cocoa_notification_backend_get_type (void);
+-#endif
+ 
+ #ifdef G_PLATFORM_WIN32
+ 
+@@ -1117,9 +1114,6 @@ _g_io_modules_ensure_loaded (void)
+       g_type_ensure (g_network_monitor_portal_get_type ());
+       g_type_ensure (g_proxy_resolver_portal_get_type ());
+ #endif
+-#ifdef HAVE_COCOA
+-      g_type_ensure (g_cocoa_notification_backend_get_type ());
+-#endif
+ #ifdef G_OS_WIN32
+       g_type_ensure (_g_winhttp_vfs_get_type ());
+#endif
diff -r f5a1bf89669c -r 5cc3c987a44c src/glib.mk
--- a/src/glib.mk	Thu Feb 21 13:56:52 2019 -0500
+++ b/src/glib.mk	Sat Feb 23 11:35:53 2019 +0100
@@ -3,8 +3,8 @@
 
 PKG             := glib
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 2.48.1
-$(PKG)_CHECKSUM := d59b6daf51dff21c6327734a99f1fb6c5328bcf9
+$(PKG)_VERSION  := 2.50.2
+$(PKG)_CHECKSUM := 948a768931ca321a35e16556a1c8adcae04babf2
 $(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)
@@ -25,19 +25,34 @@
 
 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
 define $(PKG)_BUILD
-    cd $(1) && ./autogen.sh
+    cd $(1) && NOCONFIGURE=true ./autogen.sh
     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 \
+        --enable-regex \
+        --disable-threads \
+        --disable-selinux \
+        --disable-inotify \
+        --disable-fam \
+        --disable-xattr \
+        --disable-dtrace \
+        --disable-libmount \
         --with-libiconv=gnu \
-        --disable-modular-tests \
+        --with-pcre=internal \
 	&& $(CONFIGURE_POST_HOOK)
 
-    $(MAKE) -C '$(1)' -j '$(JOBS)'
-    $(MAKE) -C '$(1)' -j 1 install
+    $(SED) -i 's,#define G_ATOMIC.*,,' '$(1)/config.h'
+    $(MAKE) -C '$(1)/glib'    -j '$(JOBS)'
+    $(MAKE) -C '$(1)/gthread' -j '$(JOBS)'
+    $(MAKE) -C '$(1)/gmodule' -j '$(JOBS)'
+    $(MAKE) -C '$(1)/gobject' -j '$(JOBS)' lib_LTLIBRARIES= install-exec
+    $(MAKE) -C '$(1)/gio/xdgmime'     -j '$(JOBS)'
+    $(MAKE) -C '$(1)/gio'     -j '$(JOBS)' glib-compile-schemas
+    $(MAKE) -C '$(1)/gio'     -j '$(JOBS)' glib-compile-resources
+    $(INSTALL) -m755 '$(1)/gio/glib-compile-schemas' '$(HOST_BINDIR)/'
+    $(INSTALL) -m755 '$(1)/gio/glib-compile-resources' '$(HOST_BINDIR)/'
 endef
 else
 define $(PKG)_BUILD
@@ -53,12 +68,16 @@
         --with-pcre=system \
         --with-libiconv=gnu \
         --disable-inotify \
-        --disable-modular-tests \
         PKG_CONFIG='$(MXE_PKG_CONFIG)' \
         PKG_CONFIG_PATH='$(PKG_CONFIG_PATH)' 
 
-    $(MAKE) -C '$(1)'    -j '$(JOBS)' 
-    $(MAKE) -C '$(1)'    -j 1 install 
+    $(MAKE) -C '$(1)/glib'    -j '$(JOBS)' install sbin_PROGRAMS= noinst_PROGRAMS=
+    $(MAKE) -C '$(1)/gmodule' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+    $(MAKE) -C '$(1)/gthread' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+    $(MAKE) -C '$(1)/gobject' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+    $(MAKE) -C '$(1)/gio'     -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= MISC_STUFF=
+    $(MAKE) -C '$(1)'         -j '$(JOBS)' install-pkgconfigDATA
+    $(MAKE) -C '$(1)/m4macros' install
 endef
 
 endif
diff -r f5a1bf89669c -r 5cc3c987a44c src/mingw-glib-1-fixes.patch
--- a/src/mingw-glib-1-fixes.patch	Thu Feb 21 13:56:52 2019 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,527 +0,0 @@
-diff -ur glib-2.48.1.orig/autogen.sh glib-2.48.1/autogen.sh
---- glib-2.48.1.orig/autogen.sh	2016-12-25 13:21:25.730080418 -0500
-+++ glib-2.48.1/autogen.sh	2016-12-25 13:22:17.474289395 -0500
-@@ -7,18 +7,6 @@
- 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 -ur glib-2.48.1.orig/configure.ac glib-2.48.1/configure.ac
---- glib-2.48.1.orig/configure.ac	2016-12-25 13:21:25.725080302 -0500
-+++ glib-2.48.1/configure.ac	2016-12-25 13:22:17.472289348 -0500
-@@ -465,8 +465,8 @@
- 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
-@@ -509,6 +509,8 @@
- 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
-Only in glib-2.48.1: configure.ac.orig
-Only in glib-2.48.1: configure.ac.rej
-Only in glib-2.48.1/docs: Makefile.am.orig
-Only in glib-2.48.1/docs: Makefile.am.rej
-Only in glib-2.48.1/docs/reference/gio: gdbus-object-manager-example
-Only in glib-2.48.1/docs/reference/gio: Makefile.am.orig
-Only in glib-2.48.1/docs/reference/gio: Makefile.am.rej
-Only in glib-2.48.1/docs/reference/glib: Makefile.am.orig
-Only in glib-2.48.1/docs/reference/glib: Makefile.am.rej
-Only in glib-2.48.1/docs/reference/gobject: Makefile.am.orig
-Only in glib-2.48.1/docs/reference/gobject: Makefile.am.rej
-Only in glib-2.48.1/docs/reference: Makefile.am.orig
-Only in glib-2.48.1/docs/reference: Makefile.am.rej
-diff -ur glib-2.48.1.orig/gio/giomodule.c glib-2.48.1/gio/giomodule.c
---- glib-2.48.1.orig/gio/giomodule.c	2016-12-25 13:21:25.751080909 -0500
-+++ glib-2.48.1/gio/giomodule.c	2016-12-25 13:22:17.470289301 -0500
-@@ -921,14 +921,12 @@
- 
- 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)
- {
-@@ -938,8 +936,6 @@
-   return TRUE;
- }
- 
--#endif
--
- void *
- _g_io_win32_get_module (void)
- {
-Only in glib-2.48.1/gio: giomodule.c.orig
-Only in glib-2.48.1: gio-2.0.pc.in.orig
-Only in glib-2.48.1: gio-2.0.pc.in.rej
-diff -ur glib-2.48.1.orig/glib/gi18n.h glib-2.48.1/glib/gi18n.h
---- glib-2.48.1.orig/glib/gi18n.h	2016-12-25 13:21:25.775081470 -0500
-+++ glib-2.48.1/glib/gi18n.h	2016-12-25 13:22:17.469289278 -0500
-@@ -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)
-Only in glib-2.48.1/glib: gi18n.h.orig
-diff -ur glib-2.48.1.orig/glib/glib-init.c glib-2.48.1/glib/glib-init.c
---- glib-2.48.1.orig/glib/glib-init.c	2016-12-25 13:21:25.780081587 -0500
-+++ glib-2.48.1/glib/glib-init.c	2016-12-25 13:22:17.470289301 -0500
-@@ -245,14 +245,14 @@
- 
- #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)
- {
-Only in glib-2.48.1/glib: glib-init.c.orig
-diff -ur glib-2.48.1.orig/glib/gmain.c glib-2.48.1/glib/gmain.c
---- glib-2.48.1.orig/glib/gmain.c	2016-12-25 13:21:25.793081890 -0500
-+++ glib-2.48.1/glib/gmain.c	2016-12-25 13:22:17.473289371 -0500
-@@ -2609,12 +2609,15 @@
- #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)
-@@ -2673,6 +2676,9 @@
-    *    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;
-Only in glib-2.48.1/glib: gmain.c.orig
-diff -ur glib-2.48.1.orig/glib/gstrfuncs.c glib-2.48.1/glib/gstrfuncs.c
---- glib-2.48.1.orig/glib/gstrfuncs.c	2016-12-25 13:21:25.797081984 -0500
-+++ glib-2.48.1/glib/gstrfuncs.c	2016-12-25 14:23:07.518480108 -0500
-@@ -1272,7 +1272,7 @@
-       gchar buf[1024];
-       GError *error = NULL;
- 
--#if defined(G_OS_WIN32)
-+#if defined(G_OS_WIN32) && !defined(__MINGW32__)
-       strerror_s (buf, sizeof (buf), errnum);
-       msg = buf;
- #elif defined(HAVE_STRERROR_R)
-diff -ur glib-2.48.1.orig/glib/gthread-win32.c glib-2.48.1/glib/gthread-win32.c
---- glib-2.48.1.orig/glib/gthread-win32.c	2016-12-25 13:21:25.780081587 -0500
-+++ glib-2.48.1/glib/gthread-win32.c	2016-12-25 13:22:17.474289395 -0500
-@@ -116,18 +116,28 @@
-   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 @@
- 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 @@
- {
-   CRITICAL_SECTION *cs;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   cs = g_slice_new (CRITICAL_SECTION);
-   InitializeCriticalSection (cs);
- 
-@@ -167,6 +189,10 @@
- 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 @@
- {
-   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 @@
- 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 @@
- 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 @@
- 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 @@
- 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 @@
- 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 @@
- 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 @@
- {
-   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 @@
- 
-   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 @@
- {
-   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 @@
- void
- g_system_thread_exit (void)
- {
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   _endthreadex (0);
- }
- 
-@@ -447,6 +542,9 @@
- {
-   GThreadWin32 *self = data;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   self->proxy (self);
- 
-   g_system_thread_exit ();
-@@ -464,6 +562,9 @@
-   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 @@
- {
-   GThreadWin32 *wt = (GThreadWin32 *) thread;
- 
-+  if (!g_threads_is_initialized)
-+    g_thread_win32_init ();
-+
-   win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE));
- }
- 
-@@ -1041,6 +1145,8 @@
- void
- g_thread_win32_init (void)
- {
-+  g_threads_is_initialized = TRUE;
-+
-   if (!g_thread_lookup_native_funcs ())
-     g_thread_xp_init ();
- 
-Only in glib-2.48.1/glib: gthread-win32.c.orig
-diff -ur glib-2.48.1.orig/glib-2.0.pc.in glib-2.48.1/glib-2.0.pc.in
---- glib-2.48.1.orig/glib-2.0.pc.in	2016-12-25 13:21:25.734080512 -0500
-+++ glib-2.48.1/glib-2.0.pc.in	2016-12-25 13:22:17.469289278 -0500
-@@ -3,9 +3,9 @@
- 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
-Only in glib-2.48.1: Makefile.am.orig
-Only in glib-2.48.1: Makefile.am.rej
diff -r f5a1bf89669c -r 5cc3c987a44c src/mingw-glib-2-fixes.patch
--- a/src/mingw-glib-2-fixes.patch	Thu Feb 21 13:56:52 2019 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
---- a/glib/gatomic.c.orig	2013-07-29 12:05:27 -0400
-+++ a/glib/gatomic.c	2013-07-29 12:07:46 -0400
-@@ -475,6 +475,14 @@
- 
- #if !defined (_MSC_VER) || _MSC_VER <= 1200
- #include "gmessages.h"
-+
-+#ifndef MemoryBarrier
-+static inline void MemoryBarrier (void) {
-+  long dummy = 0;
-+  InterlockedExchange (&dummy, 1);
-+}
-+#endif
-+
- /* Inlined versions for older compiler */
- static LONG
- _gInterlockedAnd (volatile guint *atomic,
