Permalink
Browse files

glib: Add DllMain alias gio_DllMain/glib_DllMain

  • Loading branch information...
1 parent 72694c7 commit cdaffc615025d1a50a2c30409abd801f0079266b @mgehre mgehre committed Apr 14, 2012
Showing with 59 additions and 0 deletions.
  1. +59 −0 src/glib-2-DllMain.patch
View
@@ -0,0 +1,59 @@
+diff -uNr glib-2.28.8-orig/gio/giomodule.c glib/gio/giomodule.c
+--- glib-2.28.8-orig/gio/giomodule.c 2011-01-05 22:44:06.000000000 +0100
++++ glib/gio/giomodule.c 2011-11-23 21:04:43.867004895 +0100
+@@ -489,10 +489,8 @@
+
+ static HMODULE gio_dll = NULL;
+
+-#ifdef DLL_EXPORT
+-
+ BOOL WINAPI
+-DllMain (HINSTANCE hinstDLL,
++gio_DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+ {
+@@ -502,8 +500,6 @@
+ return TRUE;
+ }
+
+-#endif
+-
+ #undef GIO_MODULE_DIR
+
+ /* GIO_MODULE_DIR is used only in code called just once,
+diff -uNr glib-2.28.8-orig/glib/gutils.c glib/glib/gutils.c
+--- glib-2.28.8-orig/glib/gutils.c 2011-06-06 01:18:49.000000000 +0200
++++ glib/glib/gutils.c 2011-11-23 21:05:07.822988144 +0100
+@@ -144,10 +144,8 @@
+
+ static HMODULE glib_dll = NULL;
+
+-#ifdef DLL_EXPORT
+-
+ BOOL WINAPI
+-DllMain (HINSTANCE hinstDLL,
++glib_DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+ {
+@@ -157,8 +155,6 @@
+ return TRUE;
+ }
+
+-#endif
+-
+ gchar *
+ _glib_get_dll_directory (void)
+ {
+@@ -166,10 +162,8 @@
+ gchar *p;
+ wchar_t wc_fn[MAX_PATH];
+
+-#ifdef DLL_EXPORT
+ if (glib_dll == NULL)
+ return NULL;
+-#endif
+
+ /* This code is different from that in
+ * g_win32_get_package_installation_directory_of_module() in that

0 comments on commit cdaffc6

Please sign in to comment.