openldap/include/ac/signal.h

69 lines
1.5 KiB
C
Raw Normal View History

1998-10-24 21:41:42 -04:00
/* Generic signal.h */
1999-08-30 04:08:00 -04:00
/* $OpenLDAP$ */
1998-12-28 14:51:35 -05:00
/*
2000-05-12 22:25:54 -04:00
* Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
1998-12-28 14:51:35 -05:00
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
* as authorized by the OpenLDAP Public License. A copy of this
* license is available at http://www.OpenLDAP.org/license.html or
* in file LICENSE in the top-level directory of the distribution.
*/
1998-10-24 21:41:42 -04:00
#ifndef _AC_SIGNAL_H
#define _AC_SIGNAL_H
#include <signal.h>
#undef SIGNAL
1998-10-24 21:41:42 -04:00
#ifdef HAVE_SIGSET
#define SIGNAL sigset
#else
#define SIGNAL signal
#endif
#if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 )
#undef LDAP_SIGUSR1
#undef LDAP_SIGUSR2
# if defined(WINNT) || defined(_WINNT) || defined(_WIN32)
1999-10-28 03:27:00 -04:00
# define LDAP_SIGUSR1 SIGILL
# define LDAP_SIGUSR2 SIGTERM
# elif !defined(HAVE_LINUX_THREADS)
# define LDAP_SIGUSR1 SIGUSR1
# define LDAP_SIGUSR2 SIGUSR2
# else
/*
2000-06-23 20:46:07 -04:00
* Some versions of LinuxThreads unfortunately uses the only
* two signals reserved for user applications. This forces
* OpenLDAP to use other signals reserved for other uses.
*/
# if defined( SIGSTKFLT )
# define LDAP_SIGUSR1 SIGSTKFLT
# elif defined ( SIGSYS )
# define LDAP_SIGUSR1 SIGSYS
# endif
1998-11-22 05:26:51 -05:00
# if defined( SIGUNUSED )
# define LDAP_SIGUSR2 SIGUNUSED
# elif defined ( SIGINFO )
# define LDAP_SIGUSR2 SIGINFO
# elif defined ( SIGEMT )
# define LDAP_SIGUSR2 SIGEMT
# endif
# endif
#endif
#ifndef LDAP_SIGCHLD
#ifdef SIGCHLD
#define LDAP_SIGCHLD SIGCHLD
#elif SIGCLD
#define LDAP_SIGCHLD SIGCLD
#endif
#endif
1998-10-24 21:41:42 -04:00
#endif /* _AC_SIGNAL_H */