Index: gssmit-mac.h
===================================================================
RCS file: gssmit-mac.h
diff -N gssmit-mac.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gssmit-mac.h	23 May 2008 04:33:54 -0000
@@ -0,0 +1,24 @@
+#ifndef __GSSMIT_MAC_H
+#define __GSSMIT_MAC_H
+
+/* Only for WIN32 builds */
+#ifdef WIN32
+
+/* Prevent inclusion of GSS MIT's broken win-mac.h */
+#define _KRB5_WIN_MAC_H 1
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#elif defined(_MSC_VER)
+  typedef __int32 int32_t;
+  typedef unsigned __int32 uint32_t;
+#endif
+
+#ifndef KRB5_CALLCONV
+# define KRB5_CALLCONV __stdcall
+# define KRB5_CALLCONV_C __cdecl
+#endif
+
+#endif /* WIN32 */
+
+#endif /* __GSSMIT_MAC_H */
Index: krb5.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/krb5.c,v
retrieving revision 1.7
diff -U 3 -r1.7 krb5.c
--- krb5.c	22 May 2008 19:44:10 -0000	1.7
+++ krb5.c	23 May 2008 04:33:54 -0000
@@ -47,6 +47,7 @@
 #include <string.h>
 #ifdef HAVE_GSSMIT
 /* MIT style */
+#include "gssmit-mac.h"
 #include <gssapi/gssapi.h>
 #include <gssapi/gssapi_generic.h>
 #include <gssapi/gssapi_krb5.h>
Index: security.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/security.c,v
retrieving revision 1.37
diff -U 3 -r1.37 security.c
--- security.c	22 May 2008 19:44:11 -0000	1.37
+++ security.c	23 May 2008 04:33:54 -0000
@@ -70,7 +70,9 @@
 /* The last #include file should be: */
 #include "memdebug.h"
 
+#ifndef min
 #define min(a, b)   ((a) < (b) ? (a) : (b))
+#endif
 
 static const struct {
   enum protection_level level;
Index: urldata.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/urldata.h,v
retrieving revision 1.378
diff -U 3 -r1.378 urldata.h
--- urldata.h	30 Apr 2008 21:20:09 -0000	1.378
+++ urldata.h	23 May 2008 04:33:57 -0000
@@ -115,6 +115,7 @@
 # ifdef HAVE_GSSGNU
 #  include <gss.h>
 # elif defined HAVE_GSSMIT
+#  include "gssmit-mac.h"
 #  include <gssapi/gssapi.h>
 #  include <gssapi/gssapi_generic.h>
 # else
