For compatibility with other m4 implementations, sysval returns
commit82699ba09bc7945320eef475ff49a29d0de06783
authorEric Blake <ebb9@byu.net>
Fri, 30 Jun 2006 18:58:11 +0000 (30 18:58 +0000)
committerEric Blake <ebb9@byu.net>
Fri, 21 Sep 2007 20:58:27 +0000 (21 14:58 -0600)
treecb12194688d22dce8fa99c22d80f2ba2eea39abe
parent89e282c7a7405c4c7e6b64028f6583483bd558fc
For compatibility with other m4 implementations, sysval returns
signal<<8 rather than 0 if syscmd is terminated by a signal.
* configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
* src/builtin.c (include): Include sys/wait.h when stdlib.h does
not provide wait macros.
(WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
(M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
(m4_esyscmd): Set sysval to -1 on failure.
(m4_sysval): Print 127 on failure, and accomodate signals if they
are detectable.
* NEWS: Document this change.
* doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
last commit.
* checks/check-them: Likewise.
* src/debug.c (debug_set_file): Work around mingw fstat bug.
ChangeLog
NEWS
checks/check-them
configure.ac
doc/m4.texinfo
src/builtin.c
src/debug.c