]> git.sesse.net Git - x264/blobdiff - extras/stdint.h
Intel Compiler support
[x264] / extras / stdint.h
index 849d9ab0373643239b7e84f3434270abfd28b02c..9459662d5c1c6e03533587c22994d002b7912099 100644 (file)
@@ -117,9 +117,15 @@ typedef unsigned __int64   uintmax_t;
 
 /* 7.18.2.4  Limits of integer types capable of holding
     object pointers */
+#if defined(_WIN64) || defined(__LP64__)
+#define INTPTR_MIN INT64_MIN
+#define INTPTR_MAX INT64_MAX
+#define UINTPTR_MAX UINT64_MAX
+#else
 #define INTPTR_MIN INT32_MIN
 #define INTPTR_MAX INT32_MAX
 #define UINTPTR_MAX UINT32_MAX
+#endif
 
 /* 7.18.2.5  Limits of greatest-width integer types */
 #define INTMAX_MIN INT64_MIN
@@ -127,13 +133,24 @@ typedef unsigned __int64   uintmax_t;
 #define UINTMAX_MAX UINT64_MAX
 
 /* 7.18.3  Limits of other integer types */
+#if defined(_WIN64) || defined(__LP64__)
+#define PTRDIFF_MIN INT64_MIN
+#define PTRDIFF_MAX INT64_MAX
+#else
 #define PTRDIFF_MIN INT32_MIN
 #define PTRDIFF_MAX INT32_MAX
+#endif
 
 #define SIG_ATOMIC_MIN INT32_MIN
 #define SIG_ATOMIC_MAX INT32_MAX
 
+#ifndef SIZE_MAX
+#if defined(_WIN64) || defined(__LP64__)
+#define SIZE_MAX UINT64_MAX
+#else
 #define SIZE_MAX UINT32_MAX
+#endif
+#endif
 
 #ifndef WCHAR_MIN  /* also in wchar.h */
 #define WCHAR_MIN 0