--------------------- PatchSet 11612 Date: 2007/08/31 14:16:18 Author: hno Branch: SQUID_2_6 Tag: (none) Log: Author: serassio MFC: Windows port: Allow build on Windows of eDirectory Digest helper, also improved portability of LDAP Digest helper Merged changes: 2007/08/13 09:20:13 serassio +36 -14 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.2.1->1.1.2.2 helpers/digest_auth/eDirectory/edir_ldapext.c:1.1.2.1->1.1.2.2 helpers/digest_auth/eDirectory/edir_ldapext.h:1.1.2.1->1.1.2.2 helpers/digest_auth/eDirectory/ldap_backend.c:1.1.2.1->1.1.2.2 helpers/digest_auth/ldap/digest_common.h:1.1->1.1.2.1 helpers/digest_auth/ldap/ldap_backend.c:1.3.2.1->1.3.2.2 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.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/helpers/digest_auth/eDirectory/digest_common.h 23 Jun 2007 21:48:49 -0000 1.1.2.1 +++ squid/helpers/digest_auth/eDirectory/digest_common.h 31 Aug 2007 14:16:18 -0000 1.1.2.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.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/helpers/digest_auth/eDirectory/edir_ldapext.c 23 Jun 2007 21:48:49 -0000 1.1.2.1 +++ squid/helpers/digest_auth/eDirectory/edir_ldapext.c 31 Aug 2007 14:16:18 -0000 1.1.2.2 @@ -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.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/helpers/digest_auth/eDirectory/edir_ldapext.h 23 Jun 2007 21:48:49 -0000 1.1.2.1 +++ squid/helpers/digest_auth/eDirectory/edir_ldapext.h 31 Aug 2007 14:16:18 -0000 1.1.2.2 @@ -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.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/helpers/digest_auth/eDirectory/ldap_backend.c 23 Jun 2007 21:48:49 -0000 1.1.2.1 +++ squid/helpers/digest_auth/eDirectory/ldap_backend.c 31 Aug 2007 14:16:18 -0000 1.1.2.2 @@ -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.1.2.1 diff -u -r1.1 -r1.1.2.1 --- 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 31 Aug 2007 14:16:18 -0000 1.1.2.1 @@ -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.3.2.1 retrieving revision 1.3.2.2 diff -u -r1.3.2.1 -r1.3.2.2 --- squid/helpers/digest_auth/ldap/ldap_backend.c 22 Aug 2007 00:34:21 -0000 1.3.2.1 +++ squid/helpers/digest_auth/ldap/ldap_backend.c 31 Aug 2007 14:16:18 -0000 1.3.2.2 @@ -8,10 +8,6 @@ #define LDAP_DEPRECATED 1 -#include -#include -#include -#include #include "ldap_backend.h" #ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */