mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
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:
parent
1bf01efb9f
commit
2e5cb6f522
@ -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. */
|
||||
|
@ -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");
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user