]> git.sur5r.net Git - openldap/blob - include/ac/signal.h
Import fix of ldap_sigusr2 typo from -devel.
[openldap] / include / ac / signal.h
1 /* Generic signal.h */
2
3 #ifndef _AC_SIGNAL_H
4 #define _AC_SIGNAL_H
5
6 #include <signal.h>
7
8 #ifdef HAVE_SIGSET
9 #define SIGNAL sigset
10 #else
11 #define SIGNAL signal
12 #endif
13
14 #if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 )
15 #undef LDAP_SIGUSR1
16 #undef LDAP_SIGUSR2
17
18 #       ifndef HAVE_LINUX_THREADS
19 #               define LDAP_SIGUSR1     SIGUSR1
20 #               define LDAP_SIGUSR2     SIGUSR2
21
22 #       else
23                 /*
24                 LinuxThreads implemented unfortunately uses the only
25                 two signals reserved for user applications.  This forces
26                 OpenLDAP to use, hopefullly unused, signals reserved
27                 for other uses.
28                 */
29             
30 #               if defined( SIGSTKFLT )
31 #                       define LDAP_SIGUSR1     SIGSTKFLT
32 #               elif defined ( SIGSYS )
33 #                       define LDAP_SIGUSR1     SIGSYS
34 #               endif
35
36 #               if defined( SIGUNUSED )
37 #                       define LDAP_SIGUSR2     SIGUNUSED
38 #               elif defined ( SIGINFO )
39 #                       define LDAP_SIGUSR2     SIGINFO
40 #               elif defined ( SIGEMT )
41 #                       define LDAP_SIGUSR2     SIGEMT
42 #               endif
43 #       endif
44 #endif
45
46 #endif /* _AC_SIGNAL_H */