fix pthread compiler flag detection

This commit is contained in:
Matthias Clasen 2006-08-28 03:54:28 +00:00
parent 72520d46bc
commit 77332513b9
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
2006-08-27 Matthias Clasen <mclasen@redhat.com> 2006-08-27 Matthias Clasen <mclasen@redhat.com>
* configure.in: Fix pthread compiler flag detection.
* glib/gtimer.c: Use Posix monotonic clocks instead of * glib/gtimer.c: Use Posix monotonic clocks instead of
gettimeofday when available. (#336114, William Jon McCann) gettimeofday when available. (#336114, William Jon McCann)

View File

@ -1545,7 +1545,6 @@ dnl
dnl Test program for basic POSIX threads functionality dnl Test program for basic POSIX threads functionality
dnl dnl
m4_define([glib_thread_test],[ m4_define([glib_thread_test],[
#include <stdlib.h>
#include <pthread.h> #include <pthread.h>
int check_me = 0; int check_me = 0;
void* func(void* data) {check_me = 42; return &check_me;} void* func(void* data) {check_me = 42; return &check_me;}
@ -1554,7 +1553,7 @@ int main()
void *ret; void *ret;
pthread_create (&t, $1, func, 0); pthread_create (&t, $1, func, 0);
pthread_join (t, &ret); pthread_join (t, &ret);
exit (check_me != 42 || ret != &check_me); return (check_me != 42 || ret != &check_me);
}]) }])
dnl dnl
@ -1594,6 +1593,7 @@ if test x"$have_threads" != xno; then
if test $glib_flag_works = yes ; then if test $glib_flag_works = yes ; then
G_THREAD_CFLAGS=-$flag G_THREAD_CFLAGS=-$flag
G_THREAD_LIBS=-$flag G_THREAD_LIBS=-$flag
break;
fi fi
done done
;; ;;