diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 1999-11-16 10:30:25 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 1999-11-16 10:30:25 +0000 |
commit | 760a7ceef2b85c64a52e1d6c0153c3b1f397fb8d (patch) | |
tree | 6c8d556864ffe39286f9e9060e23e57521d75354 /configure.in | |
parent | f0f028abd2df8255a68165c11d22e0433b600fdf (diff) | |
download | glib-760a7ceef2b85c64a52e1d6c0153c3b1f397fb8d.tar.gz |
Renamed GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect
1999-11-16 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* acconfig.h, config.h.win32.in, configure.in: Renamed
GLIB_SIZEOF_PTHREAD_T to GLIB_SIZEOF_SYSTEM_THREAD to reflect
changed meaning.
* configure.in: Cope with systems, that have a pthread_t type,
that is not a pointer. Hint from Karl Nelson
<kenelson@ece.ucdavis.edu>. Define GLIB_SIZEOF_SYSTEM_THREAD to 4
for Solaris. Cope with systems, that have no default mutex
initialize, like obviously most DCE systems.
* glib.h, gthread.c: Changed the prototype of thread_create and
thread_self to return the system thread into provided memory
instead of a return value. This is necessary, as HPUX has a
pthread_t, that is bigger than the biggest integral type there.
* gthread.c: system_thread is no longer a pointer, but an memory
area of size GLIB_SIZEOF_SYSTEM_THREAD. Changed the
zeroinitialization and the tests for zeroness accordingly.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/configure.in b/configure.in index a4ff76052..0a43716c2 100644 --- a/configure.in +++ b/configure.in @@ -736,7 +736,7 @@ case $have_threads in AC_MSG_CHECKING(for pthread_join$IN) AC_TRY_LINK([#include <pthread.h>], - [pthread_join(NULL,NULL)], + [pthread_t t; pthread_join(t,NULL)], [AC_MSG_RESULT(yes) G_THREAD_LIBS="$add_thread_lib" break], @@ -876,12 +876,12 @@ if test x"$enable_threads" = xyes; then if test x"$have_threads" = xposix; then GLIB_SIZEOF([#include <pthread.h>], pthread_t, - pthread_t) + system_thread) # This is not AC_CHECK_FUNC to also work with function # name mangling in header files. AC_MSG_CHECKING(for pthread_attr_setstacksize) AC_TRY_LINK([#include <pthread.h>], - [pthread_attr_setstacksize(NULL,0)], + [pthread_attr_t t; pthread_attr_setstacksize(&t,0)], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE)], [AC_MSG_RESULT(no)]) @@ -942,7 +942,12 @@ if test x"$enable_threads" = xyes; then posix_yield_func="$posix_yield_func()" fi AC_DEFINE_UNQUOTED(POSIX_YIELD_FUNC,$posix_yield_func) + else + # for now, the only other implementation is solaris + # -> there 4 bytes are enough + AC_DEFINE_UNQUOTED(GLIB_SIZEOF_SYSTEM_THREAD, 4) fi + LIBS="$glib_save_LIBS" CFLAGS="$glib_save_CFLAGS" @@ -978,6 +983,9 @@ GLIB_IF_VAR_EQ(mutex_has_default, yes, gmutex, $glib_cv_sizeof_gmutex, $mutex_default_init) + if test x"$glib_cv_byte_contents_gmutex" = xno; then + mutex_has_default=no + fi if test x"$have_threads" = xposix; then GLIB_BYTE_CONTENTS([#define __USE_GNU #include <$mutex_header_file>], @@ -1182,7 +1190,7 @@ _______EOF # typedef GStaticMutex GStaticRecMutex to avoid silent # compilation, when a GStaticRecMutex is used where a # GStaticMutex should have been used and vice versa, - # because that micht fail on other platforms. + # because that might fail on other platforms. cat >>$outfile <<_______EOF typedef struct _GStaticRecMutex GStaticRecMutex; struct _GStaticRecMutex |