diff options
author | José Fonseca <[email protected]> | 2008-06-24 14:18:07 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-06-24 14:18:07 +0900 |
commit | a148025d94505bca08f9baa1689048032bb60e2c (patch) | |
tree | d5fe20f005a3715327909acd3266cbaedd9c0537 /src/mesa/main/imports.c | |
parent | b6f053739f66c1c88db12df4690051c0a54ff0f7 (diff) |
mesa: Use standard integer types.
Especially get rid of the non-portable long long.
Diffstat (limited to 'src/mesa/main/imports.c')
-rw-r--r-- | src/mesa/main/imports.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index c46e5beb918..7231fa699cb 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -539,10 +539,10 @@ _mesa_pow(double x, double y) * Find the first bit set in a word. */ int -_mesa_ffs(int i) +_mesa_ffs(int32_t i) { #if (defined(_WIN32) && !defined(__MINGW32__) ) || defined(__IBMC__) || defined(__IBMCPP__) - register int bit = 1; + register int32_t bit = 1; if ((i & 0xffff) == 0) { bit += 16; i >>= 16; @@ -573,11 +573,7 @@ _mesa_ffs(int i) * if no bits set. */ int -#ifdef __MINGW32__ -_mesa_ffsll(long val) -#else -_mesa_ffsll(long long val) -#endif +_mesa_ffsll(int64_t val) { #ifdef ffsll return ffsll(val); @@ -586,11 +582,11 @@ _mesa_ffsll(long long val) assert(sizeof(val) == 8); - bit = _mesa_ffs(val); + bit = _mesa_ffs((int32_t)val); if (bit != 0) return bit; - bit = _mesa_ffs(val >> 32); + bit = _mesa_ffs((int32_t)(val >> 32)); if (bit != 0) return 32 + bit; |