diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-11-01 16:05:06 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-11-01 16:05:06 +0000 |
commit | 24b3361cea084b9038c0f67bf423cd429877fd85 (patch) | |
tree | 1af4ef7b8465dd6bff137a5bbe2dd82328b3f17d /code/qcommon | |
parent | 394cead89ea339273451bb5d5f2369a9a4dbc908 (diff) | |
download | ioquake3-aero-24b3361cea084b9038c0f67bf423cd429877fd85.tar.gz ioquake3-aero-24b3361cea084b9038c0f67bf423cd429877fd85.zip |
* More Solaris work
git-svn-id: svn://svn.icculus.org/quake3/trunk@205 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r-- | code/qcommon/q_shared.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 39b4973..ab7eb32 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -346,6 +346,7 @@ static float LittleFloat (const float l) { return FloatSwap(&l); } #ifdef __sun #include <sys/isa_defs.h> +#include <sys/byteorder.h> // bk001205 - from Makefile #define stricmp strcasecmp @@ -360,20 +361,24 @@ static float LittleFloat (const float l) { return FloatSwap(&l); } #define PATH_SEP '/' -#if defined(_LITTLE_ENDIAN) -inline static short BigShort( short l) { return ShortSwap(l); } -#define LittleShort -inline static int BigLong(int l) { return LongSwap(l); } -#define LittleLong -inline static float BigFloat(const float l) { return FloatSwap(&l); } -#define LittleFloat -#else /* Must be _BIG_ENDIAN */ +#if defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) #define BigShort inline static short LittleShort(short l) { return ShortSwap(l); } #define BigLong inline static int LittleLong (int l) { return LongSwap(l); } #define BigFloat inline static float LittleFloat (const float l) { return FloatSwap(&l); } + +#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) +inline static short BigShort( short l) { return ShortSwap(l); } +#define LittleShort +inline static int BigLong(int l) { return LongSwap(l); } +#define LittleLong +inline static float BigFloat(const float l) { return FloatSwap(&l); } +#define LittleFloat + +#else +#error "Either _BIG_ENDIAN or _LITTLE_ENDIAN must be #defined, but not both." #endif #endif |