Martchus
9acd7dd342
Use pkgconfig file for intl dependency, otherwise transitive dependency iconv is not added correctly when using pkgconfig --static flag.
58 lines
1.3 KiB
Diff
58 lines
1.3 KiB
Diff
diff -Naur glib-2.46.0-orig/glib/glib-init.c glib-2.46.0/glib/glib-init.c
|
|
--- glib-2.46.0-orig/glib/glib-init.c 2015-09-12 18:13:45.000000000 +0300
|
|
+++ glib-2.46.0/glib/glib-init.c 2015-09-22 09:09:00.512195800 +0300
|
|
@@ -238,12 +238,14 @@
|
|
|
|
#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,
|
|
@@ -253,11 +255,6 @@
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
glib_dll = hinstDLL;
|
|
- g_clock_win32_init ();
|
|
-#ifdef THREADS_WIN32
|
|
- g_thread_win32_init ();
|
|
-#endif
|
|
- glib_init ();
|
|
break;
|
|
|
|
case DLL_THREAD_DETACH:
|
|
@@ -274,7 +271,10 @@
|
|
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)
|
|
@@ -284,6 +284,12 @@
|
|
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 ();
|
|
}
|
|
|