[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/04: Adjust 'W_EXITCODE' for Windows.
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 02/04: Adjust 'W_EXITCODE' for Windows. |
Date: |
Wed, 18 Jan 2023 18:25:34 -0500 (EST) |
civodul pushed a commit to branch main
in repository guile.
commit 4404b553a5a135aee5a606dedea9b6fa25363be4
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jan 18 18:24:11 2023 +0100
Adjust 'W_EXITCODE' for Windows.
* libguile/posix.c (W_EXITCODE) [_WIN32]: New specialized definition.
---
libguile/posix.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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);