summaryrefslogtreecommitdiff
path: root/gthread
diff options
context:
space:
mode:
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>1999-02-08 17:14:44 +0000
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>1999-02-08 17:14:44 +0000
commitfa5d3b74b00bbe76f893b7a83b5a48084c015a18 (patch)
treee426a5e184a6d7a1fa46ac75c0f009a44e125a10 /gthread
parent9071de6fdc9d39e5443d1982cf7689f5d2fc9d45 (diff)
downloadglib-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')
-rw-r--r--gthread/ChangeLog6
-rw-r--r--gthread/gthread-posix.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/gthread/ChangeLog b/gthread/ChangeLog
index c46243772..414426681 100644
--- a/gthread/ChangeLog
+++ b/gthread/ChangeLog
@@ -1,3 +1,9 @@
+1999-02-08 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
+
+ * gthread-posix.c (g_private_get_posix_impl): Use the
+ HAVE_PTHREAD_GETSPECIFIC_POSIX macro to determine, which signature
+ to use for pthread_getspecific.
+
Tue Jan 19 20:56:02 1999 Tor Lillqvist <tml@iki.fi>
* Makefile.am (EXTRA_DIST): Added gthread.def.
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 =