]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: Allow build on Windows of eDirectory Digest helper
authorserassio <>
Sun, 12 Aug 2007 00:51:41 +0000 (00:51 +0000)
committerserassio <>
Sun, 12 Aug 2007 00:51:41 +0000 (00:51 +0000)
helpers/digest_auth/eDirectory/edir_ldapext.c
helpers/digest_auth/eDirectory/edir_ldapext.h
helpers/digest_auth/eDirectory/ldap_backend.c

index 256a5e08bde6d75de498673ac2f88d882527a93f..c6711c5231e7d389814f6d07191312bd3eeef842 100644 (file)
  * find current contact  information at www.novell.com.
  */ 
 
-#include <ldap.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <strings.h>
+#include "digest_common.h"
+
+#ifdef _SQUID_MSWIN_           /* Native Windows port and MinGW */
+
+#define snprintf _snprintf
+#include <windows.h>
+#include <winldap.h>
+#ifndef LDAPAPI
+#define LDAPAPI __cdecl
+#endif
+#ifdef LDAP_VERSION3
+#ifndef LDAP_OPT_X_TLS
+#define LDAP_OPT_X_TLS 0x6000
+#endif
+#define ber_alloc() ber_alloc_t(0)
+#endif /* LDAP_VERSION3 */
+
+#else
+
+#include <lber.h>
+#include <ldap.h>
+
+#endif
 
 #include "edir_ldapext.h"
 
index 21600972900204bd641824167f07c382ac67d660..4a3b0eeb79126f064f03f7fceee72a89b4154b64 100644 (file)
@@ -6,8 +6,6 @@
  * stubs for FreeRadius's edir_ldapext.h
  *
  */
-#include <ldap.h>
-
 #define UNIVERSAL_PASS_LEN    256
 #define NMAS_SUCCESS          0
 
index f3000a91cfe20618d0ee8fd50b94a146441c1840..5c39c781ae0847a6ab713aa95352535242b544ba 100644 (file)
@@ -13,7 +13,6 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include "ldap_backend.h"
-#include "edir_ldapext.h"
 
 #ifdef _SQUID_MSWIN_           /* Native Windows port and MinGW */
 
@@ -48,6 +47,7 @@ PFldap_start_tls_s Win32_ldap_start_tls_s;
 #include <ldap.h>
 
 #endif
+#include "edir_ldapext.h"
 #define PROGRAM_NAME "digest_pw_auth(LDAP_backend)"
 
 /* Globals */