1.1 --- a/core/sourcehook/sh_memory.h Tue Dec 23 00:08:01 2008 -0500
1.2 +++ b/core/sourcehook/sh_memory.h Mon Feb 16 15:52:46 2009 -0500
1.3 @@ -26,6 +26,7 @@
1.4 # include <stdio.h>
1.5 # include <signal.h>
1.6 # include <setjmp.h>
1.7 +# include <stdint.h>
1.8 // http://www.die.net/doc/linux/man/man2/mprotect.2.html
1.9 # include <limits.h>
1.10 # ifndef PAGESIZE
1.11 @@ -37,8 +38,8 @@
1.12
1.13 // We need to align addr down to pagesize on linux
1.14 // We assume PAGESIZE is a power of two
1.15 -# define SH_LALIGN(x) (void*)((intptr_t)(x) & ~(PAGESIZE-1))
1.16 -# define SH_LALDIF(x) ((intptr_t)(x) % PAGESIZE)
1.17 +# define SH_LALIGN(x) (void*)((uintptr_t)(x) & ~(PAGESIZE-1))
1.18 +# define SH_LALDIF(x) ((uintptr_t)(x) % PAGESIZE)
1.19 # else
1.20 # error Unsupported OS/Compiler
1.21 # endif