diff options
author | Robert Clausecker <fuz@FreeBSD.org> | 2023-04-15 14:50:27 +0200 |
---|---|---|
committer | Robert Clausecker <fuz@FreeBSD.org> | 2023-04-17 11:27:24 +0200 |
commit | 1092ffe19022aa17a164efc50b8b392d2a4e3f2e (patch) | |
tree | 6810788a3cd9a23845f58a41adc6837419b4a61c /games/uhexen/files/patch-include__h2def.h | |
parent | devel/goreleaser: update to 1.17.1 (diff) |
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
Diffstat (limited to 'games/uhexen/files/patch-include__h2def.h')
-rw-r--r-- | games/uhexen/files/patch-include__h2def.h | 17 |
1 files changed, 15 insertions, 2 deletions
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) |