diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-08-05 12:11:27 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 23:26:56 +0000 |
commit | 03c2dab55aeba17d69189a7e2e02d66cc9dd587e (patch) | |
tree | e122250c0d66b1e8219f95bd74a99770ec580838 /src/qcommon | |
parent | 97170a8ffba23c55ec7e83f203d5a2365a2351d8 (diff) |
Fix compilation on non-x86 platforms, by Simon McVittie
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/q_platform.h | 2 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 4 |
2 files changed, 5 insertions, 1 deletions
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\ {\ |