[glib] Actually Don't define GLIB_COMPILATION in libgthread



commit cf3f1b026b13fe377057f6e1102eefaad1e24c72
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Oct 18 14:15:07 2011 +0200

    Actually Don't define GLIB_COMPILATION in libgthread
    
    Last commit was wrong, fixing it up

 glib/gthread-win32.c   |    9 +++++++--
 gthread/Makefile.am    |    1 -
 gthread/gthread-impl.c |    4 ++++
 3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c
index dd777c2..96c6a1c 100644
--- a/glib/gthread-win32.c
+++ b/glib/gthread-win32.c
@@ -963,8 +963,13 @@ g_thread_lookup_native_funcs (void)
 G_GNUC_INTERNAL void
 g_thread_win32_init (void)
 {
-  if (!g_thread_lookup_native_funcs ())
-    g_thread_xp_init ();
+  if (g_thread_lookup_native_funcs ())
+    fprintf (stderr, "(debug) GThread using native mode\n");
+  else
+    {
+      fprintf (stderr, "(debug) GThread using Windows XP mode\n");
+      g_thread_xp_init ();
+    }
 
   InitializeCriticalSection (&g_private_lock);
 }
diff --git a/gthread/Makefile.am b/gthread/Makefile.am
index 4cf4df0..325fec4 100644
--- a/gthread/Makefile.am
+++ b/gthread/Makefile.am
@@ -4,7 +4,6 @@ include $(top_srcdir)/Makefile.decl
 AM_CPPFLAGS = 				\
 	$(glib_INCLUDES) 		\
 	-DG_LOG_DOMAIN=\"GThread\" 	\
-	-DGLIB_COMPILATION		\
 	@GTHREAD_COMPILE_IMPL_DEFINES@ 	\
 	@GLIB_DEBUG_FLAGS@
 
diff --git a/gthread/gthread-impl.c b/gthread/gthread-impl.c
index c7f61a3..fd03b1d 100644
--- a/gthread/gthread-impl.c
+++ b/gthread/gthread-impl.c
@@ -36,9 +36,13 @@
 void
 g_thread_init (gpointer init)
 {
+  if (init != NULL)
+    g_warning ("GThread system no longer supports custom thread implementations.");
 }
 
 void
 g_thread_init_with_errorcheck_mutexes (gpointer vtable)
 {
+  g_assert (vtable == NULL);
+  g_warning ("GThread system no longer supports errorcheck mutexes.");
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]