]> code.delx.au - gnu-emacs/blobdiff - nt/inc/stdint.h
Update copyright year to 2016
[gnu-emacs] / nt / inc / stdint.h
index 4af0346af2c346442132a1566df87ca0c9e6bda6..adc6a1e2f2e4ba4a217db075c205751e8b4b0244 100644 (file)
@@ -1,6 +1,6 @@
 /* Replacement stdint.h file for building GNU Emacs on Windows.
 
-Copyright (C) 2011  Free Software Foundation, Inc.
+Copyright (C) 2011-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -27,21 +27,45 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Minimum definitions to allow compilation with tool chains where
    stdint.h is not available, e.g. Microsoft Visual Studio.  */
 
+#ifdef _WIN64
+typedef __int64 intptr_t;
 typedef unsigned int uint32_t;
-#define INT32_MAX 2147483647
+typedef unsigned __int64 uint64_t;
+#define UINT64_MAX (18446744073709551615i64)
+#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 INTPTR_MIN INT64_MIN
+#define UINTPTR_MAX UINT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+#define UINTMAX_MIN UINT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define INTMAX_MIN INT64_MIN
+#define uintmax_t unsigned __int64
+#define intmax_t __int64
 #else
-  typedef int intptr_t;
+typedef int intptr_t;
+typedef unsigned int uint32_t;
+#define UINT32_MAX 4294967295
+#define UINT32_MIN 0
+#define INT32_MAX 2147483647
+#define INT32_MIN (~INT32_MAX)
 #define INTPTR_MAX INT32_MAX
+#define INTPTR_MIN INT32_MIN
+#define UINTPTR_MAX UINT32_MAX
+#define UINTMAX_MAX UINT32_MAX
+#define UINTMAX_MIN UINT32_MIN
+#define INTMAX_MAX INT32_MAX
+#define INTMAX_MIN INT32_MIN
+#define uintmax_t unsigned long
+#define intmax_t long
 #endif
 
-#define uintmax_t unsigned __int64
 #define PTRDIFF_MAX INTPTR_MAX
+#define PTRDIFF_MIN INTPTR_MIN
+#define SIZE_MAX UINTPTR_MAX
 
 #endif /* !__GNUC__ */