X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fac%2Fsignal.h;h=4e689326441ccef1f81c27f7e29af3d28fa739d4;hb=ca4764ccfa656cf23658182a60bc3af5a6d91f1a;hp=96d9bf67865ec3811047414f9a7d2021cf1841f7;hpb=21a51c0628ca4256baacb322b968622c33d36536;p=openldap diff --git a/include/ac/signal.h b/include/ac/signal.h index 96d9bf6786..4e68932644 100644 --- a/include/ac/signal.h +++ b/include/ac/signal.h @@ -1,13 +1,14 @@ /* Generic signal.h */ /* $OpenLDAP$ */ /* - * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA + * Copyright 1998-2002 The OpenLDAP Foundation, Redwood City, California, USA * 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. + * Redistribution and use in source and binary forms, with or without + * modification, 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. */ #ifndef _AC_SIGNAL_H @@ -16,17 +17,25 @@ #include #undef SIGNAL -#ifdef HAVE_SIGSET + +#if defined( HAVE_SIGACTION ) +#define SIGNAL lutil_sigaction +typedef void (*lutil_sig_t)(int); +LDAP_LUTIL_F(lutil_sig_t) lutil_sigaction( int sig, lutil_sig_t func ); +#define SIGNAL_REINSTALL(sig,act) (void)0 +#elif defined( HAVE_SIGSET ) #define SIGNAL sigset +#define SIGNAL_REINSTALL sigset #else #define SIGNAL signal +#define SIGNAL_REINSTALL signal #endif #if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 ) #undef LDAP_SIGUSR1 #undef LDAP_SIGUSR2 -# if defined(WINNT) || defined(_WINNT) +# if defined(WINNT) || defined(_WINNT) || defined(_WIN32) # define LDAP_SIGUSR1 SIGILL # define LDAP_SIGUSR2 SIGTERM @@ -36,12 +45,11 @@ # else /* - LinuxThreads implemented unfortunately uses the only - two signals reserved for user applications. This forces - OpenLDAP to use, hopefullly unused, signals reserved - for other uses. - */ - + * 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 )