diff options
author | Karl Schultz <[email protected]> | 2005-05-05 21:08:07 +0000 |
---|---|---|
committer | Karl Schultz <[email protected]> | 2005-05-05 21:08:07 +0000 |
commit | 6258b76c49f49a56a7c713914b798e80c6553b06 (patch) | |
tree | 2cc86a17fdda506fc9c86daba7ff3900d2d64996 /src/mesa/shader/grammar_mesa.c | |
parent | 203dcb733d36cc91107554b0d323ed8ccef6e105 (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/shader/grammar_mesa.c')
-rw-r--r-- | src/mesa/shader/grammar_mesa.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/shader/grammar_mesa.c b/src/mesa/shader/grammar_mesa.c index 0aadac58bc5..eb962505bfe 100644 --- a/src/mesa/shader/grammar_mesa.c +++ b/src/mesa/shader/grammar_mesa.c @@ -40,17 +40,17 @@ void grammar_alloc_free (void *ptr) _mesa_free (ptr); } -void *grammar_alloc_malloc (unsigned int size) +void *grammar_alloc_malloc (size_t size) { return _mesa_malloc (size); } -void *grammar_alloc_realloc (void *ptr, unsigned int old_size, unsigned int size) +void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size) { return _mesa_realloc (ptr, old_size, size); } -void *grammar_memory_copy (void *dst, const void * src, unsigned int size) +void *grammar_memory_copy (void *dst, const void * src, size_t size) { return _mesa_memcpy (dst, src, size); } @@ -60,7 +60,7 @@ int grammar_string_compare (const byte *str1, const byte *str2) return _mesa_strcmp ((const char *) str1, (const char *) str2); } -int grammar_string_compare_n (const byte *str1, const byte *str2, unsigned int n) +int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n) { return _mesa_strncmp ((const char *) str1, (const char *) str2, n); } @@ -70,7 +70,7 @@ byte *grammar_string_copy (byte *dst, const byte *src) return (byte *) _mesa_strcpy ((char *) dst, (const char *) src); } -byte *grammar_string_copy_n (byte *dst, const byte *src, unsigned int n) +byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n) { return (byte *) _mesa_strncpy ((char *) dst, (const char *) src, n); } @@ -82,6 +82,6 @@ byte *grammar_string_duplicate (const byte *src) unsigned int grammar_string_length (const byte *str) { - return _mesa_strlen ((const char *) str); + return (unsigned int)_mesa_strlen ((const char *) str); } |