cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: In preparation for release #102

From: Guenter Knauf <eflash_at_gmx.net>
Date: Thu, 11 Oct 2007 00:46:04 +0200

Hi,
> I figure that would be better than the current situation, yes.
ok, have done this now after I couldnt fix the situation after another hour of getting crahes;
currently it seems to me that with MSVC6 delivered PSDK the only way would be to fall back to previously used dynamic import.
I do now error out in ldap.c - earlier isnt possible without including winldap.h to all source files.

If someone else with more Win32 experience wants to pick this up - here's what I found so far:

--- ldap.c.orig Sun Sep 30 02:20:15 2007
+++ ldap.c Thu Oct 11 00:31:14 2007
@@ -45,6 +45,13 @@
 
 #ifdef CURL_LDAP_WIN /* Use W$ LDAP implementation. */
 # include <winldap.h>
+# ifndef LDAP_VENDOR_NAME
+# define LDAP_VENDOR_NAME "Microsoft"
+# define LDAP_VENDOR_VERSION 0
+# define BerValue LDAP_BERVAL
+# else
+# include <winber.h>
+# endif
 #else
 #define LDAP_DEPRECATED 1 /* Be sure ldap_init() is defined. */
 # include <ldap.h>
@@ -98,6 +105,11 @@
 #define ldap_free_urldesc _ldap_free_urldesc
 #endif
 
+#if (LDAP_VENDOR_VERSION == 0)
+void ber_free(BerElement*, int);
+#endif
+
+
 #ifdef DEBUG_LDAP
   #define LDAP_TRACE(x) do { \
                             _ldap_trace ("%u: ", __LINE__); \

that would be needed in order to get ldap.c compiled with this old winldap.h...
however the resulting binary then crahes somewhere inside wldap32.dll, and I couldnt yet figure out why...

It would be interesting to know if someone with a later MSVC compiler and / or later PSDK can create a working binary.

Guen.
Received on 2007-10-11