mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 10:39:34 -05:00
Update thread detection:
ifndef HAVE_PTHREAD_KILL pthread_kill() code and prototype. Fix HAVE_FUNC_PTHREAD defines from previous change.
This commit is contained in:
parent
8cb0ff3a68
commit
1f4b479b2b
2 changed files with 13 additions and 8 deletions
|
|
@ -19,22 +19,27 @@
|
|||
|
||||
LDAP_BEGIN_DECL
|
||||
|
||||
#if !defined( HAVE_FUNC_PTHREAD_ATTR_INIT ) && \
|
||||
defined( HAVE_FUNC_PTHREAD_ATTR_CREATE )
|
||||
#if !defined( HAVE_PTHREAD_ATTR_INIT ) && \
|
||||
defined( HAVE_PTHREAD_ATTR_CREATE )
|
||||
#define pthread_attr_init( a ) pthread_attr_create( a )
|
||||
#endif
|
||||
|
||||
#if !defined( HAVE_FUNC_PTHREAD_ATTR_DESTROY ) && \
|
||||
defined( HAVE_FUNC_PTHREAD_ATTR_DELETE )
|
||||
#if !defined( HAVE_PTHREAD_ATTR_DESTROY ) && \
|
||||
defined( HAVE_PTHREAD_ATTR_DELETE )
|
||||
#define pthread_attr_destroy( a ) pthread_attr_delete( a )
|
||||
#endif
|
||||
|
||||
#if !defined( HAVE_FUNC_PTHREAD_ATTR_SETDETACHSTATE ) && \
|
||||
defined( HAVE_FUNC_PTHREAD_ATTR_SETDETACHSTATE_NP )
|
||||
#if !defined( HAVE_PTHREAD_ATTR_SETDETACHSTATE ) && \
|
||||
defined( HAVE_PTHREAD_ATTR_SETDETACHSTATE_NP )
|
||||
#define pthread_attr_setdetachstate( a, b ) \
|
||||
pthread_attr_setdetach_np( a, b )
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_PTHREAD_KILL
|
||||
/* missing pthread_kill(), define prototype */
|
||||
LDAP_F void pthread_kill LDAP_P(( pthread_t tid, int sig ));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_PTHREADS_D4
|
||||
#define pthread_mutexattr_default NULL
|
||||
#define pthread_condattr_default NULL
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#if defined( HAVE_PTHREADS )
|
||||
|
||||
#ifdef HAVE_DCE
|
||||
#ifndef HAVE_PTHREAD_KILL
|
||||
/***********************************************************************
|
||||
* *
|
||||
* pthreads package with DCE - no mapping to do (except to create a *
|
||||
|
|
@ -20,7 +20,7 @@ pthread_kill( pthread_t tid, int sig )
|
|||
{
|
||||
kill( getpid(), sig );
|
||||
}
|
||||
#endif /* DCE */
|
||||
#endif /* HAVE_PTHREAD_KILL */
|
||||
|
||||
#elif defined( HAVE_MACH_CTHREADS )
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue