diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 1999-02-08 17:14:44 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 1999-02-08 17:14:44 +0000 |
commit | fa5d3b74b00bbe76f893b7a83b5a48084c015a18 (patch) | |
tree | e426a5e184a6d7a1fa46ac75c0f009a44e125a10 /gthread/gthread-posix.c | |
parent | 9071de6fdc9d39e5443d1982cf7689f5d2fc9d45 (diff) | |
download | glib-fa5d3b74b00bbe76f893b7a83b5a48084c015a18.tar.gz |
Changed the test for getpwuid_r to exclude those systems (i.e. IRIX), that
1999-02-08 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in, acconfig.h: Changed the test for getpwuid_r to
exclude those systems (i.e. IRIX), that set ENOSYS after the call.
Test, if pthread_getspecific is posix like or something different,
as on PCThreads.
* gthread/gthread-posix.c (g_private_get_posix_impl): Use the
HAVE_PTHREAD_GETSPECIFIC_POSIX macro to determine, which signature
to use for pthread_getspecific.
Diffstat (limited to 'gthread/gthread-posix.c')
-rw-r--r-- | gthread/gthread-posix.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gthread/gthread-posix.c b/gthread/gthread-posix.c index e35acbdd5..33a520a8a 100644 --- a/gthread/gthread-posix.c +++ b/gthread/gthread-posix.c @@ -155,8 +155,15 @@ g_private_get_posix_impl (GPrivate * private_key) { if (!private_key) return NULL; - +#ifdef HAVE_PTHREAD_GETSPECIFIC_POSIX return pthread_getspecific (*(pthread_key_t *) private_key); +#else /* HAVE_PTHREAD_GETSPECIFIC_POSIX */ + { + void* data; + pthread_getspecific (*(pthread_key_t *) private_key, &data); + return data; + } +#endif /* HAVE_PTHREAD_GETSPECIFIC_POSIX */ } static GThreadFunctions g_thread_functions_for_glib_use_default = |