mirror of
https://github.com/scummvm/dockerized-bb.git
synced 2026-11-18 21:35:23 +00:00
MXE: Add forgotten new library
This commit is contained in:
1 parent
17c72a5291
commit
cb8bf83ad1
2 files changed
+614
No files matched your search
@@ -0,0 +1,590 @@
|
||||
From 1eb57d9fd4049389812ce0a3cafcaf175b3643c1 Mon Sep 17 00:00:00 2001
|
||||
Date: Sun, 30 Jun 2024 18:41:28 +0200
|
||||
Subject: [PATCH] This file is part of MXE. See LICENSE.md for licensing
|
||||
information.
|
||||
|
||||
Contains ad hoc patches for cross building.
|
||||
---
|
||||
configure.ac | 8 +++
|
||||
gio-2.0.pc.in | 2 +-
|
||||
gio/gdbusaddress.c | 2 +
|
||||
gio/gdbusauth.c | 2 +-
|
||||
gio/gdbusmessage.c | 5 +-
|
||||
gio/giomodule.c | 8 +--
|
||||
glib-2.0.pc.in | 6 +--
|
||||
glib/glib-init.c | 4 +-
|
||||
glib/gmain.c | 5 ++
|
||||
glib/gthread-win32.c | 106 +++++++++++++++++++++++++++++++++++++++
|
||||
gobject/gtype.c | 2 +-
|
||||
m4macros/glib-gettext.m4 | 4 +-
|
||||
12 files changed, 135 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7afeb87dc..c1d7c1c06 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -486,6 +486,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
|
||||
@@ -1713,10 +1715,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"])
|
||||
|
||||
diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in
|
||||
index 7574eb700..bad724e27 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@ @LIBMOUNT_LIBS@
|
||||
Cflags:
|
||||
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
|
||||
index 2191c115a..33423be7a 100644
|
||||
--- a/gio/gdbusaddress.c
|
||||
+++ b/gio/gdbusaddress.c
|
||||
@@ -1406,6 +1406,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;
|
||||
@@ -1438,6 +1439,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 *
|
||||
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
|
||||
index 1f8ea8057..752ec23fc 100644
|
||||
--- a/gio/gdbusauth.c
|
||||
+++ b/gio/gdbusauth.c
|
||||
@@ -1272,9 +1272,9 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
|
||||
&line_length,
|
||||
cancellable,
|
||||
error);
|
||||
- debug_print ("SERVER: WaitingForBegin, read '%s'", line);
|
||||
if (line == NULL)
|
||||
goto out;
|
||||
+ debug_print ("SERVER: WaitingForBegin, read '%s'", line);
|
||||
if (g_strcmp0 (line, "BEGIN") == 0)
|
||||
{
|
||||
/* YAY, done! */
|
||||
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
|
||||
index be001ae55..2a2f2b811 100644
|
||||
--- a/gio/gdbusmessage.c
|
||||
+++ b/gio/gdbusmessage.c
|
||||
@@ -2699,7 +2699,6 @@ g_dbus_message_to_blob (GDBusMessage *message,
|
||||
if (message->body != NULL)
|
||||
{
|
||||
gchar *tupled_signature_str;
|
||||
- tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
|
||||
if (signature == NULL)
|
||||
{
|
||||
g_set_error (error,
|
||||
@@ -2707,10 +2706,10 @@ g_dbus_message_to_blob (GDBusMessage *message,
|
||||
G_IO_ERROR_INVALID_ARGUMENT,
|
||||
_("Message body has signature “%s” but there is no signature header"),
|
||||
signature_str);
|
||||
- g_free (tupled_signature_str);
|
||||
goto out;
|
||||
}
|
||||
- else if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
|
||||
+ tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
|
||||
+ if (g_strcmp0 (tupled_signature_str, g_variant_get_type_string (message->body)) != 0)
|
||||
{
|
||||
g_set_error (error,
|
||||
G_IO_ERROR,
|
||||
diff --git a/gio/giomodule.c b/gio/giomodule.c
|
||||
index 30731f7c2..e9bb0806e 100644
|
||||
--- a/gio/giomodule.c
|
||||
+++ b/gio/giomodule.c
|
||||
@@ -969,14 +969,12 @@ extern GType _g_win32_network_monitor_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)
|
||||
{
|
||||
@@ -986,8 +984,6 @@ DllMain (HINSTANCE hinstDLL,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-#endif
|
||||
-
|
||||
void *
|
||||
_g_io_win32_get_module (void)
|
||||
{
|
||||
diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in
|
||||
index 275fc0163..ac09887a5 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
|
||||
diff --git a/glib/glib-init.c b/glib/glib-init.c
|
||||
index 5f312113a..368bf83ce 100644
|
||||
--- a/glib/glib-init.c
|
||||
+++ b/glib/glib-init.c
|
||||
@@ -275,14 +275,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/glib/gmain.c b/glib/gmain.c
|
||||
index 181483527..76e7d6dd4 100644
|
||||
--- a/glib/gmain.c
|
||||
+++ b/glib/gmain.c
|
||||
@@ -2717,12 +2717,14 @@ g_get_real_time (void)
|
||||
* So for now we calculate (usec_per_sec / ticks_per_sec) and use floating point
|
||||
*/
|
||||
static gdouble g_monotonic_usec_per_tick = 0;
|
||||
+static gboolean g_win32_clock_is_initialized = FALSE;
|
||||
|
||||
void
|
||||
g_clock_win32_init (void)
|
||||
{
|
||||
LARGE_INTEGER freq;
|
||||
|
||||
+ g_win32_clock_is_initialized = TRUE;
|
||||
if (!QueryPerformanceFrequency (&freq) || freq.QuadPart == 0)
|
||||
{
|
||||
/* The documentation says that this should never happen */
|
||||
@@ -2736,6 +2738,9 @@ g_clock_win32_init (void)
|
||||
gint64
|
||||
g_get_monotonic_time (void)
|
||||
{
|
||||
+ if (!g_win32_clock_is_initialized)
|
||||
+ g_clock_win32_init ();
|
||||
+
|
||||
if (G_LIKELY (g_monotonic_usec_per_tick != 0))
|
||||
{
|
||||
LARGE_INTEGER ticks;
|
||||
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
|
||||
index 938ed5f3c..93e4ddf73 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 ();
|
||||
|
||||
diff --git a/gobject/gtype.c b/gobject/gtype.c
|
||||
index 275a8b60b..21bde1d6f 100644
|
||||
--- a/gobject/gtype.c
|
||||
+++ b/gobject/gtype.c
|
||||
@@ -4451,7 +4451,7 @@ gobject_init (void)
|
||||
_g_signal_init ();
|
||||
}
|
||||
|
||||
-#if defined (G_OS_WIN32)
|
||||
+#if 0
|
||||
|
||||
BOOL WINAPI DllMain (HINSTANCE hinstDLL,
|
||||
DWORD fdwReason,
|
||||
diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
|
||||
index df6fbf012..e1b9c5461 100644
|
||||
--- a/m4macros/glib-gettext.m4
|
||||
+++ b/m4macros/glib-gettext.m4
|
||||
@@ -39,8 +39,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.
|
||||
--
|
||||
2.44.2
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1428
|
||||
|
||||
--- a/glib/gtypes.h 2016-10-22 07:21:52.000000000 +0200
|
||||
+++ b/glib/gtypes.h 2020-05-17 11:13:49.369639688 +0200
|
||||
@@ -522,7 +522,7 @@
|
||||
# else /* !GLIB_STATIC_COMPILATION */
|
||||
# ifdef GLIB_COMPILATION
|
||||
# ifdef DLL_EXPORT
|
||||
-# define GLIB_VAR __declspec(dllexport)
|
||||
+# define GLIB_VAR extern __declspec(dllexport)
|
||||
# else /* !DLL_EXPORT */
|
||||
# define GLIB_VAR extern
|
||||
# endif /* !DLL_EXPORT */
|
||||
--- a/gobject/gparamspecs.h 2016-10-22 07:22:21.000000000 +0200
|
||||
+++ b/gobject/gparamspecs.h 2020-05-17 11:16:37.803281391 +0200
|
||||
@@ -1144,7 +1144,7 @@
|
||||
# else /* !GOBJECT_STATIC_COMPILATION */
|
||||
# ifdef GOBJECT_COMPILATION
|
||||
# ifdef DLL_EXPORT
|
||||
-# define GOBJECT_VAR __declspec(dllexport)
|
||||
+# define GOBJECT_VAR extern __declspec(dllexport)
|
||||
# else /* !DLL_EXPORT */
|
||||
# define GOBJECT_VAR extern
|
||||
# endif /* !DLL_EXPORT */
|
||||
Reference in new issue
Block a user