summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2003-12-15 17:54:40 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2003-12-15 17:54:40 +0000
commit74f2c49b2b70f8a3e1e5f3cc0fd158d49aeef2ce (patch)
tree520b4522f7b40d9a8c2948e35f9cdd670bcf7dfa
parent334717803cb3f9babf832c17932c486fc3a90b00 (diff)
downloadkrb5-74f2c49b2b70f8a3e1e5f3cc0fd158d49aeef2ce.tar.gz
krb5-74f2c49b2b70f8a3e1e5f3cc0fd158d49aeef2ce.tar.xz
krb5-74f2c49b2b70f8a3e1e5f3cc0fd158d49aeef2ce.zip
* 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
-rw-r--r--src/include/ChangeLog10
-rw-r--r--src/include/win-mac.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index 4bcb53f2a..c1b36045a 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -1,5 +1,15 @@
2003-12-15 Jeffrey Altman <jaltman@mit.edu>
+ * 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 <jaltman@mit.edu>
+
* k5-platform.h: apply casts (unsigned char) to the assignments from
64-bit ints to unsigned char fields to avoid warnings
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 <windows.h>
+#include <limits.h>
+
+#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