X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fac%2Fsignal.h;h=65b8ea683bb578820048353891f1cc4868b0f502;hb=2b1b64f02197157543decc0c1862c566341c3e10;hp=4b7a9d120e298b799e9eedf38f487dce36ce9d66;hpb=0bb431d3b38f6d7feab4bcd175bac226ef5e02be;p=openldap diff --git a/include/ac/signal.h b/include/ac/signal.h index 4b7a9d120e..65b8ea683b 100644 --- a/include/ac/signal.h +++ b/include/ac/signal.h @@ -1,13 +1,17 @@ /* Generic signal.h */ /* $OpenLDAP$ */ -/* - * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA +/* This work is part of OpenLDAP Software . + * + * Copyright 1998-2012 The OpenLDAP Foundation. * 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 in file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . */ #ifndef _AC_SIGNAL_H @@ -16,10 +20,18 @@ #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 ) @@ -36,12 +48,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 )