diff --git a/include/ldap.h b/include/ldap.h index 9d5679ae84..6708506477 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -55,19 +55,11 @@ LDAP_BEGIN_DECL #define LDAP_API_FEATURE_X_OPENLDAP LDAP_VENDOR_VERSION #if defined( LDAP_API_FEATURE_X_OPENLDAP_REENTRANT ) || \ - ( defined( LDAP_THREAD_SAFE ) && \ - defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE ) ) - /* -lldap may or may not be thread safe */ - /* -lldap_r, if available, is always thread safe */ + defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE ) # define LDAP_API_FEATURE_THREAD_SAFE 1 # define LDAP_API_FEATURE_SESSION_THREAD_SAFE 1 # define LDAP_API_FEATURE_OPERATION_THREAD_SAFE 1 #endif -#if defined( LDAP_THREAD_SAFE ) && \ - defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE ) -/* #define LDAP_API_FEATURE_SESSION_SAFE 1 */ -/* #define LDAP_API_OPERATION_SESSION_SAFE 1 */ -#endif #define LDAP_PORT 389 /* ldap:/// default LDAP port */ diff --git a/include/ldap_features.hin b/include/ldap_features.hin index df5b8dab6e..5f6c8016c7 100644 --- a/include/ldap_features.hin +++ b/include/ldap_features.hin @@ -41,13 +41,8 @@ ** LDAP_API_FEATURE_OPERATION_THREAD_SAFE ** ** The preprocessor flag LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE -** can be used to determine if -lldap_r is available at compile -** time. You must define LDAP_THREAD_SAFE if and only if you -** link with -lldap_r. -** -** If you fail to define LDAP_THREAD_SAFE when linking with -** -lldap_r or define LDAP_THREAD_SAFE when linking with -lldap, -** provided header definitions and declarations may be incorrect. +** can be used to determine if -lldap is thread safe at compile +** time. ** */ diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index b0f412877f..8f44d2ada0 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -22,7 +22,6 @@ #ifndef NO_THREADS #define LDAP_R_COMPILE 1 -#define LDAP_THREAD_SAFE 1 #endif #include "../liblber/lber-int.h" diff --git a/libraries/libldap/options.c b/libraries/libldap/options.c index 1c7980cf8d..c8ce9e5774 100644 --- a/libraries/libldap/options.c +++ b/libraries/libldap/options.c @@ -71,8 +71,7 @@ static const LDAPAPIFeatureInfo features[] = { LDAP_API_FEATURE_X_OPENLDAP_REENTRANT }, #endif -#if defined( LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE ) && \ - defined( LDAP_THREAD_SAFE ) +#ifdef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE { /* OpenLDAP Thread Safe */ LDAP_FEATURE_INFO_VERSION, "X_OPENLDAP_THREAD_SAFE",