mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Changes from arch/CVS synchronization
This commit is contained in:
parent
1445e4492f
commit
6630261802
7 changed files with 53 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
|||
2007-10-10 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
* configure.in (SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT):
|
||||
New substituted variable.
|
||||
Use `-Werror' when using GCC and checking for
|
||||
`PTHREAD_ONCE_INIT'. Add check for braces around
|
||||
`PTHREAD_MUTEX_INITIALIZER'.
|
||||
* NEWS: Mention build fix for IRIX.
|
||||
|
||||
2007-10-02 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
* NEWS: Mention `(ice-9 slib)' fix and threading fix.
|
||||
|
|
2
NEWS
2
NEWS
|
@ -47,7 +47,7 @@ Changes in 1.8.3 (since 1.8.2)
|
|||
** A memory leak in `make-socket-address' was fixed
|
||||
** Alignment issues (e.g., on SPARC) in network routines were fixed
|
||||
** A threading issue that showed up at least on NetBSD was fixed
|
||||
** Build problems on Solaris fixed
|
||||
** Build problems on Solaris and IRIX fixed
|
||||
|
||||
* Implementation improvements
|
||||
|
||||
|
|
26
configure.in
26
configure.in
|
@ -1090,6 +1090,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" | "")
|
||||
|
@ -1113,23 +1114,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.
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2007-10-10 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
* pthread-threads.h (SCM_I_PTHREAD_MUTEX_INITIALIZER): Check
|
||||
`SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
|
||||
* gen-scmconfig.h.in
|
||||
(SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER): New.
|
||||
* gen-scmconfig.c (main): Define
|
||||
`SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER'.
|
||||
|
||||
2007-10-04 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
* i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
|
||||
|
|
|
@ -382,6 +382,11 @@ main (int argc, char *argv[])
|
|||
pf ("#define SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT %d /* 0 or 1 */\n",
|
||||
SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT);
|
||||
|
||||
pf ("/* Define to 1 if need braces around PTHREAD_MUTEX_INITIALIZER\n"
|
||||
" (for IRIX with GCC) */\n");
|
||||
pf ("#define SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER %d /* 0 or 1 */\n",
|
||||
SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER);
|
||||
|
||||
#if USE_DLL_IMPORT
|
||||
pf ("\n");
|
||||
pf ("/* Define some additional CPP macros on Win32 platforms. */\n");
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#define SCM_I_GSC_USE_PTHREAD_THREADS @SCM_I_GSC_USE_PTHREAD_THREADS@
|
||||
#define SCM_I_GSC_USE_NULL_THREADS @SCM_I_GSC_USE_NULL_THREADS@
|
||||
#define SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT @SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT@
|
||||
#define SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER @SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER@
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
|
|
|
@ -43,7 +43,11 @@
|
|||
|
||||
/* Mutexes
|
||||
*/
|
||||
#define SCM_I_PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
#if SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER
|
||||
# define SCM_I_PTHREAD_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER }
|
||||
#else
|
||||
# define SCM_I_PTHREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
#define scm_i_pthread_mutex_t pthread_mutex_t
|
||||
#define scm_i_pthread_mutex_init pthread_mutex_init
|
||||
#define scm_i_pthread_mutex_destroy pthread_mutex_destroy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue