civodul pushed a commit to branch main
in repository guile.

commit 9b20ca275dba758a194073936cde7c95311bd51e
Author: Ludovic Courtès <l...@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 <ll...@sarc.name> and Greg Troxel <g...@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>

Reply via email to