This command:
gnulib-tool --create-testdir --dir m --with-tests stdlib; cd m ; ./configure
--host=i586-mingw32msvc --build=i686-pc-linux-gnu ; make
results in:
test-stdlib.c: In function ‘main’:
test-stdlib.c:63: error: ‘SIGTERM’ undeclared (first use in this function)
test-stdlib.c:63: error: (Each undeclared identifier is reported only once
test-stdlib.c:63: error: for each function it appears in.)
the cause is gnulib's stdlib.h:
#ifndef WEXITSTATUS
# include <sys/wait.h>
#endif
and in turn gnulib's sys/wait.h:
# define WTERMSIG(x) SIGTERM
But sys/wait.h never includes <signal.h> to get SIGTERM.
Bruno, is the patch against the sys_wait module below OK?
/Simon
diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h
index 6699c61..e863051 100644
--- a/lib/sys_wait.in.h
+++ b/lib/sys_wait.in.h
@@ -93,6 +93,7 @@ extern "C" {
# define WIFSTOPPED(x) 0
/* The signal that terminated a process is not known posthum. */
+# include <signal.h>
# define WTERMSIG(x) SIGTERM
# define WEXITSTATUS(x) (x)