]> granicus.if.org Git - curl/commitdiff
Enable OpenLDAP support for cygwin builds.
authorYang Tse <yangsita@gmail.com>
Fri, 4 Jun 2010 13:14:31 +0000 (15:14 +0200)
committerYang Tse <yangsita@gmail.com>
Fri, 4 Jun 2010 13:14:31 +0000 (15:14 +0200)
Enable OpenLDAP support for cygwin builds. This support was disabled back
in 2008 due to incompatibilities between OpenSSL and OpenLDAP headers.
cygwin's OpenSSL 0.9.8l and OpenLDAP 2.3.43 versions on cygwin 1.5.25
allow building an OpenLDAP enabled libcurl supporting back to Windows 95.

Remove non-functional CURL_LDAP_HYBRID code and references.

CHANGES
CMakeLists.txt
RELEASE-NOTES
configure.ac
lib/config-symbian.h
lib/config-vxworks.h
lib/config-win32.h
lib/config-win32ce.h
lib/curl_config.h.cmake
lib/ldap.c

diff --git a/CHANGES b/CHANGES
index 02501a350c1a20992ff4a73cd22b0dd7aa42241b..4b99f099c8145aa626cb3a3e6ff36ff7b4e02239 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,14 @@
 
                                   Changelog
 
+Yang Tse (4 June 2010)
+- Enabled OpenLDAP support for cygwin builds. This support was disabled back
+  in 2008 due to incompatibilities between OpenSSL and OpenLDAP headers.
+  cygwin's OpenSSL 0.9.8l and OpenLDAP 2.3.43 versions on cygwin 1.5.25
+  allow building an OpenLDAP enabled libcurl supporting back to Windows 95.
+
+  Removed the non-functional CURL_LDAP_HYBRID code and references.
+
 Daniel Stenberg (2 June 2010)
 - Jason McDonald posted bug report #3006786 when he found that the SFTP code
   didn't timeout properly in several places in the code even if a timeout was
index 56c42785fcdbcdc910918f7844738daced0643a6..a9bde719a403aa42a20283082000b26b42ef6e4e 100644 (file)
@@ -120,16 +120,11 @@ if(WIN32)
   if( NOT HAVE_WLDAP32)
     set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
     message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
-    option(CURL_LDAP_WIN "Use W$ LDAP implementation" OFF)
+    option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
   else()
-    option(CURL_LDAP_WIN "Use W$ LDAP implementation" ON)
+    option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
   endif()
   mark_as_advanced(CURL_LDAP_WIN)
-  set(CURL_LDAP_HYBRID OFF)
-else()
-  option(CURL_LDAP_HYBRID "W$ LDAP with non-W$ compiler" OFF)
-  mark_as_advanced(CURL_LDAP_HYBRID)
-  set(CURL_LDAP_WIN OFF)
 endif()
 
 if(HTTP_ONLY)
index 49beadeece739f28f25b6a17c6c741aa01df496a..e9f5852e612c315c75993c65331fc20468802c7f 100644 (file)
@@ -16,6 +16,7 @@ This release includes the following changes:
  o added support for FTP wildcard matching and downloads
  o added support for RTMP
  o introducing new LDAP code for new enough OpenLDAP
+ o OpenLDAP support enabled for cygwin builds
 
 This release includes the following bugfixes:
 
index 9af5316cbe1ea0e5fad715e2444c0cb70cff4f5b..af30b8a69fa69d83f46d737f58bcab138e5bb0d5 100644 (file)
@@ -371,28 +371,10 @@ AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
        AC_SUBST(CURL_DISABLE_LDAP, [1])
        ;;
   *)
-       case $host in
-         *-*-cygwin*)
-           # Force no ldap. config/build process is broken for cygwin
-           AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-           AC_SUBST(CURL_DISABLE_LDAP, [1])
-           AC_MSG_RESULT(no)
-           ;;
-         *)
-           AC_MSG_RESULT(yes)
-       esac
+       AC_MSG_RESULT(yes)
        ;;
   esac ],[
-       case $host in
-         *-*-cygwin*)
-           # Force no ldap. config/build process is broken for cygwin
-           AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
-           AC_SUBST(CURL_DISABLE_LDAP, [1])
-           AC_MSG_RESULT(no)
-           ;;
-         *)
-           AC_MSG_RESULT(yes)
-       esac ]
+       AC_MSG_RESULT(yes) ]
 )
 AC_MSG_CHECKING([whether to support ldaps])
 AC_ARG_ENABLE(ldaps,
@@ -810,13 +792,11 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
   CURL_CHECK_HEADER_LDAP_SSL
 
   if test -z "$LDAPLIBNAME" ; then
-    case $host in
-      *-*-cygwin* | *-*-mingw* | *-*-pw32*)
-        dnl Windows uses a single and unique OpenLDAP DLL name
-        LDAPLIBNAME="wldap32"
-        LBERLIBNAME="no"
-        ;;
-    esac
+    if test "$ac_cv_native_windows" = "yes"; then
+      dnl Windows uses a single and unique LDAP library name
+      LDAPLIBNAME="wldap32"
+      LBERLIBNAME="no"
+    fi
   fi
 
   if test "$LDAPLIBNAME" ; then
