guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 01/01: Don't presume sigset_t available in <signal.h>


From: Mike Gran
Subject: [Guile-commits] 01/01: Don't presume sigset_t available in <signal.h>
Date: Wed, 25 Apr 2018 17:55:53 -0400 (EDT)

mike121 pushed a commit to branch wip-mingw-guile-2.2
in repository guile.

commit d5b48cb0395175db8a04875269f3284c90c0d436
Author: Michael Gran <address@hidden>
Date:   Wed Apr 25 14:52:22 2018 -0700

    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
---
 libguile/gen-scmconfig.c | 16 +++++++++++-----
 libguile/null-threads.h  |  4 +++-
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index f825e9b..bc6d4d9 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 dcb14e6..4fccc75 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
  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]