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/extensions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/extensions.c') diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 150492e7c30..8f6b554a478 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -31,7 +31,7 @@ #include "mtypes.h" -#define F(x) (int)(unsigned long)&(((struct gl_extensions *)0)->x) +#define F(x) (int)(uintptr_t)&(((struct gl_extensions *)0)->x) #define ON GL_TRUE #define OFF GL_FALSE @@ -489,7 +489,7 @@ _mesa_make_extension_string( GLcontext *ctx ) for (i = 0 ; i < Elements(default_extensions) ; i++) { if (!default_extensions[i].flag_offset || *(base + default_extensions[i].flag_offset)) { - extStrLen += _mesa_strlen(default_extensions[i].name) + 1; + extStrLen += (GLuint)_mesa_strlen(default_extensions[i].name) + 1; } } s = (GLubyte *) _mesa_malloc(extStrLen); @@ -499,7 +499,7 @@ _mesa_make_extension_string( GLcontext *ctx ) for (i = 0 ; i < Elements(default_extensions) ; i++) { if (!default_extensions[i].flag_offset || *(base + default_extensions[i].flag_offset)) { - GLuint len = _mesa_strlen(default_extensions[i].name); + GLuint len = (GLuint)_mesa_strlen(default_extensions[i].name); _mesa_memcpy(s + extStrLen, default_extensions[i].name, len); extStrLen += len; s[extStrLen] = (GLubyte) ' '; -- cgit v1.2.3