removed glib.def from EXTRA_DIST ... ... and added it here.
[platform/upstream/glib.git] / tests / mainloop-test.c
index 5aba25e..7fb0004 100644 (file)
@@ -8,6 +8,7 @@
 
 #ifdef G_OS_WIN32
 #include <fcntl.h>             /* For _O_BINARY used by pipe() macro */
+#include <io.h>                        /* for _pipe() */
 #endif
 
 #define ITERS 10000
@@ -123,7 +124,7 @@ timeout_callback (gpointer data)
   return TRUE;
 }
 
-void
+gpointer
 adder_thread (gpointer data)
 {
   GMainContext *context;
@@ -133,7 +134,7 @@ adder_thread (gpointer data)
   GIOChannel **channels = data;
   AddrData addr_data;
 
-  context = g_main_context_get (g_thread_self());
+  context = g_main_context_new ();
 
   g_mutex_lock (context_array_mutex);
   
@@ -179,6 +180,8 @@ adder_thread (gpointer data)
   g_mutex_unlock (context_array_mutex);
 
   cleanup_crawlers (context);
+
+  return NULL;
 }
 
 void
@@ -265,8 +268,7 @@ create_adder_thread (void)
   sub_channels[0] = in_channels[0];
   sub_channels[1] = out_channels[1];
 
-  g_thread_create (adder_thread, sub_channels, 0,
-                  FALSE, TRUE, G_THREAD_PRIORITY_NORMAL, &err);
+  g_thread_create (adder_thread, sub_channels, FALSE, &err);
 
   if (err)
     {