win32 fixes from g_thread_init() deprecation
authorRyan Lortie <desrt@desrt.ca>
Tue, 4 Oct 2011 19:44:48 +0000 (15:44 -0400)
committerRyan Lortie <desrt@desrt.ca>
Tue, 4 Oct 2011 19:44:48 +0000 (15:44 -0400)
I can't even begin to imagine how these fell through the cracks...

glib/gmessages.c
glib/gthread-win32.c
glib/gutils.c

index 5a5669f..ae1510b 100644 (file)
 #ifdef G_OS_WIN32
 #include <process.h>           /* For getpid() */
 #include <io.h>
-#  define STRICT               /* Strict typing, please */
 #  define _WIN32_WINDOWS 0x0401 /* to get IsDebuggerPresent */
 #  include <windows.h>
-#  undef STRICT
 #endif
 
 
@@ -114,9 +112,7 @@ static gpointer          fatal_log_data;
 
 /* --- functions --- */
 #ifdef G_OS_WIN32
-#  define STRICT
 #  include <windows.h>
-#  undef STRICT
 static gboolean win32_keep_fatal_message = FALSE;
 
 /* This default message will usually be overwritten. */
index efd0a70..8607431 100644 (file)
@@ -1071,7 +1071,7 @@ g_thread_lookup_native_funcs (void)
 }
 
 G_GNUC_INTERNAL void
-g_thread_DllMain (void)
+g_thread_win32_init (void)
 {
   if (g_thread_lookup_native_funcs ())
     fprintf (stderr, "(debug) GThread using native mode\n");
index 0a66998..cfafbfd 100644 (file)
@@ -99,6 +99,7 @@
 #define        __G_UTILS_C__
 #include "gutils.h"
 
+#include "glib-init.h"
 #include "gfileutils.h"
 #include "ghash.h"
 #include "gslist.h"
 #endif
 
 #ifdef G_PLATFORM_WIN32
-#  define STRICT               /* Strict typing, please */
 #  include <windows.h>
-#  undef STRICT
 #  ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
 #    define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2
 #    define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4
@@ -191,26 +190,6 @@ const guint glib_binary_age = GLIB_BINARY_AGE;
 
 #ifdef G_PLATFORM_WIN32
 
-static HMODULE glib_dll = NULL;
-
-#ifdef DLL_EXPORT
-
-BOOL WINAPI
-DllMain (HINSTANCE hinstDLL,
-        DWORD     fdwReason,
-        LPVOID    lpvReserved)
-{
-  if (fdwReason == DLL_PROCESS_ATTACH)
-    {
-      glib_dll = hinstDLL;
-      g_thread_DllMain ();
-    }
-
-  return TRUE;
-}
-
-#endif
-
 gchar *
 _glib_get_dll_directory (void)
 {