aboutsummaryrefslogtreecommitdiff
path: root/lib/openldap.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-06-01 17:25:03 +0200
committerYang Tse <yangsita@gmail.com>2010-06-01 17:25:03 +0200
commit89da5324457070cb4a7391c48c6c4f84ed7fe964 (patch)
treed989117972a8aa3dd27f62c0ad7b63a7502187f0 /lib/openldap.c
parentb38189c7b41cc2a327ab690a523441bcb3e6f9fe (diff)
fix ldap related compilation issues
Diffstat (limited to 'lib/openldap.c')
-rw-r--r--lib/openldap.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/openldap.c b/lib/openldap.c
index 16bf7b8c8..daba224ed 100644
--- a/lib/openldap.c
+++ b/lib/openldap.c
@@ -22,7 +22,18 @@
#include "setup.h"
-#ifdef USE_OPENLDAP
+#if !defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP)
+
+/*
+ * Notice that USE_OPENLDAP is only a source code selection switch. When
+ * libcurl is built with USE_OPENLDAP defined the libcurl source code that
+ * gets compiled is the code from openldap.c, otherwise the code that gets
+ * compiled is the code from ldap.c.
+ *
+ * When USE_OPENLDAP is defined a recent version of the OpenLDAP library
+ * might be required for compilation and runtime. In order to use ancient
+ * OpenLDAP library versions, USE_OPENLDAP shall not be defined.
+ */
#include "urldata.h"
#include <curl/curl.h>
@@ -588,4 +599,4 @@ static Sockbuf_IO ldapsb_tls =
};
#endif /* USE_SSL */
-#endif /* USE_OPENLDAP */
+#endif /* !CURL_DISABLE_LDAP && USE_OPENLDAP */