[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stdlib self test: error: 'SIGTERM' undeclared
From: |
Simon Josefsson |
Subject: |
stdlib self test: error: 'SIGTERM' undeclared |
Date: |
Sun, 26 Sep 2010 13:24:06 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
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)
- stdlib self test: error: 'SIGTERM' undeclared,
Simon Josefsson <=