summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/extensions.c
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2005-05-05 21:08:07 +0000
committerKarl Schultz <[email protected]>2005-05-05 21:08:07 +0000
commit6258b76c49f49a56a7c713914b798e80c6553b06 (patch)
tree2cc86a17fdda506fc9c86daba7ff3900d2d64996 /src/mesa/main/extensions.c
parent203dcb733d36cc91107554b0d323ed8ccef6e105 (diff)
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.
Diffstat (limited to 'src/mesa/main/extensions.c')
-rw-r--r--src/mesa/main/extensions.c6
1 files changed, 3 insertions, 3 deletions
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) ' ';