mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 04:00:26 +02:00
Merge commit '2e77f7202b
' into boehm-demers-weiser-gc
Conflicts: libguile/threads.c
This commit is contained in:
commit
e0513d4d77
20 changed files with 1120 additions and 55 deletions
26
configure.in
26
configure.in
|
@ -1102,6 +1102,7 @@ AC_ARG_WITH(threads, [ --with-threads thread interface],
|
|||
, with_threads=yes)
|
||||
|
||||
AC_SUBST(SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT, 0)
|
||||
AC_SUBST(SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER, 0)
|
||||
|
||||
case "$with_threads" in
|
||||
"yes" | "pthread" | "pthreads" | "pthread-threads" | "")
|
||||
|
@ -1125,23 +1126,42 @@ case "$with_threads" in
|
|||
|
||||
# On past versions of Solaris, believe 8 through 10 at least, you
|
||||
# had to write "pthread_once_t foo = { PTHREAD_ONCE_INIT };".
|
||||
# This is contrary to posix:
|
||||
# This is contrary to POSIX:
|
||||
# http://www.opengroup.org/onlinepubs/000095399/functions/pthread_once.html
|
||||
# Check here if this style is required.
|
||||
#
|
||||
# glibc (2.3.6 at least) works both with or without braces, so the
|
||||
# test checks whether it works without.
|
||||
#
|
||||
|
||||
if test "$GCC" = "yes"; then
|
||||
# Since GCC only issues a warning for missing braces, so we need
|
||||
# `-Werror' to catch it.
|
||||
CFLAGS="-Werror -Wmissing-braces $CFLAGS"
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([whether PTHREAD_ONCE_INIT needs braces],
|
||||
guile_cv_need_braces_on_pthread_once_init,
|
||||
[AC_TRY_COMPILE([#include <pthread.h>],
|
||||
[pthread_once_t foo = PTHREAD_ONCE_INIT;],
|
||||
[AC_COMPILE_IFELSE([#include <pthread.h>
|
||||
pthread_once_t foo = PTHREAD_ONCE_INIT;],
|
||||
[guile_cv_need_braces_on_pthread_once_init=no],
|
||||
[guile_cv_need_braces_on_pthread_once_init=yes])])
|
||||
if test "$guile_cv_need_braces_on_pthread_once_init" = yes; then
|
||||
SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT=1
|
||||
fi
|
||||
|
||||
# Same problem with `PTHREAD_MUTEX_INITIALIZER', e.g., on IRIX
|
||||
# 6.5.30m with GCC 3.3.
|
||||
AC_CACHE_CHECK([whether PTHREAD_MUTEX_INITIALIZER needs braces],
|
||||
guile_cv_need_braces_on_pthread_mutex_initializer,
|
||||
[AC_COMPILE_IFELSE([#include <pthread.h>
|
||||
pthread_mutex_t foo = PTHREAD_MUTEX_INITIALIZER;],
|
||||
[guile_cv_need_braces_on_pthread_mutex_initializer=no],
|
||||
[guile_cv_need_braces_on_pthread_mutex_initializer=yes])])
|
||||
if test "$guile_cv_need_braces_on_pthread_mutex_initializer" = yes; then
|
||||
SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER=1
|
||||
fi
|
||||
|
||||
CFLAGS="$old_CFLAGS"
|
||||
|
||||
# On Solaris, sched_yield lives in -lrt.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue