From 47560a77c72a9df25342b0383f56d2b82143bb4e Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Fri, 21 Nov 2008 05:03:53 +0000 Subject: [PATCH] ITS#5824: #if/#elif issues in thread #includes --- include/ldap_int_thread.h | 2 +- include/ldap_pvt_thread.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ldap_int_thread.h b/include/ldap_int_thread.h index f1f72abf75..75899e51e8 100644 --- a/include/ldap_int_thread.h +++ b/include/ldap_int_thread.h @@ -80,7 +80,7 @@ LDAP_END_DECL #if defined( HAVE_MACH_CTHREADS_H ) # include -#elif defined( HAVE_CTHREAD_H +#elif defined( HAVE_CTHREADS_H ) # include #endif diff --git a/include/ldap_pvt_thread.h b/include/ldap_pvt_thread.h index 1325e77226..7dc34c217a 100644 --- a/include/ldap_pvt_thread.h +++ b/include/ldap_pvt_thread.h @@ -59,12 +59,12 @@ ldap_pvt_thread_set_concurrency LDAP_P(( int )); #ifndef LDAP_PVT_THREAD_H_DONE #define LDAP_PVT_THREAD_SET_STACK_SIZE -#ifndef LDAP_PVT_THREAD_STACK_SIZE +/* The size may be explicitly #defined to zero to disable it. */ +#if defined( LDAP_PVT_THREAD_STACK_SIZE ) && LDAP_PVT_THREAD_STACK_SIZE == 0 +# undef LDAP_PVT_THREAD_SET_STACK_SIZE +#elif !defined( LDAP_PVT_THREAD_STACK_SIZE ) /* LARGE stack. Will be twice as large on 64 bit machine. */ -#define LDAP_PVT_THREAD_STACK_SIZE ( 1 * 1024 * 1024 * sizeof(void *) ) -/* May be explicitly defined to zero to disable it */ -#elif LDAP_PVT_THREAD_STACK_SIZE == 0 -#undef LDAP_PVT_THREAD_SET_STACK_SIZE +# define LDAP_PVT_THREAD_STACK_SIZE ( 1 * 1024 * 1024 * sizeof(void *) ) #endif #endif /* !LDAP_PVT_THREAD_H_DONE */ -- 2.39.5