Make glib_thread_test not unnecessarily convert between int and void*.
authorSebastian Wilhelmi <seppi@seppi.de>
Tue, 18 Feb 2003 14:00:16 +0000 (14:00 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Tue, 18 Feb 2003 14:00:16 +0000 (14:00 +0000)
2003-02-18  Sebastian Wilhelmi  <seppi@seppi.de>

* configure.in: Make glib_thread_test not unnecessarily convert
between int and void*. (#106278). Let main return int.

* configure.in: Add an argument to specify the default thread
attribute to glib_thread_test. Disappeared somewhere between 2.0
and 2.2.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
configure.in

index da4d62f..f4fbd5e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-02-18  Sebastian Wilhelmi  <seppi@seppi.de>
+
+       * configure.in: Make glib_thread_test not unnecessarily convert
+       between int and void*. (#106278). Let main return int.
+
+       * configure.in: Add an argument to specify the default thread
+       attribute to glib_thread_test. Disappeared somewhere between 2.0
+       and 2.2.
+
 2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
 
        Fixes for #101264 and #99372:
index da4d62f..f4fbd5e 100644 (file)
@@ -1,3 +1,12 @@
+2003-02-18  Sebastian Wilhelmi  <seppi@seppi.de>
+
+       * configure.in: Make glib_thread_test not unnecessarily convert
+       between int and void*. (#106278). Let main return int.
+
+       * configure.in: Add an argument to specify the default thread
+       attribute to glib_thread_test. Disappeared somewhere between 2.0
+       and 2.2.
+
 2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
 
        Fixes for #101264 and #99372:
index da4d62f..f4fbd5e 100644 (file)
@@ -1,3 +1,12 @@
+2003-02-18  Sebastian Wilhelmi  <seppi@seppi.de>
+
+       * configure.in: Make glib_thread_test not unnecessarily convert
+       between int and void*. (#106278). Let main return int.
+
+       * configure.in: Add an argument to specify the default thread
+       attribute to glib_thread_test. Disappeared somewhere between 2.0
+       and 2.2.
+
 2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
 
        Fixes for #101264 and #99372:
index da4d62f..f4fbd5e 100644 (file)
@@ -1,3 +1,12 @@
+2003-02-18  Sebastian Wilhelmi  <seppi@seppi.de>
+
+       * configure.in: Make glib_thread_test not unnecessarily convert
+       between int and void*. (#106278). Let main return int.
+
+       * configure.in: Add an argument to specify the default thread
+       attribute to glib_thread_test. Disappeared somewhere between 2.0
+       and 2.2.
+
 2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
 
        Fixes for #101264 and #99372:
index da4d62f..f4fbd5e 100644 (file)
@@ -1,3 +1,12 @@
+2003-02-18  Sebastian Wilhelmi  <seppi@seppi.de>
+
+       * configure.in: Make glib_thread_test not unnecessarily convert
+       between int and void*. (#106278). Let main return int.
+
+       * configure.in: Add an argument to specify the default thread
+       attribute to glib_thread_test. Disappeared somewhere between 2.0
+       and 2.2.
+
 2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
 
        Fixes for #101264 and #99372:
index da4d62f..f4fbd5e 100644 (file)
@@ -1,3 +1,12 @@
+2003-02-18  Sebastian Wilhelmi  <seppi@seppi.de>
+
+       * configure.in: Make glib_thread_test not unnecessarily convert
+       between int and void*. (#106278). Let main return int.
+
+       * configure.in: Add an argument to specify the default thread
+       attribute to glib_thread_test. Disappeared somewhere between 2.0
+       and 2.2.
+
 2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
 
        Fixes for #101264 and #99372:
index 2718bdd..d2ed1f5 100644 (file)
@@ -1304,13 +1304,13 @@ dnl
 m4_define([glib_thread_test],[
 #include <pthread.h> 
 int check_me = 0;
-void* func(void* data) {return check_me = 42;}
-main()
+void* func(void* data) {check_me = 42; return &check_me;}
+int main()
  { pthread_t t; 
    void *ret;
-   pthread_create (&t, 0, func, 0);
+   pthread_create (&t, $1, func, 0);
    pthread_join (t, &ret);
-   exit (check_me != 42 || ret != 42);
+   exit (check_me != 42 || ret != &check_me);
 }])
 
 dnl
@@ -1335,10 +1335,10 @@ if test x"$have_threads" != xno; then
     for flag in pthread pthreads; do
       glib_save_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -$flag"
-      AC_TRY_RUN(glib_thread_test,
+      AC_TRY_RUN(glib_thread_test(0),
                  glib_flag_works=yes,
                  glib_flag_works=no,
-                 [AC_LINK_IFELSE(glib_thread_test,
+                 [AC_LINK_IFELSE(glib_thread_test(0),
                                  glib_flag_works=yes,
                                  glib_flag_works=no)])
       CFLAGS="$glib_save_CFLAGS"
@@ -1462,10 +1462,10 @@ case $have_threads in
                        LIBS="$add_thread_lib $glib_save_LIBS"
                        
                        AC_MSG_CHECKING(for pthread_create/pthread_join$IN)
-                       AC_TRY_RUN(glib_thread_test,
+                       AC_TRY_RUN(glib_thread_test($defattr),
                                    glib_result=yes,
                                    glib_result=no,
-                                   [AC_LINK_IFELSE(glib_thread_test,
+                                   [AC_LINK_IFELSE(glib_thread_test($defattr),
                                                    glib_result=yes,
                                                    glib_result=no)])
                         AC_MSG_RESULT($glib_result)