@@ -862,12 +842,7 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
 
   if test "$LDAPLIBNAME" = "wldap32"; then
     curl_ldap_msg="enabled (winldap)"
-    AC_DEFINE(CURL_LDAP_WIN, 1, [Use W$ LDAP implementation])
-    case $host in
-      *-*-cygwin* | *-*-pw32*)
-        AC_DEFINE(CURL_LDAP_HYBRID, 1, [W$ LDAP with non-W$ compiler])
-        ;;
-    esac
+    AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
   else
     curl_ldap_msg="enabled (OpenLDAP)"
     if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
index f5589fe784ab45a3f7204ddc067150b0bef5c8f5..9f8b74a575108245a37bc075ae86e88161568b19 100644 (file)
 /* to enable hidden symbols */
 /*#define CURL_HIDDEN_SYMBOLS 1*/
 
-/* W$ LDAP with non-W$ compiler */
-/* #undef CURL_LDAP_HYBRID */
-
-/* Use W$ LDAP implementation */
+/* Use Windows LDAP implementation */
 /* #undef CURL_LDAP_WIN */
 
 /* when not building a shared library */
index 3ad36d233df63126ba797718161bbfcc932f0cb4..f7797fd0ed7e8ce4b04168f5fcbc39eb3e2d39bb 100644 (file)
 /* to enable hidden symbols */
 /* #undef CURL_HIDDEN_SYMBOLS */
 
-/* W$ LDAP with non-W$ compiler */
-/* #undef CURL_LDAP_HYBRID */
-
-/* Use W$ LDAP implementation */
+/* Use Windows LDAP implementation */
 /* #undef CURL_LDAP_WIN */
 
 /* when not building a shared library */
index 43997faf1a4a4438c06b876dee2a85a1f331aede..0c254707aa06ef6b2b4cd40fbadad2b9d5ca1e43 100644 (file)
 /* ---------------------------------------------------------------- */
 
 #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
-#undef CURL_LDAP_HYBRID
 #undef CURL_LDAP_WIN
 #define HAVE_LDAP_SSL_H 1
 #define HAVE_LDAP_URL_PARSE 1
 #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
-#undef CURL_LDAP_HYBRID
 #undef CURL_LDAP_WIN
 #define HAVE_LDAP_URL_PARSE 1
 #else
-#undef CURL_LDAP_HYBRID
 #undef HAVE_LDAP_URL_PARSE
 #define CURL_LDAP_WIN 1
 #endif
index 058fcc0f0b7b3962bef3bfdbd3fc0165b429cc06..1f417825ed140f17edac6cfc73fe128b49da62d2 100644 (file)
 /* ---------------------------------------------------------------- */
 
 #define CURL_LDAP_WIN 1
-#undef CURL_LDAP_HYBRID
 #undef HAVE_LDAP_URL_PARSE
 
 /* ---------------------------------------------------------------- */
index 14d2719d331ff6c37e5a3f398e71a8939cdc5046..deebe71dc38f51ceef670425c22c92873d69f5ef 100644 (file)
 /* to enable hidden symbols */
 #cmakedefine CURL_HIDDEN_SYMBOLS ${CURL_HIDDEN_SYMBOLS}
 
-/* W$ LDAP with non-W$ compiler */
-#cmakedefine CURL_LDAP_HYBRID ${CURL_LDAP_HYBRID}
-
-/* Use W$ LDAP implementation */
+/* Use Windows LDAP implementation */
 #cmakedefine CURL_LDAP_WIN ${CURL_LDAP_WIN}
 
 /* when not building a shared library */
index e837dbfddaa834c9d239230463a173d48d93f054..d6556c9054cee1a24c631f6e20e839709cee4164 100644 (file)
 #include <ctype.h>
 #include <errno.h>
 
-#ifdef CURL_LDAP_HYBRID         /* If W$ definitions are needed. */
-# include <windows.h>
-  /* Remember we are NOT in a W$ compiler! */
-# undef WIN32
-# undef _WIN32
-# undef __WIN32__
-#endif
-
-#ifdef CURL_LDAP_WIN            /* Use W$ LDAP implementation. */
+#ifdef CURL_LDAP_WIN            /* Use Windows LDAP implementation. */
 # include <winldap.h>
 # ifndef LDAP_VENDOR_NAME
 #  error Your Platform SDK is NOT sufficient for LDAP support! Update your Platform SDK, or disable LDAP support!
 #  include <winber.h>
 # endif
 #else
-#define LDAP_DEPRECATED 1       /* Be sure ldap_init() is defined. */
-#ifdef HAVE_LBER_H
-# include <lber.h>
-#endif
+# define LDAP_DEPRECATED 1      /* Be sure ldap_init() is defined. */
+# ifdef HAVE_LBER_H
+#  include <lber.h>
+# endif
 # include <ldap.h>
-#if (defined(HAVE_LDAP_SSL) && defined(HAVE_LDAP_SSL_H))
-# include <ldap_ssl.h>
-#endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
+# if (defined(HAVE_LDAP_SSL) && defined(HAVE_LDAP_SSL_H))
+#  include <ldap_ssl.h>
+# endif /* HAVE_LDAP_SSL && HAVE_LDAP_SSL_H */
 #endif
 
 #ifdef HAVE_UNISTD_H