3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2017 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
24 #if defined( HAVE_SIGACTION )
25 #define SIGNAL lutil_sigaction
26 typedef void (*lutil_sig_t)(int);
27 LDAP_LUTIL_F(lutil_sig_t) lutil_sigaction( int sig, lutil_sig_t func );
28 #define SIGNAL_REINSTALL(sig,act) (void)0
29 #elif defined( HAVE_SIGSET )
31 #define SIGNAL_REINSTALL sigset
34 #define SIGNAL_REINSTALL signal
37 #if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 )
41 # if defined(WINNT) || defined(_WINNT) || defined(_WIN32)
42 # define LDAP_SIGUSR1 SIGILL
43 # define LDAP_SIGUSR2 SIGTERM
45 # elif !defined(HAVE_LINUX_THREADS)
46 # define LDAP_SIGUSR1 SIGUSR1
47 # define LDAP_SIGUSR2 SIGUSR2
51 * Some versions of LinuxThreads unfortunately uses the only
52 * two signals reserved for user applications. This forces
53 * OpenLDAP to use other signals reserved for other uses.
56 # if defined( SIGSTKFLT )
57 # define LDAP_SIGUSR1 SIGSTKFLT
58 # elif defined ( SIGSYS )
59 # define LDAP_SIGUSR1 SIGSYS
62 # if defined( SIGUNUSED )
63 # define LDAP_SIGUSR2 SIGUNUSED
64 # elif defined ( SIGINFO )
65 # define LDAP_SIGUSR2 SIGINFO
66 # elif defined ( SIGEMT )
67 # define LDAP_SIGUSR2 SIGEMT
74 #define LDAP_SIGCHLD SIGCHLD
76 #define LDAP_SIGCHLD SIGCLD
80 #endif /* _AC_SIGNAL_H */