The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/libsodium/m4/ax_check_catchable_abrt.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # SYNOPSIS
    2 #
    3 #   AX_CHECK_CATCHABLE_ABRT
    4 #
    5 # DESCRIPTION
    6 #
    7 #  Check whether SIGABRT can be caught using signal handlers.
    8 
    9 #serial 1
   10 
   11 AC_DEFUN([AX_CHECK_CATCHABLE_ABRT], [dnl
   12     AC_PREREQ(2.64)
   13     AS_VAR_PUSHDEF([CACHEVAR], [ax_cv_check_[]_AC_LANG_ABBREV[]CATCHABLE_ABRT])dnl
   14     AC_CACHE_CHECK([whether SIGABRT can be caught when using the _AC_LANG compiler], CACHEVAR, [
   15         AC_RUN_IFELSE([
   16             AC_LANG_PROGRAM([[
   17 #include <signal.h>
   18 #include <stdlib.h>
   19 
   20 #ifndef SIGABRT
   21 # error SIGABRT is not defined
   22 #endif
   23 
   24 static void sigabrt_handler_3(int _)
   25 {
   26     exit(0);
   27 }
   28 
   29 static void sigabrt_handler_2(int _)
   30 {
   31     signal(SIGABRT, sigabrt_handler_3);
   32     abort();
   33     exit(1);
   34 }
   35 
   36 static void sigabrt_handler_1(int _)
   37 {
   38     signal(SIGABRT, sigabrt_handler_2);
   39     abort();
   40     exit(1);
   41 }
   42             ]], [[
   43 signal(SIGABRT, sigabrt_handler_1);
   44 abort();
   45 exit(1);
   46             ]])],
   47             [AS_VAR_SET(CACHEVAR, [yes])],
   48             [AS_VAR_SET(CACHEVAR, [no])],
   49             [AS_VAR_SET(CACHEVAR, [unknown])]
   50         )
   51     ])
   52     AS_VAR_IF(CACHEVAR, yes,
   53         [AC_DEFINE([HAVE_CATCHABLE_ABRT], [1], [Define if SIGABRT can be caught using signal handlers])],
   54         [AC_MSG_WARN([On this platform, SIGABRT cannot be caught using signal handlers.])]
   55     )
   56     AS_VAR_POPDEF([CACHEVAR])dnl
   57 ])

Cache object: afc9040d555843e2f3f937c37f7070c6


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.