summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-01-18 18:24:11 +0100
committerLudovic Courtès <ludo@gnu.org>2023-01-18 18:24:11 +0100
commit4404b553a5a135aee5a606dedea9b6fa25363be4 (patch)
treeaffea0b893960146d8f1a78bbcd7fea17823b5c6
parentcd7475541a9831458c30a5a3adb505b0332837f9 (diff)
downloadguile-4404b553a5a135aee5a606dedea9b6fa25363be4.tar.gz
Adjust 'W_EXITCODE' for Windows.
* libguile/posix.c (W_EXITCODE) [_WIN32]: New specialized definition.
-rw-r--r--libguile/posix.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libguile/posix.c b/libguile/posix.c
index 3f7207bbc..74c743119 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -100,7 +100,11 @@
#ifndef W_EXITCODE
/* Macro for constructing a status value. Found in glibc. */
-# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
+# ifdef _WIN32 /* see Gnulib's posix-w32.h */
+# define W_EXITCODE(ret, sig) (ret)
+# else
+# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
+# endif
#endif
verify (WEXITSTATUS (W_EXITCODE (127, 0)) == 127);