#else /* ! RES_ONLY */
+/* To ensure backward compatibility of the ABI use 32-bit time_t on
+ * 32-bit Windows.
+ */
+#ifdef _KRB5_INT_H
+#ifdef KRB5_GENERAL__
+#error krb5.h included before k5-int.h
+#endif /* KRB5_GENERAL__ */
+#if _INTEGRAL_MAX_BITS >= 64 && _MSC_VER >= 1400 && !defined(_WIN64) && !defined(_USE_32BIT_TIME_T)
+#if defined(_TIME_T_DEFINED) || defined(_INC_IO) || defined(_INC_TIME) || defined(_INC_WCHAR)
+#error time_t has been defined as a 64-bit integer which is incompatible with Kerberos on this platform.
+#endif /* _TIME_T_DEFINED */
+#define _USE_32BIT_TIME_T
+#endif
+#endif
+
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG 4
#include <windows.h>
#include <limits.h>
-#define HAVE_LABS
-
#ifndef SIZE_MAX /* in case Microsoft defines max size of size_t */
+#ifdef MAX_SIZE /* Microsoft defines MAX_SIZE as max size of size_t */
+#define SIZE_MAX MAX_SIZE
+#else
#define SIZE_MAX UINT_MAX
#endif
+#endif
#ifndef KRB5_CALLCONV
# define KRB5_CALLCONV __stdcall
#ifndef KRB5_SYSTYPES__
#define KRB5_SYSTYPES__
#include <sys/types.h>
-typedef unsigned long u_long; /* Not part of sys/types.h on the pc */
-typedef unsigned int u_int;
-typedef unsigned short u_short;
-typedef unsigned char u_char;
+typedef unsigned long u_long; /* Not part of sys/types.h on the pc */
+typedef unsigned int u_int;
+typedef unsigned short u_short;
+typedef unsigned char u_char;
+typedef unsigned int uint32_t;
+typedef int int32_t;
+#if _INTEGRAL_MAX_BITS >= 64
+typedef unsigned __int64 uint64_t;
+typedef __int64 int64_t;
+#endif
#endif /* KRB5_SYSTYPES__ */
#define MAXHOSTNAMELEN 512
#define HAVE_SRAND
#define HAVE_ERRNO
#define HAVE_STRDUP
+#define HAVE_GETADDRINFO
+#define HAVE_GETNAMEINFO
#define NO_USERID
#define NO_PASSWORD
+#define HAVE_STRERROR
+#define SYS_ERRLIST_DECLARED
+/* if __STDC_VERSION__ >= 199901L this shouldn't be needed */
+#define inline __inline
+#define KRB5_USE_INET6
+#define NEED_INSIXADDR_ANY
+#define ENABLE_THREADS
#define WM_KERBEROS5_CHANGED "Kerberos5 Changed"
#ifdef KRB4
HINSTANCE get_lib_instance(void);
+#define GETSOCKNAME_ARG2_TYPE struct sockaddr
+#define GETSOCKNAME_ARG3_TYPE size_t
+#define GETPEERNAME_ARG2_TYPE GETSOCKNAME_ARG2_TYPE
+#define GETPEERNAME_ARG3_TYPE GETSOCKNAME_ARG3_TYPE
+
#endif /* !RES_ONLY */
#endif /* _WIN32 */