aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-18 15:34:28 -0500
committerMike Frysinger <vapier@gentoo.org>2009-02-18 15:46:39 -0500
commit7b0076ad9a24f29da59146c345801b142cfe1368 (patch)
tree755f60bbd6fc444b322f583f68e4f7897d963377 /localdecls.h
parentinclude the m4 files from the autoconf-archive package (diff)
downloadsandbox-7b0076ad9a24f29da59146c345801b142cfe1368.tar.gz
sandbox-7b0076ad9a24f29da59146c345801b142cfe1368.tar.bz2
sandbox-7b0076ad9a24f29da59146c345801b142cfe1368.zip
add checks for signal() return types
Some systems use sighandler_t while others use sig_t. Add a configure check so that we can assume sighandler_t is always available. URL: http://bugs.gentoo.org/259507 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Javier Villavicencio <the_paya@gentoo.org>
Diffstat (limited to 'localdecls.h')
-rw-r--r--localdecls.h10
1 files changed, 10 insertions, 0 deletions
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.
*/