From 480b79f5a50e3d83b76c07048d4002459750aa3d Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Mon, 25 Jul 2011 07:08:33 +0000 Subject: [PATCH] * Make trunk compile with APR trunk again (without LDAP support of course), by ensuring that we only include the include files of the APR / APU LDAP API if we use 1.x. Move stuff that depends on it inside the APR_HAS_LDAP block. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1150559 13f79535-47bb-0310-9956-ffa450edef68 --- include/util_ldap.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/util_ldap.h b/include/util_ldap.h index 18c990dbf5..c6e1615760 100644 --- a/include/util_ldap.h +++ b/include/util_ldap.h @@ -28,14 +28,13 @@ #include "apr_thread_rwlock.h" #include "apr_tables.h" #include "apr_time.h" +#include "apr_version.h" +#if APR_MAJOR_VERSION < 2 +/* The LDAP API is currently only present in APR 1.x */ #include "apr_ldap.h" #include "apr_ldap_rebind.h" - -#if APR_HAS_MICROSOFT_LDAPSDK -#define AP_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN \ - ||(s) == LDAP_UNAVAILABLE) #else -#define AP_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN) +#define APR_HAS_LDAP 0 #endif #if APR_HAS_SHARED_MEMORY @@ -46,6 +45,13 @@ /* this whole thing disappears if LDAP is not enabled */ #if APR_HAS_LDAP +#if APR_HAS_MICROSOFT_LDAPSDK +#define AP_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN \ + ||(s) == LDAP_UNAVAILABLE) +#else +#define AP_LDAP_IS_SERVER_DOWN(s) ((s) == LDAP_SERVER_DOWN) +#endif + /* Apache header files */ #include "ap_config.h" #include "httpd.h" -- 2.40.0