mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-25 05:21:03 +00:00
prepare for ppc support
This commit is contained in:
parent
a8bff00f78
commit
eccd796b50
3 changed files with 28 additions and 14 deletions
|
@ -154,7 +154,7 @@ static ID_INLINE short BigShort( short l) { return ShortSwap(l); }
|
||||||
#define LittleShort
|
#define LittleShort
|
||||||
static ID_INLINE int BigLong(int l) { LongSwap(l); }
|
static ID_INLINE int BigLong(int l) { LongSwap(l); }
|
||||||
#define LittleLong
|
#define LittleLong
|
||||||
static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); }
|
static ID_INLINE float BigFloat(const float l) { FloatSwap(&l); }
|
||||||
#define LittleFloat
|
#define LittleFloat
|
||||||
|
|
||||||
#define PATH_SEP '\\'
|
#define PATH_SEP '\\'
|
||||||
|
@ -256,6 +256,10 @@ static inline float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||||
#define CPUSTRING "linux-alpha"
|
#define CPUSTRING "linux-alpha"
|
||||||
#elif defined __x86_64__
|
#elif defined __x86_64__
|
||||||
#define CPUSTRING "linux-x86_64"
|
#define CPUSTRING "linux-x86_64"
|
||||||
|
#elif defined __powerpc64__
|
||||||
|
#define CPUSTRING "linux-ppc64"
|
||||||
|
#elif defined __powerpc__
|
||||||
|
#define CPUSTRING "linux-ppc"
|
||||||
#else
|
#else
|
||||||
#define CPUSTRING "linux-other"
|
#define CPUSTRING "linux-other"
|
||||||
#endif
|
#endif
|
||||||
|
@ -270,12 +274,12 @@ static inline float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||||
#define BOTLIB_HARD_LINKED
|
#define BOTLIB_HARD_LINKED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !idppc
|
#if __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
|
||||||
inline static short BigShort( short l) { return ShortSwap(l); }
|
inline static short BigShort( short l) { return ShortSwap(l); }
|
||||||
#define LittleShort
|
#define LittleShort
|
||||||
inline static int BigLong(int l) { return LongSwap(l); }
|
inline static int BigLong(int l) { return LongSwap(l); }
|
||||||
#define LittleLong
|
#define LittleLong
|
||||||
inline static float BigFloat(const float *l) { return FloatSwap(l); }
|
inline static float BigFloat(const float l) { return FloatSwap(&l); }
|
||||||
#define LittleFloat
|
#define LittleFloat
|
||||||
#else
|
#else
|
||||||
#define BigShort
|
#define BigShort
|
||||||
|
@ -283,7 +287,7 @@ inline static short LittleShort(short l) { return ShortSwap(l); }
|
||||||
#define BigLong
|
#define BigLong
|
||||||
inline static int LittleLong (int l) { return LongSwap(l); }
|
inline static int LittleLong (int l) { return LongSwap(l); }
|
||||||
#define BigFloat
|
#define BigFloat
|
||||||
inline static float LittleFloat (const float *l) { return FloatSwap(l); }
|
inline static float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -313,7 +317,7 @@ static short BigShort( short l) { return ShortSwap(l); }
|
||||||
#define LittleShort
|
#define LittleShort
|
||||||
static int BigLong(int l) { LongSwap(l); }
|
static int BigLong(int l) { LongSwap(l); }
|
||||||
#define LittleLong
|
#define LittleLong
|
||||||
static float BigFloat(const float *l) { FloatSwap(l); }
|
static float BigFloat(const float l) { FloatSwap(&l); }
|
||||||
#define LittleFloat
|
#define LittleFloat
|
||||||
#else
|
#else
|
||||||
#define BigShort
|
#define BigShort
|
||||||
|
@ -321,7 +325,7 @@ static short LittleShort(short l) { return ShortSwap(l); }
|
||||||
#define BigLong
|
#define BigLong
|
||||||
static int LittleLong (int l) { return LongSwap(l); }
|
static int LittleLong (int l) { return LongSwap(l); }
|
||||||
#define BigFloat
|
#define BigFloat
|
||||||
static float LittleFloat (const float *l) { return FloatSwap(l); }
|
static float LittleFloat (const float l) { return FloatSwap(&l); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -202,6 +202,10 @@ void Sys_PumpEvents( void );
|
||||||
#define CPUSTRING "linux-alpha"
|
#define CPUSTRING "linux-alpha"
|
||||||
#elif defined __x86_64__
|
#elif defined __x86_64__
|
||||||
#define CPUSTRING "linux-x86_64"
|
#define CPUSTRING "linux-x86_64"
|
||||||
|
#elif defined __powerpc64__
|
||||||
|
#define CPUSTRING "linux-ppc64"
|
||||||
|
#elif defined __powerpc__
|
||||||
|
#define CPUSTRING "linux-ppc"
|
||||||
#else
|
#else
|
||||||
#define CPUSTRING "linux-other"
|
#define CPUSTRING "linux-other"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -351,10 +351,18 @@ void Sys_Init(void)
|
||||||
Cvar_Set( "arch", "linux i386" );
|
Cvar_Set( "arch", "linux i386" );
|
||||||
# elif defined __x86_64__
|
# elif defined __x86_64__
|
||||||
Cvar_Set( "arch", "linux x86_64" );
|
Cvar_Set( "arch", "linux x86_64" );
|
||||||
|
# elif defined __powerpc64__
|
||||||
|
Cvar_Set( "arch", "linux ppc64" );
|
||||||
|
# elif defined __powerpc__
|
||||||
|
Cvar_Set( "arch", "linux ppc" );
|
||||||
# elif defined __alpha__
|
# elif defined __alpha__
|
||||||
Cvar_Set( "arch", "linux alpha" );
|
Cvar_Set( "arch", "linux alpha" );
|
||||||
# elif defined __sparc__
|
# elif defined __sparc__
|
||||||
Cvar_Set( "arch", "linux sparc" );
|
Cvar_Set( "arch", "linux sparc" );
|
||||||
|
# else
|
||||||
|
# error unsupported architecture
|
||||||
|
#endif
|
||||||
|
|
||||||
#elif defined __FreeBSD__
|
#elif defined __FreeBSD__
|
||||||
|
|
||||||
#if defined __i386__ // FreeBSD
|
#if defined __i386__ // FreeBSD
|
||||||
|
@ -363,10 +371,6 @@ void Sys_Init(void)
|
||||||
Cvar_Set( "arch", "freebsd alpha" );
|
Cvar_Set( "arch", "freebsd alpha" );
|
||||||
#else
|
#else
|
||||||
Cvar_Set( "arch", "freebsd unknown" );
|
Cvar_Set( "arch", "freebsd unknown" );
|
||||||
#endif // FreeBSD
|
|
||||||
|
|
||||||
#else
|
|
||||||
Cvar_Set( "arch", "linux unknown" );
|
|
||||||
#endif
|
#endif
|
||||||
#elif defined __sun__
|
#elif defined __sun__
|
||||||
#if defined __i386__
|
#if defined __i386__
|
||||||
|
@ -728,6 +732,8 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
|
||||||
snprintf (fname, sizeof(fname), "%si386.so", name);
|
snprintf (fname, sizeof(fname), "%si386.so", name);
|
||||||
#elif defined __x86_64__
|
#elif defined __x86_64__
|
||||||
snprintf (fname, sizeof(fname), "%sx86_64.so", name);
|
snprintf (fname, sizeof(fname), "%sx86_64.so", name);
|
||||||
|
#elif defined __powerpc64__
|
||||||
|
snprintf (fname, sizeof(fname), "%sppc.so", name);
|
||||||
#elif defined __powerpc__ //rcg010207 - PPC support.
|
#elif defined __powerpc__ //rcg010207 - PPC support.
|
||||||
snprintf (fname, sizeof(fname), "%sppc.so", name);
|
snprintf (fname, sizeof(fname), "%sppc.so", name);
|
||||||
#elif defined __axp__
|
#elif defined __axp__
|
||||||
|
|
Loading…
Reference in a new issue