diff options
author | twinaphex | 2017-02-18 16:32:39 +0100 |
---|---|---|
committer | twinaphex | 2017-02-18 16:32:39 +0100 |
commit | 58595588801931e3f2293395730f2e3948cba46e (patch) | |
tree | fead1ea79fbdde423cfdf605eac8acb16552c54a | |
parent | 0c28605a9d37f815d31ce55634994f34806858f6 (diff) | |
download | snes9x2002-58595588801931e3f2293395730f2e3948cba46e.tar.gz snes9x2002-58595588801931e3f2293395730f2e3948cba46e.tar.bz2 snes9x2002-58595588801931e3f2293395730f2e3948cba46e.zip |
Update sar.h
-rw-r--r-- | src/sar.h | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -76,9 +76,7 @@ #ifndef _SAR_H_ #define _SAR_H_ -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif +#include <stdint.h> #include "port.h" @@ -89,7 +87,7 @@ #define SAR64(b, n) ((b)>>(n)) #else -static inline int8 SAR8(const int8 b, const int n) +static inline int8_t SAR8(const int8_t b, const int32_t n) { #ifndef RIGHTSHIFT_INT8_IS_SAR if (b < 0) return (b >> n) | (-1 << (8 - n)); @@ -97,7 +95,7 @@ static inline int8 SAR8(const int8 b, const int n) return b >> n; } -static inline int16 SAR16(const int16 b, const int n) +static inline int16_t SAR16(const int16_t b, const int32_t n) { #ifndef RIGHTSHIFT_INT16_IS_SAR if (b < 0) return (b >> n) | (-1 << (16 - n)); @@ -105,7 +103,7 @@ static inline int16 SAR16(const int16 b, const int n) return b >> n; } -static inline int32 SAR32(const int32 b, const int n) +static inline int32_t SAR32(const int32_t b, const int32_t n) { #ifndef RIGHTSHIFT_INT32_IS_SAR if (b < 0) return (b >> n) | (-1 << (32 - n)); @@ -113,7 +111,7 @@ static inline int32 SAR32(const int32 b, const int n) return b >> n; } -static inline int64 SAR64(const int64 b, const int n) +static inline int64_t SAR64(const int64_t b, const int32_t n) { #ifndef RIGHTSHIFT_INT64_IS_SAR if (b < 0) return (b >> n) | (-1 << (64 - n)); |