aboutsummaryrefslogtreecommitdiff
path: root/source/sar.h
diff options
context:
space:
mode:
authortwinaphex2017-08-11 17:43:00 +0200
committertwinaphex2017-08-11 17:43:00 +0200
commitb9c74ceb1352c8f433cf6bf2c446ae07457c5267 (patch)
treeafd398fed3d08c81957373be55a12284cb932ab6 /source/sar.h
parent1aecedc999445e9a27e04f665fd562b576775d08 (diff)
downloadsnesemu-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.tar.gz
snesemu-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.tar.bz2
snesemu-b9c74ceb1352c8f433cf6bf2c446ae07457c5267.zip
Start making this suitable for MSVC and C89
Diffstat (limited to 'source/sar.h')
-rw-r--r--source/sar.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/sar.h b/source/sar.h
index 635477a..487cdaa 100644
--- a/source/sar.h
+++ b/source/sar.h
@@ -4,6 +4,7 @@
#define _SAR_H_
#include <stdint.h>
+#include <retro_inline.h>
#include "port.h"
@@ -14,7 +15,7 @@
#define SAR64(b, n) ((b) >> (n))
#else
-static inline int8_t SAR8(const int8_t b, const int32_t n)
+static INLINE int8_t SAR8(const int8_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT8_IS_SAR
if (b < 0)
@@ -23,7 +24,7 @@ static inline int8_t SAR8(const int8_t b, const int32_t n)
return b >> n;
}
-static inline int16_t SAR16(const int16_t b, const int32_t n)
+static INLINE int16_t SAR16(const int16_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT16_IS_SAR
if (b < 0)
@@ -32,7 +33,7 @@ static inline int16_t SAR16(const int16_t b, const int32_t n)
return b >> n;
}
-static inline int32_t SAR32(const int32_t b, const int32_t n)
+static INLINE int32_t SAR32(const int32_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT32_IS_SAR
if (b < 0)
@@ -41,7 +42,7 @@ static inline int32_t SAR32(const int32_t b, const int32_t n)
return b >> n;
}
-static inline int64_t SAR64(const int64_t b, const int32_t n)
+static INLINE int64_t SAR64(const int64_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT64_IS_SAR
if (b < 0)