diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-01 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-01 08:01:00 -0800 |
commit | 320c429bc46728c1faddfc561c166810aa134a04 (patch) | |
tree | c773cc96431cd38ae35484dae7d7d17a79671ac2 /src/misc/st | |
parent | f65983c2c0810cfb933f696952325a81d2378987 (diff) | |
download | abc-320c429bc46728c1faddfc561c166810aa134a04.tar.gz abc-320c429bc46728c1faddfc561c166810aa134a04.tar.bz2 abc-320c429bc46728c1faddfc561c166810aa134a04.zip |
Version abc80301
Diffstat (limited to 'src/misc/st')
-rw-r--r-- | src/misc/st/st.c | 5 | ||||
-rw-r--r-- | src/misc/st/stmm.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/misc/st/st.c b/src/misc/st/st.c index 872fe51b..2798ae99 100644 --- a/src/misc/st/st.c +++ b/src/misc/st/st.c @@ -10,6 +10,7 @@ #include <stdio.h> #include <stdlib.h> #include "st.h" +#include "port_type.h" #ifndef ABS # define ABS(a) ((a) < 0 ? -(a) : (a)) @@ -31,8 +32,8 @@ #define ST_NUMCMP(x,y) ((x) != (y)) #define ST_NUMHASH(x,size) (ABS((long)x)%(size)) -//#define ST_PTRHASH(x,size) ((int)((unsigned long)(x)>>2)%size) // 64-bit bug fix 9/17/2007 -#define ST_PTRHASH(x,size) ((int)(((unsigned long)(x)>>2)%size)) +//#define ST_PTRHASH(x,size) ((int)((PORT_PTRUINT_T)(x)>>2)%size) // 64-bit bug fix 9/17/2007 +#define ST_PTRHASH(x,size) ((int)(((PORT_PTRUINT_T)(x)>>2)%size)) #define EQUAL(func, x, y) \ ((((func) == st_numcmp) || ((func) == st_ptrcmp)) ?\ (ST_NUMCMP((x),(y)) == 0) : ((*func)((x), (y)) == 0)) diff --git a/src/misc/st/stmm.c b/src/misc/st/stmm.c index 8dfacfe4..7a52c1cd 100644 --- a/src/misc/st/stmm.c +++ b/src/misc/st/stmm.c @@ -10,6 +10,7 @@ #include <stdio.h> #include "extra.h" #include "stmm.h" +#include "port_type.h" #ifndef ABS # define ABS(a) ((a) < 0 ? -(a) : (a)) @@ -17,8 +18,8 @@ #define STMM_NUMCMP(x,y) ((x) != (y)) #define STMM_NUMHASH(x,size) (ABS((long)x)%(size)) -//#define STMM_PTRHASH(x,size) ((int)((unsigned long)(x)>>2)%size) // 64-bit bug fix 9/17/2007 -#define STMM_PTRHASH(x,size) ((int)(((unsigned long)(x)>>2)%size)) +//#define STMM_PTRHASH(x,size) ((int)((PORT_PTRUINT_T)(x)>>2)%size) // 64-bit bug fix 9/17/2007 +#define STMM_PTRHASH(x,size) ((int)(((PORT_PTRUINT_T)(x)>>2)%size)) #define EQUAL(func, x, y) \ ((((func) == stmm_numcmp) || ((func) == stmm_ptrcmp)) ?\ (STMM_NUMCMP((x),(y)) == 0) : ((*func)((x), (y)) == 0)) |