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