From: serassio <> Date: Sun, 12 Aug 2007 00:51:41 +0000 (+0000) Subject: Windows port: Allow build on Windows of eDirectory Digest helper X-Git-Tag: SQUID_3_0_PRE7~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f971fe391aaa9a7c16bf92f5e1c4c715b9b6d03a;p=thirdparty%2Fsquid.git Windows port: Allow build on Windows of eDirectory Digest helper --- diff --git a/helpers/digest_auth/eDirectory/edir_ldapext.c b/helpers/digest_auth/eDirectory/edir_ldapext.c index 256a5e08bd..c6711c5231 100644 --- a/helpers/digest_auth/eDirectory/edir_ldapext.c +++ b/helpers/digest_auth/eDirectory/edir_ldapext.c @@ -19,10 +19,32 @@ * find current contact information at www.novell.com. */ -#include #include #include #include +#include "digest_common.h" + +#ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */ + +#define snprintf _snprintf +#include +#include +#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 +#include + +#endif #include "edir_ldapext.h" diff --git a/helpers/digest_auth/eDirectory/edir_ldapext.h b/helpers/digest_auth/eDirectory/edir_ldapext.h index 2160097290..4a3b0eeb79 100644 --- a/helpers/digest_auth/eDirectory/edir_ldapext.h +++ b/helpers/digest_auth/eDirectory/edir_ldapext.h @@ -6,8 +6,6 @@ * stubs for FreeRadius's edir_ldapext.h * */ -#include - #define UNIVERSAL_PASS_LEN 256 #define NMAS_SUCCESS 0 diff --git a/helpers/digest_auth/eDirectory/ldap_backend.c b/helpers/digest_auth/eDirectory/ldap_backend.c index f3000a91cf..5c39c781ae 100644 --- a/helpers/digest_auth/eDirectory/ldap_backend.c +++ b/helpers/digest_auth/eDirectory/ldap_backend.c @@ -13,7 +13,6 @@ #include #include #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 #endif +#include "edir_ldapext.h" #define PROGRAM_NAME "digest_pw_auth(LDAP_backend)" /* Globals */