diff options
Diffstat (limited to 'glib-prefer-constructors-over-DllMain.patch')
-rw-r--r-- | glib-prefer-constructors-over-DllMain.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/glib-prefer-constructors-over-DllMain.patch b/glib-prefer-constructors-over-DllMain.patch deleted file mode 100644 index 4e08af083617..000000000000 --- a/glib-prefer-constructors-over-DllMain.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff -rupN --no-dereference glib-2.63.5/glib/glib-init.c glib-2.63.5-new/glib/glib-init.c ---- glib-2.63.5/glib/glib-init.c 2020-02-03 15:28:28.000000000 +0100 -+++ glib-2.63.5-new/glib/glib-init.c 2020-02-11 10:12:24.070832245 +0100 -@@ -271,12 +271,14 @@ glib_init (void) - - #if defined (G_OS_WIN32) - -+HMODULE glib_dll = NULL; -+ -+#if defined (DLL_EXPORT) -+ - BOOL WINAPI DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, - LPVOID lpvReserved); - --HMODULE glib_dll; -- - BOOL WINAPI - DllMain (HINSTANCE hinstDLL, - DWORD fdwReason, -@@ -286,14 +288,6 @@ DllMain (HINSTANCE hinstDLL, - { - case DLL_PROCESS_ATTACH: - glib_dll = hinstDLL; -- g_crash_handler_win32_init (); -- g_clock_win32_init (); --#ifdef THREADS_WIN32 -- g_thread_win32_init (); --#endif -- glib_init (); -- /* must go after glib_init */ -- g_console_win32_init (); - break; - - case DLL_THREAD_DETACH: -@@ -318,7 +312,10 @@ DllMain (HINSTANCE hinstDLL, - return TRUE; - } - --#elif defined (G_HAS_CONSTRUCTORS) -+#endif /* defined (DLL_EXPORT) */ -+#endif /* defined (G_OS_WIN32) */ -+ -+#if defined (G_HAS_CONSTRUCTORS) - - #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA - #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(glib_init_ctor) -@@ -328,7 +325,15 @@ G_DEFINE_CONSTRUCTOR(glib_init_ctor) - static void - glib_init_ctor (void) - { -+#if defined (G_OS_WIN32) -+ g_clock_win32_init (); -+#ifdef THREADS_WIN32 -+ g_thread_win32_init (); -+#endif /* defined (THREADS_WIN32) */ -+#endif /* defined (G_OS_WIN32) */ - glib_init (); -+ /* must go after glib_init */ -+ g_console_win32_init (); - } - - #else |