[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/03: Verify 'W_EXITCODE' only when we provide our own
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 03/03: Verify 'W_EXITCODE' only when we provide our own definition. |
Date: |
Mon, 23 Jan 2023 16:59:14 -0500 (EST) |
civodul pushed a commit to branch main
in repository guile.
commit 9b20ca275dba758a194073936cde7c95311bd51e
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Jan 23 22:52:47 2023 +0100
Verify 'W_EXITCODE' only when we provide our own definition.
Fixes <https://bugs.gnu.org/60971>.
Reported by lloda <lloda@sarc.name> and Greg Troxel <gdt@lexort.com>.
On macOS and NetBSD, 'WEXITSTATUS' expects an lvalue so the expression
passed to 'verify' would be invalid.
* libguile/posix.c: Move 'verify' assertion within #ifdef.
---
libguile/posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/posix.c b/libguile/posix.c
index 74c743119..0b1fe2637 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -105,8 +105,8 @@
# else
# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
# endif
-#endif
verify (WEXITSTATUS (W_EXITCODE (127, 0)) == 127);
+#endif
#include <signal.h>