]> git.sur5r.net Git - openldap/blob - include/ac/signal.h
s/Id/OpenLDAP/ in RCSids
[openldap] / include / ac / signal.h
1 /* Generic signal.h */
2 /* $OpenLDAP$ */
3 /*
4  * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms are permitted only
8  * as authorized by the OpenLDAP Public License.  A copy of this
9  * license is available at http://www.OpenLDAP.org/license.html or
10  * in file LICENSE in the top-level directory of the distribution.
11  */
12
13 #ifndef _AC_SIGNAL_H
14 #define _AC_SIGNAL_H
15
16 #include <signal.h>
17
18 #undef SIGNAL
19 #ifdef HAVE_SIGSET
20 #define SIGNAL sigset
21 #else
22 #define SIGNAL signal
23 #endif
24
25 #if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 )
26 #undef LDAP_SIGUSR1
27 #undef LDAP_SIGUSR2
28
29 #       ifndef HAVE_LINUX_THREADS
30 #               define LDAP_SIGUSR1     SIGUSR1
31 #               define LDAP_SIGUSR2     SIGUSR2
32
33 #       else
34                 /*
35                 LinuxThreads implemented unfortunately uses the only
36                 two signals reserved for user applications.  This forces
37                 OpenLDAP to use, hopefullly unused, signals reserved
38                 for other uses.
39                 */
40             
41 #               if defined( SIGSTKFLT )
42 #                       define LDAP_SIGUSR1     SIGSTKFLT
43 #               elif defined ( SIGSYS )
44 #                       define LDAP_SIGUSR1     SIGSYS
45 #               endif
46
47 #               if defined( SIGUNUSED )
48 #                       define LDAP_SIGUSR2     SIGUNUSED
49 #               elif defined ( SIGINFO )
50 #                       define LDAP_SIGUSR2     SIGINFO
51 #               elif defined ( SIGEMT )
52 #                       define LDAP_SIGUSR2     SIGEMT
53 #               endif
54 #       endif
55 #endif
56
57 #ifndef LDAP_SIGCHLD
58 #ifdef SIGCHLD
59 #define LDAP_SIGCHLD SIGCHLD
60 #elif SIGCLD
61 #define LDAP_SIGCHLD SIGCLD
62 #endif
63 #endif
64
65 #endif /* _AC_SIGNAL_H */