--------------------- PatchSet 11564 Date: 2007/08/13 09:20:13 Author: serassio Branch: HEAD Tag: (none) Log: Windows port: Allow build on Windows of eDirectory Digest helper, also improved portability of LDAP Digest helper Members: helpers/digest_auth/eDirectory/digest_common.h:1.1->1.2 helpers/digest_auth/eDirectory/edir_ldapext.c:1.2->1.3 helpers/digest_auth/eDirectory/edir_ldapext.h:1.2->1.3 helpers/digest_auth/eDirectory/ldap_backend.c:1.2->1.3 helpers/digest_auth/ldap/digest_common.h:1.1->1.2 helpers/digest_auth/ldap/ldap_backend.c:1.5->1.6 Index: squid/helpers/digest_auth/eDirectory/digest_common.h =================================================================== RCS file: /cvsroot/squid/squid/helpers/digest_auth/eDirectory/digest_common.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- squid/helpers/digest_auth/eDirectory/digest_common.h 23 Jun 2007 20:36:12 -0000 1.1 +++ squid/helpers/digest_auth/eDirectory/digest_common.h 13 Aug 2007 09:20:13 -0000 1.2 @@ -18,12 +18,18 @@ #if HAVE_STDLIB_H #include #endif +#if HAVE_CTYPE_H +#include +#endif #if HAVE_UNISTD_H #include #endif #if HAVE_STRING_H #include #endif +#if HAVE_STRINGS_H +#include +#endif #if HAVE_SYS_TYPES_H #include #endif Index: squid/helpers/digest_auth/eDirectory/edir_ldapext.c =================================================================== RCS file: /cvsroot/squid/squid/helpers/digest_auth/eDirectory/edir_ldapext.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- squid/helpers/digest_auth/eDirectory/edir_ldapext.c 13 Aug 2007 08:54:19 -0000 1.2 +++ squid/helpers/digest_auth/eDirectory/edir_ldapext.c 13 Aug 2007 09:20:13 -0000 1.3 @@ -19,10 +19,33 @@ * find current contact information at www.novell.com. */ +#include "digest_common.h" + +#ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */ + +#define snprintf _snprintf +#include +#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 -#include -#include -#include + +#endif + +#include "edir_ldapext.h" + /* NMAS error codes */ #define NMAS_E_BASE (-1600) Index: squid/helpers/digest_auth/eDirectory/edir_ldapext.h =================================================================== RCS file: /cvsroot/squid/squid/helpers/digest_auth/eDirectory/edir_ldapext.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- squid/helpers/digest_auth/eDirectory/edir_ldapext.h 13 Aug 2007 08:54:19 -0000 1.2 +++ squid/helpers/digest_auth/eDirectory/edir_ldapext.h 13 Aug 2007 09:20:13 -0000 1.3 @@ -6,8 +6,6 @@ * stubs for FreeRadius's edir_ldapext.h * */ -#include - #define UNIVERSAL_PASS_LEN 256 #define NMAS_SUCCESS 0 Index: squid/helpers/digest_auth/eDirectory/ldap_backend.c =================================================================== RCS file: /cvsroot/squid/squid/helpers/digest_auth/eDirectory/ldap_backend.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- squid/helpers/digest_auth/eDirectory/ldap_backend.c 13 Aug 2007 08:54:19 -0000 1.2 +++ squid/helpers/digest_auth/eDirectory/ldap_backend.c 13 Aug 2007 09:20:13 -0000 1.3 @@ -8,12 +8,7 @@ #define LDAP_DEPRECATED 1 -#include -#include -#include -#include #include "ldap_backend.h" -#include "edir_ldapext.h" #ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */ @@ -48,6 +43,7 @@ #include #endif +#include "edir_ldapext.h" #define PROGRAM_NAME "digest_pw_auth(LDAP_backend)" /* Globals */ Index: squid/helpers/digest_auth/ldap/digest_common.h =================================================================== RCS file: /cvsroot/squid/squid/helpers/digest_auth/ldap/digest_common.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- squid/helpers/digest_auth/ldap/digest_common.h 16 May 2006 01:21:29 -0000 1.1 +++ squid/helpers/digest_auth/ldap/digest_common.h 13 Aug 2007 09:20:13 -0000 1.2 @@ -18,6 +18,9 @@ #if HAVE_STDLIB_H #include #endif +#if HAVE_CTYPE_H +#include +#endif #if HAVE_UNISTD_H #include #endif Index: squid/helpers/digest_auth/ldap/ldap_backend.c =================================================================== RCS file: /cvsroot/squid/squid/helpers/digest_auth/ldap/ldap_backend.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- squid/helpers/digest_auth/ldap/ldap_backend.c 13 Aug 2007 08:54:19 -0000 1.5 +++ squid/helpers/digest_auth/ldap/ldap_backend.c 13 Aug 2007 09:20:13 -0000 1.6 @@ -8,10 +8,6 @@ #define LDAP_DEPRECATED 1 -#include -#include -#include -#include #include "ldap_backend.h" #ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */