win32 fixes from g_thread_init() deprecation

I can't even begin to imagine how these fell through the cracks...
This commit is contained in:
Ryan Lortie 2011-10-04 15:44:48 -04:00
parent 1bf01efb9f
commit 2e5cb6f522
3 changed files with 2 additions and 27 deletions

View File

@ -74,10 +74,8 @@
#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. */

View 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");

View 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"
@ -137,9 +138,7 @@
#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)
{