diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c index 8d77dfaf2..a3c732039 100644 --- a/libguile/gen-scmconfig.c +++ b/libguile/gen-scmconfig.c @@ -1,4 +1,4 @@ -/* Copyright 2003-2013,2018 +/* Copyright 2003-2013,2018,2020 Free Software Foundation, Inc. This file is part of Guile. @@ -20,7 +20,7 @@ /********************************************************************** Description of Guile's public config header mechanics: - ----------------------------------------------------- + ----------------------------------------------------- Guile has three core headers: @@ -153,7 +153,7 @@ main (int argc, char *argv[]) "\n" "#ifndef SCM_SCMCONFIG_H\n" "#define SCM_SCMCONFIG_H\n"); - + /*** various important headers ***/ pf ("\n"); pf ("/* Important headers */\n"); @@ -289,6 +289,12 @@ main (int argc, char *argv[]) pf ("#define SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER %d /* 0 or 1 */\n", SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER); +#ifdef HAVE_PTHREAD_SIGMASK + pf ("#define SCM_HAVE_PTHREAD_SIGMASK 1 /* 0 or 1 */\n"); +#else + pf ("#define SCM_HAVE_PTHREAD_SIGMASK 0 /* 0 or 1 */\n"); +#endif + #ifdef HAVE_GC_PTHREAD_CANCEL pf ("#define SCM_HAVE_GC_PTHREAD_CANCEL 1 /* 0 or 1 */\n"); #else diff --git a/libguile/null-threads.h b/libguile/null-threads.h index 88926fa2f..be72346f0 100644 --- a/libguile/null-threads.h +++ b/libguile/null-threads.h @@ -1,7 +1,7 @@ #ifndef SCM_NULL_THREADS_H #define SCM_NULL_THREADS_H -/* Copyright 2005-2006,2010,2018 +/* Copyright 2005-2006,2010,2018,2020 Free Software Foundation, Inc. This file is part of Guile. @@ -83,11 +83,13 @@ scm_i_sched_yield (void) /* Signals */ +#if SCM_HAVE_PTHREAD_SIGMASK == 1 static inline int scm_i_pthread_sigmask (int how, const sigset_t *set, sigset_t *oldset) { return sigprocmask (how, set, oldset); } +#endif /* Mutexes */