diff --git a/Src/Debugger/Debugger.h b/Src/Debugger/Debugger.h index 39045ac..b869057 100644 --- a/Src/Debugger/Debugger.h +++ b/Src/Debugger/Debugger.h @@ -60,7 +60,7 @@ #ifndef stricmp #ifdef _MSC_VER // MS VisualC++ #define stricmp _stricmp -#else // Assume GC +#elif defined(__GNUC__) #define stricmp strcasecmp #endif // _MSC_VER #endif // stricmp diff --git a/Src/Supermodel.h b/Src/Supermodel.h index 4355e52..8d6bb87 100644 --- a/Src/Supermodel.h +++ b/Src/Supermodel.h @@ -54,14 +54,14 @@ // stricmp() is non-standard, apparently... #ifdef _MSC_VER // MS VisualC++ #define stricmp _stricmp -#else // assume GCC +#elif defined(__GNUC__) #define stricmp strcasecmp #endif // 32-bit rotate left #ifdef _MSC_VER // MS VisualC++ - use VS intrinsic function _rotl #define rotl(val, shift) val = _rotl(val, shift) -#else // Otherwise assume GCC which should optimise following to asm +#elif defined(__GNUC__) // GCC should optimise following to asm #define rotl(val, shift) val = (val>>shift)|(val<<(32-shift)) #endif diff --git a/Src/Util/ByteSwap.cpp b/Src/Util/ByteSwap.cpp index 66b7ef2..1804755 100644 --- a/Src/Util/ByteSwap.cpp +++ b/Src/Util/ByteSwap.cpp @@ -11,7 +11,7 @@ namespace Util uint16_t * const buffer16 = (uint16_t*)buffer; for (size_t i = 0; i < size/2; i++) buffer16[i] = _byteswap_ushort(buffer16[i]); -#elif 1 // assume GCC +#elif defined(__GNUC__) uint16_t * const buffer16 = (uint16_t*)buffer; for (size_t i = 0; i < size/2; i++) buffer16[i] = __builtin_bswap16(buffer16[i]); @@ -31,7 +31,7 @@ namespace Util uint32_t * const buffer32 = (uint32_t*)buffer; for (size_t i = 0; i < size/4; i++) buffer32[i] = _byteswap_ulong(buffer32[i]); -#elif 1 // assume GCC +#elif defined(__GNUC__) uint32_t * const buffer32 = (uint32_t*)buffer; for (size_t i = 0; i < size/4; i++) buffer32[i] = __builtin_bswap32(buffer32[i]);