[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 07/15: Add `scm_sigaction_for_thread' stub for MinGW.
From: |
Jan Nieuwenhuizen |
Subject: |
[Guile-commits] 07/15: Add `scm_sigaction_for_thread' stub for MinGW. |
Date: |
Mon, 12 Apr 2021 05:55:43 -0400 (EDT) |
janneke pushed a commit to branch wip-mingw
in repository guile.
commit f1d246025225b93af102b26b8f8aae6bf7aa63b2
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sat Mar 21 13:06:56 2020 +0100
Add `scm_sigaction_for_thread' stub for MinGW.
* libguile/scmsigs.c (scm_sigaction_for_thread)[__MINGW32__]: New stub.
---
libguile/posix.c | 3 ++-
libguile/scmsigs.c | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/libguile/posix.c b/libguile/posix.c
index eaf12de..b6a0711 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -61,7 +61,8 @@
#ifdef __MINGW32__
# include "posix-w32.h"
-#endif
+#define SIGPIPE 13
+#endif /* __MINGW32__ */
#include "async.h"
#include "bitvectors.h"
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index d1daf04..0a33ed6 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -291,6 +291,29 @@ scm_sigaction (SCM signum, SCM handler, SCM flags)
return scm_sigaction_for_thread (signum, handler, flags, SCM_UNDEFINED);
}
+#if __MINGW32__
+
+int _mingw_debug_p ();
+
+SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0,
+ (SCM signum, SCM handler, SCM flags, SCM thread),
+ "sigaction stub")
+#define FUNC_NAME s_scm_sigaction_for_thread
+{
+ static int stub = 0;
+ (void) signum;
+ (void) handler;
+ (void) flags;
+ (void) thread;
+ if (_mingw_debug_p () && !stub)
+ fputs ("stub: sigaction", stderr);
+ stub = 1;
+ return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
+
+#else /* !__MINGW32__ */
+
/* user interface for installation of signal handlers. */
SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0,
(SCM signum, SCM handler, SCM flags, SCM thread),
@@ -486,6 +509,8 @@ SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0,
}
#undef FUNC_NAME
+#endif /* !__MINGW32__ */
+
SCM_DEFINE (scm_restore_signals, "restore-signals", 0, 0, 0,
(void),
"Return all signal handlers to the values they had before any call
to\n"
- [Guile-commits] 10/15: DRAFT Support for x86_64-w64-mingw32., (continued)
- [Guile-commits] 10/15: DRAFT Support for x86_64-w64-mingw32., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 15/15: DEBUG guile.cmd: Some Wine help., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 05/15: Compile fix for x86_64-MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 06/15: Add 'set-mode' procedure for MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 11/15: DRAFT Add partial `scm_fcntl' support for MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 08/15: Make `read-bytes' suspendable for socket reads on MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 12/15: Define 'SIGHUP' for MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 01/15: Document write-line., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 03/15: Fix 'gethostname' prototype for x86_64-MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 04/15: Clear errno before CreateProcess for MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 07/15: Add `scm_sigaction_for_thread' stub for MinGW.,
Jan Nieuwenhuizen <=
- [Guile-commits] 09/15: Install 'mingw_take_signal' on MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 13/15: Fix 'absolute-file-name?' and others for cross-build to MinGW., Jan Nieuwenhuizen, 2021/04/12
- [Guile-commits] 14/15: guix: Add guile-patched, guile-mingw., Jan Nieuwenhuizen, 2021/04/12