From 03c2dab55aeba17d69189a7e2e02d66cc9dd587e Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Fri, 5 Aug 2011 12:11:27 +0000 Subject: Fix compilation on non-x86 platforms, by Simon McVittie --- src/qcommon/q_platform.h | 2 ++ src/qcommon/q_shared.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/qcommon/q_platform.h b/src/qcommon/q_platform.h index efadb79b..ea74278b 100644 --- a/src/qcommon/q_platform.h +++ b/src/qcommon/q_platform.h @@ -349,6 +349,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA //endianness +void CopyShortSwap (void *dest, void *src); +void CopyLongSwap (void *dest, void *src); short ShortSwap (short l); int LongSwap (int l); float FloatSwap (const float *f); diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 51e3b220..46a6e4b1 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -443,7 +443,9 @@ int Q_isnan(float x); extern int (QDECL *Q_VMftol)(void); extern void (QDECL *Q_SnapVector)(vec3_t vec); #else - #define Q_ftol(f) lrintf((f)) + // Q_ftol must expand to a function name so the pluggable renderer can take + // its address + #define Q_ftol lrintf #define Q_SnapVector(vec)\ do\ {\ -- cgit