2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
+ * inc/stdint.h (UINT64_MAX, UINT64_MIN, INT64_MIN, UINTMAX_MAX)
+ (UINTMAX_MIN, INTMAX_MAX, INTMAX_MIN, UINT32_MIN, UINT32_MAX)
+ (INT32_MIN, UINTMAX_MAX, UINTMAX_MIN, INTMAX_MAX, INTMAX_MIN)
+ (intmax_t, INT64_MAX): Add for MSVC.
+
* config.nt: (mode_t) [!__GNUC__]: Define mode_t for MSVC.
2011-11-05 Eli Zaretskii <eliz@gnu.org>
/* Minimum definitions to allow compilation with tool chains where
stdint.h is not available, e.g. Microsoft Visual Studio. */
-typedef unsigned int uint32_t;
-#define INT32_MAX 2147483647
+#ifdef _WIN64
+typedef __int64 intptr_t;
+#define UINT64_MAX 18446744073709551616
+#define UINT64_MIN 0
/* "i64" is the non-standard suffix used by MSVC for 64-bit constants. */
#define INT64_MAX 9223372036854775807i64
-
-#ifdef _WIN64
- typedef __int64 intptr_t;
+#define INT64_MIN (~INT64_MAX)
#define INTPTR_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+#define UINTMAX_MIN UINT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define INTMAX_MIN INT64_MIN
#else
- typedef int intptr_t;
+typedef int intptr_t;
+typedef unsigned int uint32_t;
+#define UINT32_MAX 4294967296
+#define UINT32_MIN 0
+#define INT32_MAX 2147483647
+#define INT32_MIN (~INT32_MAX)
#define INTPTR_MAX INT32_MAX
+#define UINTMAX_MAX UINT32_MAX
+#define UINTMAX_MIN UINT32_MIN
+#define INTMAX_MAX INT32_MAX
+#define INTMAX_MIN INT32_MIN
#endif
#define uintmax_t unsigned __int64
+#define intmax_t __int64
#define PTRDIFF_MAX INTPTR_MAX
#endif /* !__GNUC__ */