diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 1999-01-07 16:17:42 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 1999-01-07 16:17:42 +0000 |
commit | 81f8d0bb10c945c459b2a8063bf70039be113771 (patch) | |
tree | ca4b4ce4df360d0a728e542beeb92aa455e3f712 /configure.in | |
parent | 9200f444626fd7b814c30f351f872a11e0d9a64c (diff) |
Here we must replace getpwuid by getpwuid_r, but as I do not know how for
1999-01-07 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gutils.c (g_get_any_init): Here we must replace getpwuid by
getpwuid_r, but as I do not know how for now, I just made a FIXME
note ;-)
* gdate.c (g_date_set_time): localtime --> localtime_r to make it
thread safe.
* configure.in: We do not need to check for broken solaris mutex
intitializer any longer. Provide a macro to show the used thread
implementation. Not nice, but this is needed until thread support
is completed here inside glib.
* gthread/testgthread.c: conditionally compile according to the
G_THREADS_IMPL_??? macros.
(test_private_func): use rand_r instead of rand to make it
thread safe.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/configure.in b/configure.in index 901bb5cac..b6b0ba119 100644 --- a/configure.in +++ b/configure.in @@ -628,35 +628,27 @@ case $have_threads in mutex_default_type='pthread_mutex_t' mutex_default_init='PTHREAD_MUTEX_INITIALIZER' mutex_header_file='pthread.h' + g_threads_impl="POSIX" ;; solaris) G_THREAD_LIBS=error AC_CHECK_LIB(thread, cond_init, G_THREAD_LIBS="-lthread") - # solaris has a broken initializer for mutexes, if we find it, - # we will replace it. - AC_MSG_CHECKING(for broken solaris mutex initialization) - AC_EGREP_CPP([ *begin *{ *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *, *0 *} *end *], - [#include <thread.h> - begin DEFAULTMUTEX end], - [solaris_mutex_init_broken=yes], - [solaris_mutex_init_broken=no]) - AC_MSG_RESULT($solaris_mutex_init_broken) mutex_has_default=yes mutex_default_type='mutex_t' - if test x$solaris_mutex_init_broken = xyes; then - mutex_default_init="{ { { 0, 0, 0, 0 }, USYNC_THREAD }, { { { 0, 0, 0, 0, 0, 0, 0, 0 } } }, 0}" - else - mutex_default_init="DEFAULTMUTEX" - fi + mutex_default_init="DEFAULTMUTEX" mutex_header_file='thread.h' + g_threads_impl="SOLARIS" ;; nspr) AC_CHECK_LIB(nspr21, PRP_NewNakedCondVar, G_THREAD_LIBS="-lnspr21") + g_threads_impl="NSPR" ;; none) + g_threads_impl="NONE" ;; *) + g_threads_impl="NONE" G_THREAD_LIBS=error ;; esac @@ -718,7 +710,6 @@ AC_SUBST(G_THREAD_LIBS) CFLAGS="$CFLAGS $G_THREAD_CFLAGS" - dnl ********************************************** dnl *** GDefaultMutex setup and initialization *** dnl ********************************************** @@ -890,6 +881,7 @@ _______EOF if test x$g_mutex_has_default = xyes; then cat >>$outfile <<_______EOF $g_enable_threads_def G_THREADS_ENABLED +#define G_THREADS_IMPL_$g_threads_impl_def typedef struct _GStaticMutex GStaticMutex; struct _GStaticMutex { @@ -909,6 +901,7 @@ _______EOF else cat >>$outfile <<_______EOF $g_enable_threads_def G_THREADS_ENABLED +#define $g_threads_impl_def typedef struct _GMutex* GStaticMutex; #define G_STATIC_MUTEX_INIT NULL #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (&(mutex))) @@ -1182,6 +1175,8 @@ xyes) g_enable_threads_def="#define";; *) g_enable_threads_def="#undef ";; esac +g_threads_impl_def=$g_threads_impl + g_mutex_has_default="$mutex_has_default" g_mutex_sizeof="$glib_cv_sizeof_gmutex" g_mutex_contents="$glib_cv_byte_contents_gmutex" |