]> granicus.if.org Git - apache/commitdiff
* Make trunk compile with APR trunk again (without LDAP support of course), by
authorRuediger Pluem <rpluem@apache.org>
Mon, 25 Jul 2011 07:08:33 +0000 (07:08 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 25 Jul 2011 07:08:33 +0000 (07:08 +0000)
  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

index 18c990dbf507adbbd3ed48af412b6b0eec9108fc..c6e16157608f59abaca63e10e984bd736d6c4540 100644 (file)
 #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
 /* 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"