From: Jeffrey Altman Date: Mon, 15 Dec 2003 17:54:40 +0000 (+0000) Subject: * win-mac.h: source code written to the C99 standard assumes there X-Git-Tag: krb5-1.4-beta1~697 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=74f2c49b2b70f8a3e1e5f3cc0fd158d49aeef2ce;p=krb5.git * win-mac.h: source code written to the C99 standard assumes there are standard definitions for the MAX sizes of C types including size_t. The MAX preprocessor variables are declared in limits.h but limits.h is not included by any of the other header files. We will therefore include it via win-mac.h. We must also add a declaration of SIZE_MAX (for size_t) because Microsoft does not provide one. ticket: 2040 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15927 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 4bcb53f2a..c1b36045a 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,13 @@ +2003-12-15 Jeffrey Altman + + * win-mac.h: source code written to the C99 standard assumes there + are standard definitions for the MAX sizes of C types including + size_t. The MAX preprocessor variables are declared in limits.h + but limits.h is not included by any of the other header files. + We will therefore include it via win-mac.h. We must also add a + declaration of SIZE_MAX (for size_t) because Microsoft does not + provide one. + 2003-12-15 Jeffrey Altman * k5-platform.h: apply casts (unsigned char) to the assignments from diff --git a/src/include/win-mac.h b/src/include/win-mac.h index 16d1062e8..b7519d752 100644 --- a/src/include/win-mac.h +++ b/src/include/win-mac.h @@ -30,6 +30,11 @@ #define SIZEOF_LONG 4 #include +#include + +#ifndef SIZE_MAX /* in case Microsoft defines max size of size_t */ +#define SIZE_MAX UINT_MAX +#endif #ifndef KRB5_CALLCONV # define KRB5_CALLCONV __stdcall