From a25582727501c115df554b889801107851282839 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 24 Nov 2021 17:02:02 +0300
Subject: [PATCH] SDL_endian.h: minor cleanup for watcom _inline keyword.
---
include/SDL/SDL_endian.h | 14 ++++++++------
src/SDL12_compat.c | 2 +-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/include/SDL/SDL_endian.h b/include/SDL/SDL_endian.h
index 2e50eb9..4718b98 100644
--- a/include/SDL/SDL_endian.h
+++ b/include/SDL/SDL_endian.h
@@ -34,8 +34,8 @@ real SDL-1.2 available to you. */
/* This is all lifted out of SDL2's zlib-licensed headers. */
-#define SDL_LIL_ENDIAN 1234
-#define SDL_BIG_ENDIAN 4321
+#define SDL_LIL_ENDIAN 1234
+#define SDL_BIG_ENDIAN 4321
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
#ifdef __linux__
@@ -60,6 +60,7 @@ real SDL-1.2 available to you. */
#endif /* __linux__ */
#endif /* !SDL_BYTEORDER */
+
#include "begin_code.h"
/* various modern compilers may have builtin swap */
@@ -129,7 +130,7 @@ SDL_Swap16(Uint16 x)
return x;
}
#elif defined(__WATCOMC__) && defined(__386__)
-extern _inline Uint16 SDL_Swap16(Uint16);
+extern __inline Uint16 SDL_Swap16(Uint16);
#pragma aux SDL_Swap16 = \
"xchg al, ah" \
parm [ax] \
@@ -187,7 +188,7 @@ SDL_Swap32(Uint32 x)
return x;
}
#elif defined(__WATCOMC__) && defined(__386__)
-extern _inline Uint32 SDL_Swap32(Uint32);
+extern __inline Uint32 SDL_Swap32(Uint32);
#pragma aux SDL_Swap32 = \
"bswap eax" \
parm [eax] \
@@ -230,7 +231,7 @@ SDL_Swap64(Uint64 x)
return x;
}
#elif defined(__WATCOMC__) && defined(__386__)
-extern _inline Uint64 SDL_Swap64(Uint64);
+extern __inline Uint64 SDL_Swap64(Uint64);
#pragma aux SDL_Swap64 = \
"bswap eax" \
"bswap edx" \
@@ -254,6 +255,7 @@ SDL_Swap64(Uint64 x)
}
#endif
+
/* remove extra macros */
#undef HAS_BROKEN_BSWAP
#undef HAS_BUILTIN_BSWAP16
@@ -285,4 +287,4 @@ SDL_Swap64(Uint64 x)
#include "close_code.h"
-#endif
+#endif /* _SDL_endian_h */
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 351b9a3..6dc9b7e 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -110,7 +110,7 @@ extern "C" {
/* From SDL2.0's SDL_bits.h: a force-inlined function. */
#if defined(__WATCOMC__) && defined(__386__)
-extern _inline int _SDL20_bsr_watcom (Uint32);
+extern __inline int _SDL20_bsr_watcom(Uint32);
#pragma aux _SDL20_bsr_watcom = \
"bsr eax, eax" \
parm [eax] nomemory \