Commit fa5d3b74 authored by Sebastian Wilhelmi's avatar Sebastian Wilhelmi Committed by Sebastian Wilhelmi

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.
parent 9071de6f
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
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.
Sun Feb 7 21:56:00 1999 Owen Taylor <otaylor@redhat.com>
* gmem.c (g_mem_profile): Copy all elements
......
......@@ -46,9 +46,12 @@
#undef HAVE_BROKEN_WCTYPE
#undef HAVE_DOPRNT
#undef HAVE_FLOAT_H
#undef HAVE_GETPWUID_R
#undef HAVE_GETPWUID_R_POSIX
#undef HAVE_LIMITS_H
#undef HAVE_LONG_DOUBLE
#undef HAVE_POLL
#undef HAVE_PTHREAD_GETSPECIFIC_POSIX
#undef HAVE_PWD_H
#undef HAVE_SYS_PARAM_H
#undef HAVE_SYS_POLL_H
......@@ -92,7 +95,6 @@
#undef G_THREAD_SOURCE
#undef HAVE_GETPWUID_R_POSIX
/* #undef PACKAGE */
/* #undef VERSION */
......
......@@ -573,12 +573,12 @@ LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation
LIBS_NOT_FOUND_2=". Please choose another thread implementation or
provide information on your thread implementation.
You can also use the '--disable-threads' flag for configure
You can also run 'configure --disable-threads'
to compile without thread support."
FUNC_NO_GETPWUID_R="the 'g_get_(user_name|real_name|home_dir|tmp_dir)'
functions will not be MT-safe during their first call because
there is no 'getpwuid_r' on your system."
there is no working 'getpwuid_r' on your system."
FUNC_NO_LOCALTIME_R="the 'g_date_set_time' function will not be MT-safe
because there is no 'localtime_r' on your system."
......@@ -734,7 +734,24 @@ if test x"$have_threads" != xnone; then
CFLAGS="$CFLAGS $G_THREAD_CFLAGS"
AC_CHECK_FUNCS(localtime_r rand_r)
if test "$ac_cv_header_pwd_h" = "yes"; then
AC_CHECK_FUNCS(getpwuid_r)
AC_MSG_CHECKING([for getpwuid_r])
AC_CACHE_VAL(ac_cv_func_getpwuid_r,
[AC_TRY_RUN([#include <errno.h>
int main () { char buffer[10000], *pointer;
char getpwuid_r (long, void*, void*,
int, void*);
errno = 0;
getpwuid_r (0, &buffer, &buffer,
sizeof (buffer), &pointer);
return errno == ENOSYS;}],
[ac_cv_func_getpwuid_r=yes],
[ac_cv_func_getpwuid_r=no])])
if test "$ac_cv_func_getpwuid_r" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETPWUID_R)
else
AC_MSG_RESULT(no)
fi
if test "$ac_cv_func_getpwuid_r" = "yes"; then
AC_MSG_CHECKING(whether getpwuid_r is posix like)
# getpwuid_r(0, NULL, NULL, 0) is the signature on
......@@ -748,6 +765,15 @@ if test x"$have_threads" != xnone; then
AC_DEFINE(HAVE_GETPWUID_R_POSIX)])
fi
fi
if test x"$have_threads" = xposix; then
AC_MSG_CHECKING(whether pthread_getspecific is posix like)
# PCThreads has pthread_getspecific(pthread_key_t, void **);
AC_TRY_COMPILE([#include <pthread.h>],
[pthread_getspecific(0,NULL);],
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
fi
LIBS="$glib_save_LIBS"
CFLAGS="$glib_save_CFLAGS"
fi
......
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.
......
......@@ -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 =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment