summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-01-18 20:25:37 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-01-18 20:52:43 +0000
commit2cc571f9e3b6215dee72b57a02824e186d07c863 (patch)
tree9c68c0d1a5334c3d34db48a89501eb2807c354a4 /lib
parent1cbc8fd3d1a95b90a1585d57d7af37c73cda2fc1 (diff)
downloadcurl-2cc571f9e3b6215dee72b57a02824e186d07c863.tar.gz
ldap: Renamed the CURL_LDAP_WIN definition to USE_WIN32_LDAP
For consistency with other USE_WIN32_ defines as well as the USE_OPENLDAP define.
Diffstat (limited to 'lib')
-rw-r--r--lib/config-symbian.h4
-rw-r--r--lib/config-vxworks.h4
-rw-r--r--lib/config-win32.h12
-rw-r--r--lib/config-win32ce.h4
-rw-r--r--lib/curl_config.h.cmake2
-rw-r--r--lib/curl_multibyte.c4
-rw-r--r--lib/curl_multibyte.h8
-rw-r--r--lib/ldap.c54
8 files changed, 46 insertions, 46 deletions
diff --git a/lib/config-symbian.h b/lib/config-symbian.h
index f7eaab92d..581762850 100644
--- a/lib/config-symbian.h
+++ b/lib/config-symbian.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -69,7 +69,7 @@
/* #undef CURL_EXTERN_SYMBOL */
/* Use Windows LDAP implementation */
-/* #undef CURL_LDAP_WIN */
+/* #undef USE_WIN32_LDAP */
/* your Entropy Gathering Daemon socket pathname */
/* #undef EGD_SOCKET */
diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h
index 05220b581..515f7d48c 100644
--- a/lib/config-vxworks.h
+++ b/lib/config-vxworks.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -75,7 +75,7 @@
/* #undef CURL_EXTERN_SYMBOL */
/* Use Windows LDAP implementation */
-/* #undef CURL_LDAP_WIN */
+/* #undef USE_WIN32_LDAP */
/* your Entropy Gathering Daemon socket pathname */
/* #undef EGD_SOCKET */
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 744e02271..8b543d5ca 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -678,25 +678,25 @@ Vista
/* ---------------------------------------------------------------- */
#if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
-#undef CURL_LDAP_WIN
+#undef USE_WIN32_LDAP
#define HAVE_LDAP_SSL_H 1
#define HAVE_LDAP_URL_PARSE 1
#elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
-#undef CURL_LDAP_WIN
+#undef USE_WIN32_LDAP
#define HAVE_LDAP_URL_PARSE 1
#else
#undef HAVE_LDAP_URL_PARSE
-#define CURL_LDAP_WIN 1
+#define USE_WIN32_LDAP 1
#endif
-#if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)
+#if defined(__WATCOMC__) && defined(USE_WIN32_LDAP)
#if __WATCOMC__ < 1280
#define WINBERAPI __declspec(cdecl)
#define WINLDAPAPI __declspec(cdecl)
#endif
#endif
-#if defined(__POCC__) && defined(CURL_LDAP_WIN)
+#if defined(__POCC__) && defined(USE_WIN32_LDAP)
# define CURL_DISABLE_LDAP 1
#endif
diff --git a/lib/config-win32ce.h b/lib/config-win32ce.h
index a8ab0d34e..9d6499819 100644
--- a/lib/config-win32ce.h
+++ b/lib/config-win32ce.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -409,7 +409,7 @@
/* LDAP SUPPORT */
/* ---------------------------------------------------------------- */
-#define CURL_LDAP_WIN 1
+#define USE_WIN32_LDAP 1
#undef HAVE_LDAP_URL_PARSE
/* ---------------------------------------------------------------- */
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index 87be9c717..619e101ca 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -53,7 +53,7 @@
#endif
/* Use Windows LDAP implementation */
-#cmakedefine CURL_LDAP_WIN 1
+#cmakedefine USE_WIN32_LDAP 1
/* when not building a shared library */
#cmakedefine CURL_STATICLIB 1
diff --git a/lib/curl_multibyte.c b/lib/curl_multibyte.c
index 6e657228c..d4f47ce71 100644
--- a/lib/curl_multibyte.c
+++ b/lib/curl_multibyte.c
@@ -23,7 +23,7 @@
#include "curl_setup.h"
#if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \
- defined(CURL_LDAP_WIN)) && defined(UNICODE))
+ defined(USE_WIN32_LDAP)) && defined(UNICODE))
/*
* MultiByte conversions using Windows kernel32 library.
@@ -80,4 +80,4 @@ char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w)
return str_utf8;
}
-#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || CURL_LDAP_WIN) && UNICODE) */
+#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || USE_WIN32_LDAP) && UNICODE) */
diff --git a/lib/curl_multibyte.h b/lib/curl_multibyte.h
index d0247557c..dc7ed4c39 100644
--- a/lib/curl_multibyte.h
+++ b/lib/curl_multibyte.h
@@ -24,7 +24,7 @@
#include "curl_setup.h"
#if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \
- defined(CURL_LDAP_WIN)) && defined(UNICODE))
+ defined(USE_WIN32_LDAP)) && defined(UNICODE))
/*
* MultiByte conversions using Windows kernel32 library.
@@ -33,11 +33,11 @@
wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8);
char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w);
-#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || CURL_LDAP_WIN) && UNICODE) */
+#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || USE_WIN32_LDAP) && UNICODE) */
#if defined(USE_WIN32_IDN) || defined(USE_WINDOWS_SSPI) || \
- defined(CURL_LDAP_WIN)
+ defined(USE_WIN32_LDAP)
/*
* Macros Curl_convert_UTF8_to_tchar(), Curl_convert_tchar_to_UTF8()
@@ -87,6 +87,6 @@ typedef union {
#endif /* UNICODE */
-#endif /* USE_WIN32_IDN || USE_WINDOWS_SSPI || CURL_LDAP_WIN */
+#endif /* USE_WIN32_IDN || USE_WINDOWS_SSPI || USE_WIN32_LDAP */
#endif /* HEADER_CURL_MULTIBYTE_H */
diff --git a/lib/ldap.c b/lib/ldap.c
index f27fa9008..7a6aff179 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -35,7 +35,7 @@
* OpenLDAP library versions, USE_OPENLDAP shall not be defined.
*/
-#ifdef CURL_LDAP_WIN /* Use Windows LDAP implementation. */
+#ifdef USE_WIN32_LDAP /* Use Windows LDAP implementation. */
# include <winldap.h>
# ifndef LDAP_VENDOR_NAME
# error Your Platform SDK is NOT sufficient for LDAP support! \
@@ -81,7 +81,7 @@
typedef struct {
char *lud_host;
int lud_port;
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
TCHAR *lud_dn;
TCHAR **lud_attrs;
#else
@@ -89,7 +89,7 @@ typedef struct {
char **lud_attrs;
#endif
int lud_scope;
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
TCHAR *lud_filter;
#else
char *lud_filter;
@@ -194,7 +194,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
#ifdef LDAP_OPT_NETWORK_TIMEOUT
struct timeval ldap_timeout = {10,0}; /* 10 sec connection/search timeout */
#endif
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
TCHAR *host = NULL;
TCHAR *user = NULL;
TCHAR *passwd = NULL;
@@ -226,7 +226,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
infof(data, "LDAP local: trying to establish %s connection\n",
ldap_ssl ? "encrypted" : "cleartext");
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
host = Curl_convert_UTF8_to_tchar(conn->host.name);
if(!host) {
result = CURLE_OUT_OF_MEMORY;
@@ -259,7 +259,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
if(ldap_ssl) {
#ifdef HAVE_LDAP_SSL
-#ifdef CURL_LDAP_WIN
+#ifdef USE_WIN32_LDAP
/* Win32 LDAP SDK doesn't support insecure mode without CA! */
server = ldap_sslinit(host, (int)conn->port, 1);
ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON);
@@ -392,7 +392,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
goto quit;
}
}
-#ifdef CURL_LDAP_WIN
+#ifdef USE_WIN32_LDAP
ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto);
#endif
@@ -421,7 +421,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
entryIterator;
entryIterator = ldap_next_entry(server, entryIterator), num++) {
BerElement *ber = NULL;
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
TCHAR *attribute;
#else
char *attribute; /*! suspicious that this isn't 'const' */
@@ -432,7 +432,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
{
char *name;
size_t name_len;
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
TCHAR *dn = ldap_get_dn(server, entryIterator);
name = Curl_convert_tchar_to_UTF8(dn);
if(!name) {
@@ -449,7 +449,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4);
if(result) {
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(name);
#endif
ldap_memfree(dn);
@@ -460,7 +460,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *) name,
name_len);
if(result) {
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(name);
#endif
ldap_memfree(dn);
@@ -470,7 +470,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
if(result) {
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(name);
#endif
ldap_memfree(dn);
@@ -480,7 +480,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
dlsize += name_len + 5;
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(name);
#endif
ldap_memfree(dn);
@@ -492,7 +492,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
attribute = ldap_next_attribute(server, entryIterator, ber)) {
BerValue **vals;
size_t attr_len;
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
char *attr = Curl_convert_tchar_to_UTF8(attribute);
if(!attr) {
if(ber)
@@ -513,7 +513,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
if(result) {
ldap_value_free_len(vals);
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -527,7 +527,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
(char *) attr, attr_len);
if(result) {
ldap_value_free_len(vals);
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -540,7 +540,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)": ", 2);
if(result) {
ldap_value_free_len(vals);
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -562,7 +562,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
&val_b64_sz);
if(result) {
ldap_value_free_len(vals);
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -578,7 +578,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
free(val_b64);
if(result) {
ldap_value_free_len(vals);
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -596,7 +596,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
vals[i]->bv_len);
if(result) {
ldap_value_free_len(vals);
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -612,7 +612,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\n", 1);
if(result) {
ldap_value_free_len(vals);
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -630,7 +630,7 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
}
/* Free the attribute as we are done with it */
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(attr);
#endif
ldap_memfree(attribute);
@@ -662,7 +662,7 @@ quit:
ldapssl_client_deinit();
#endif /* HAVE_LDAP_SSL && CURL_HAS_NOVELL_LDAPSDK */
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
Curl_unicodefree(passwd);
Curl_unicodefree(user);
Curl_unicodefree(host);
@@ -802,7 +802,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
goto quit;
}
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
/* Convert the unescaped string to a tchar */
ludp->lud_dn = Curl_convert_UTF8_to_tchar(unescaped);
@@ -840,7 +840,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
}
/* Allocate our array (+1 for the NULL entry) */
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
ludp->lud_attrs = calloc(count + 1, sizeof(TCHAR *));
#else
ludp->lud_attrs = calloc(count + 1, sizeof(char *));
@@ -868,7 +868,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
goto quit;
}
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
/* Convert the unescaped string to a tchar */
ludp->lud_attrs[i] = Curl_convert_UTF8_to_tchar(unescaped);
@@ -934,7 +934,7 @@ static int _ldap_url_parse2 (const struct connectdata *conn, LDAPURLDesc *ludp)
goto quit;
}
-#if defined(CURL_LDAP_WIN)
+#if defined(USE_WIN32_LDAP)
/* Convert the unescaped string to a tchar */
ludp->lud_filter = Curl_convert_UTF8_to_tchar(unescaped);