summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glheader.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-06-24 14:18:07 +0900
committerJosé Fonseca <[email protected]>2008-06-24 14:18:07 +0900
commita148025d94505bca08f9baa1689048032bb60e2c (patch)
treed5fe20f005a3715327909acd3266cbaedd9c0537 /src/mesa/main/glheader.h
parentb6f053739f66c1c88db12df4690051c0a54ff0f7 (diff)
mesa: Use standard integer types.
Especially get rid of the non-portable long long.
Diffstat (limited to 'src/mesa/main/glheader.h')
-rw-r--r--src/mesa/main/glheader.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 9e39a8370e6..57d7e60ad3d 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -69,16 +69,33 @@
#include <stdarg.h>
-/* Get typedefs for uintptr_t and friends */
-#if defined(__MINGW32__) || defined(__NetBSD__)
-# include <stdint.h>
-#elif defined(_WIN32)
-# include <BaseTsd.h>
-# if _MSC_VER == 1200
- typedef UINT_PTR uintptr_t;
-# endif
+/* Get standard integer types */
+#if defined(_MSC_VER)
+
+ typedef __int8 int8_t;
+ typedef unsigned __int8 uint8_t;
+ typedef __int16 int16_t;
+ typedef unsigned __int16 uint16_t;
+# ifndef __eglplatform_h_
+ typedef __int32 int32_t;
+# endif
+ typedef unsigned __int32 uint32_t;
+ typedef __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+
+# if defined(_WIN64)
+ typedef __int64 intptr_t;
+ typedef unsigned __int64 uintptr_t;
+# else
+ typedef __int32 intptr_t;
+ typedef unsigned __int32 uintptr_t;
+# endif
+
+# define INT64_C(__val) __val##i64
+# define UINT64_C(__val) __val##ui64
+
#else
-# include <inttypes.h>
+# include <stdint.h>
#endif
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)