]> git.sur5r.net Git - openldap/blob - include/ac/signal.h
Update configure to:
[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 #ifdef HAVE_SIGSET
18 #define SIGNAL sigset
19 #else
20 #define SIGNAL signal
21 #endif
22
23 #if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 )
24 #undef LDAP_SIGUSR1
25 #undef LDAP_SIGUSR2
26
27 #       ifndef HAVE_LINUX_THREADS
28 #               define LDAP_SIGUSR1     SIGUSR1
29 #               define LDAP_SIGUSR2     SIGUSR2
30
31 #       else
32                 /*
33                 LinuxThreads implemented unfortunately uses the only
34                 two signals reserved for user applications.  This forces
35                 OpenLDAP to use, hopefullly unused, signals reserved
36                 for other uses.
37                 */
38             
39 #               if defined( SIGSTKFLT )
40 #                       define LDAP_SIGUSR1     SIGSTKFLT
41 #               elif defined ( SIGSYS )
42 #                       define LDAP_SIGUSR1     SIGSYS
43 #               endif
44
45 #               if defined( SIGUNUSED )
46 #                       define LDAP_SIGUSR2     SIGUNUSED
47 #               elif defined ( SIGINFO )
48 #                       define LDAP_SIGUSR2     SIGINFO
49 #               elif defined ( SIGEMT )
50 #                       define LDAP_SIGUSR2     SIGEMT
51 #               endif
52 #       endif
53 #endif
54
55 #endif /* _AC_SIGNAL_H */