1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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.
This commit is contained in:
Ludovic Courtès 2023-01-23 22:52:47 +01:00
parent 2e1ba78c30
commit 9b20ca275d

View file

@ -105,8 +105,8 @@
# else # else
# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) # define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
# endif # endif
#endif
verify (WEXITSTATUS (W_EXITCODE (127, 0)) == 127); verify (WEXITSTATUS (W_EXITCODE (127, 0)) == 127);
#endif
#include <signal.h> #include <signal.h>