--- include/ldap_pvt_thread.h 2008/03/21 00:46:03 1.51.2.10 +++ include/ldap_pvt_thread.h 2008/11/21 18:51:50 1.51.2.11 @@ -1,5 +1,5 @@ /* ldap_pvt_thread.h - ldap threads header file */ -/* $OpenLDAP: pkg/ldap/include/ldap_pvt_thread.h,v 1.51.2.9 2008/02/11 23:26:40 kurt Exp $ */ +/* $OpenLDAP: pkg/ldap/include/ldap_pvt_thread.h,v 1.51.2.10 2008/03/21 00:46:03 hyc Exp $ */ /* This work is part of OpenLDAP Software . * * Copyright 1998-2008 The OpenLDAP Foundation. @@ -59,12 +59,12 @@ ldap_pvt_thread_set_concurrency LDAP_P(( #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 */