diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | localdecls.h | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 99f98fc..756f3cb 100644 --- a/configure.ac +++ b/configure.ac @@ -81,6 +81,7 @@ AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_SIZE_T AC_CHECK_TYPES([ptrdiff_t]) +AC_CHECK_TYPES([sighandler_t, sig_t, __sighandler_t],,,[#include <signal.h>]) AC_CHECK_DECLS_ONCE([environ]) dnl Checks for library functions. diff --git a/localdecls.h b/localdecls.h index da8ad4c..a1a517c 100644 --- a/localdecls.h +++ b/localdecls.h @@ -53,6 +53,16 @@ extern char **environ; #endif +#ifndef HAVE_SIGHANDLER_T +# if defined(HAVE_SIG_T) +typedef sig_t sighandler_t; +# elif defined(HAVE___SIGHANDLER_T) +typedef __sighandler_t sighandler_t; +# else +# error "your system blows chunks: no signal() type" +# endif +#endif + /* If the system is old and does not support *at funcs, then define * it ourself. Shouldn't matter based on how we use it. */ |