4 dnl Figure out return type of signal handlers, and define SIGRETURN macro
5 dnl that can be used to return from one
7 AC_DEFUN([OPENAFS_RETSIGTYPE],[
8 AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void.
9 Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
10 AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
11 [AC_LANG_PROGRAM([#include <sys/types.h>
14 [return *(signal (0, 0)) (0) == 1;])],
15 [ac_cv_type_signal=int],
16 [ac_cv_type_signal=void])])
17 AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
20 if test "$ac_cv_type_signal" = "void" ; then
21 AC_DEFINE(VOID_RETSIGTYPE, 1, [Define if signal handlers return void.])
24 AH_BOTTOM([#ifdef VOID_RETSIGTYPE
25 #define SIGRETURN(x) return
27 #define SIGRETURN(x) return (RETSIGTYPE)(x)