From 6258b76c49f49a56a7c713914b798e80c6553b06 Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Thu, 5 May 2005 21:08:07 +0000 Subject: Port Mesa to build on a P64 platform (e.g., Win64). P64 platforms use 64-bit pointers and 32-bit longs. So, operations like casting pointers to unsigned long and back to pointer won't work. glheader.h now includes files to define uintptr_t, which should instead be used for this sort of operation. It is an integer type that is the same size as a pointer. --- src/mesa/main/glheader.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/glheader.h') diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 7855fd63fa..0b1c16d244 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -76,6 +76,13 @@ #endif +/* Get typedefs for uintptr_t and friends */ +#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP) +#include +#else +#include +#endif + #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP) # define __WIN32__ # define finite _finite @@ -117,7 +124,7 @@ */ /* compatibility guard so we don't need to change client code */ #if defined(_WIN32) && !defined(_WINDEF_) && !defined(_WINDEF_H) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP) -typedef int (GLAPIENTRY *PROC)(); +typedef INT_PTR (GLAPIENTRY *PROC)(); typedef unsigned long COLORREF; #endif -- cgit v1.2.3