From 1092ffe19022aa17a164efc50b8b392d2a4e3f2e Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Sat, 15 Apr 2023 14:50:27 +0200 Subject: games/uhexen: fix build with -fno-common, on big endian platforms - turns a duplicate definition into a declaration - replace nonexisting byte swap functions with gcc/clang intrinsics - define LICENSE --- games/uhexen/files/patch-include__h2def.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'games/uhexen/files/patch-include__h2def.h') diff --git a/games/uhexen/files/patch-include__h2def.h b/games/uhexen/files/patch-include__h2def.h index ed1cf5f5edde..87a61ca4f3ff 100644 --- a/games/uhexen/files/patch-include__h2def.h +++ b/games/uhexen/files/patch-include__h2def.h @@ -1,5 +1,5 @@ ---- include/h2def.h 2003/02/10 14:43:33 1.1 -+++ include/h2def.h 2003/02/10 14:46:37 +--- include/h2def.h.orig 2001-12-02 08:51:54 UTC ++++ include/h2def.h @@ -26,7 +26,11 @@ /* XXX ifdefs */ @@ -12,3 +12,16 @@ // Uncomment, to enable all timebomb stuff //#define TIMEBOMB +@@ -894,10 +898,8 @@ fixed_t FixedDiv2 (fixed_t a, fixed_t b); + #endif + + #ifdef __BIG_ENDIAN__ +-short ShortSwap(short); +-long LongSwap(long); +-#define SHORT(x) ShortSwap(x) +-#define LONG(x) LongSwap(x) ++#define SHORT(x) __builtin_bswap16(x) ++#define LONG(x) __builtin_bswap32(x) + #else + #define SHORT(x) (x) + #define LONG(x) (x) -- cgit v1.2.3