summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2018-04-25 14:52:22 -0700
committerMichael Gran <spk121@yahoo.com>2018-04-25 14:52:22 -0700
commitd5b48cb0395175db8a04875269f3284c90c0d436 (patch)
tree7cff3ebc8f411271bc9e4a54504276c23615226b
parent925485c27615ad20884b96fd6cff6d3dc08013de (diff)
downloadguile-d5b48cb0395175db8a04875269f3284c90c0d436.tar.gz
Don't presume sigset_t available in <signal.h>
In MinGW, sigset_t is not availab.e * libguile/gen-scmconfig.c (SCM_HAVE_PTHREAD_SIGMASK): new conditional * libguile/null-threads.h (scm_i_pthread_sigmask): now conditional on SCM_HAVE_PTHREAD_SIGMASK
-rw-r--r--libguile/gen-scmconfig.c16
-rw-r--r--libguile/null-threads.h4
2 files changed, 14 insertions, 6 deletions
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index f825e9b2b..bc6d4d990 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2013, 2018 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -19,7 +19,7 @@
/**********************************************************************
Description of Guile's public config header mechanics:
- -----------------------------------------------------
+ -----------------------------------------------------
Guile has four core headers:
@@ -151,7 +151,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");
@@ -239,7 +239,7 @@ main (int argc, char *argv[])
pf ("\n");
pf ("/* Standard types. */\n");
- pf ("/* These are always defined */\n");
+ pf ("/* These are always defined */\n");
pf ("#define SCM_SIZEOF_CHAR %d\n", SIZEOF_CHAR);
pf ("#define SCM_SIZEOF_UNSIGNED_CHAR %d\n", SIZEOF_UNSIGNED_CHAR);
pf ("#define SCM_SIZEOF_SHORT %d\n", SIZEOF_SHORT);
@@ -345,6 +345,12 @@ main (int argc, char *argv[])
pf ("#define SCM_HAVE_GC_PTHREAD_EXIT 0 /* 0 or 1 */\n");
#endif
+#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_SIGMASK
pf ("#define SCM_HAVE_GC_PTHREAD_SIGMASK 1 /* 0 or 1 */\n");
#else
@@ -413,7 +419,7 @@ main (int argc, char *argv[])
pf ("#define SCM_ICONVEH_QUESTION_MARK %d\n",
SCM_I_GSC_ICONVEH_QUESTION_MARK);
pf ("#define SCM_ICONVEH_ESCAPE_SEQUENCE %d\n",
- SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE);
+ SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE);
printf ("#endif\n");
diff --git a/libguile/null-threads.h b/libguile/null-threads.h
index dcb14e6a7..4fccc75a4 100644
--- a/libguile/null-threads.h
+++ b/libguile/null-threads.h
@@ -3,7 +3,7 @@
#ifndef SCM_NULL_THREADS_H
#define SCM_NULL_THREADS_H
-/* Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2010, 2018 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -82,11 +82,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
*/