From 38b0faf0da7c39afd5f9a55858ec1d017167d8dc Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 30 Aug 2017 13:37:53 +0200 Subject: [PATCH] preproc: more unknown architecture error --- libs/l_net/l_net.c | 5 +++-- libs/splines/q_shared.h | 17 +++++++---------- radiant/main.cpp | 2 ++ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libs/l_net/l_net.c b/libs/l_net/l_net.c index e7d756ec..c34e9cbf 100644 --- a/libs/l_net/l_net.c +++ b/libs/l_net/l_net.c @@ -80,9 +80,10 @@ void Net_SetAddressPort( address_t *address, int port ){ int Net_AddressCompare( address_t *addr1, address_t *addr2 ){ #ifdef _WIN32 return stricmp( addr1->ip, addr2->ip ); -#endif -#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ ) +#elif defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ ) return strcasecmp( addr1->ip, addr2->ip ); +#else + #error unknown architecture #endif } //end of the function Net_AddressCompare //=========================================================================== diff --git a/libs/splines/q_shared.h b/libs/splines/q_shared.h index 8a429cfe..6923064f 100644 --- a/libs/splines/q_shared.h +++ b/libs/splines/q_shared.h @@ -152,11 +152,9 @@ void osxFreeMemory( void *pointer ); } #endif -#endif - //======================= MAC DEFINES ================================= -#ifdef __MACOS__ +#elif defined( __MACOS__ ) // the mac compiler can't handle >32k of locals, so we // just waste space and make big arrays static... @@ -184,11 +182,10 @@ void Sys_PumpEvents( void ); #define QDECL __cdecl #define _alloca alloca -#endif //======================= LINUX DEFINES ================================= -#ifdef __linux__ +#elif defined( __linux__ ) #define MAC_STATIC @@ -202,11 +199,9 @@ void Sys_PumpEvents( void ); #define PATH_SEP '/' -#endif - //======================= FreeBSD DEFINES ================================= -#ifdef __FreeBSD__ +#elif defined( __FreeBSD__ ) #define MAC_STATIC @@ -218,10 +213,12 @@ void Sys_PumpEvents( void ); #define PATH_SEP '/' -#endif - //============================================================= +#else + #error unknown architecture +#endif + typedef enum {qfalse, qtrue} qboolean; typedef unsigned char byte; diff --git a/radiant/main.cpp b/radiant/main.cpp index 0d93e3dd..33e1e4c5 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -477,6 +477,8 @@ int mainRadiant( int argc, char* argv[] ) { libgl = "libGL.so.1"; #elif defined ( __APPLE__ ) libgl = "/opt/local/lib/libGL.dylib"; + #else + #error unknown architecture #endif }