From d6b806850f6ef4f61228c16babdd6d00f5bb9de9 Mon Sep 17 00:00:00 2001 From: KooShnoo Date: Sat, 31 May 2025 09:33:10 -0700 Subject: [PATCH] Only use the `__CWCC__` macro to test for cwcc --- include/macros.h | 2 +- lib/gamespy/gt2/gt2Utility.c | 2 +- lib/gamespy/qr2/qr2.c | 2 +- lib/gamespy/qr2/qr2regkeys.c | 2 +- lib/runtime/__ppc_eabi_init.c | 4 ++-- lib/runtime/__start.c | 8 ++++---- lib/runtime/eabi.c | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/macros.h b/include/macros.h index 7e255a6da..083688c58 100644 --- a/include/macros.h +++ b/include/macros.h @@ -25,7 +25,7 @@ #define DECLTYPE(x) __decltype__(x) // https://github.com/DarkRTA/rb3/blob/235050f88a263fec0387b7c618dda76a8bb24d2c/src/sdk/RVL_SDK/revolution/os/OSUtils.h#L13-L17 -#if defined(__MWERKS__) && !defined(__INTELLISENSE__) +#if defined(__CWCC__) && !defined(__INTELLISENSE__) #define AT_ADDRESS(addr) : (addr) #else #define AT_ADDRESS(addr) diff --git a/lib/gamespy/gt2/gt2Utility.c b/lib/gamespy/gt2/gt2Utility.c index 12bfe3741..0b518dfc5 100644 --- a/lib/gamespy/gt2/gt2Utility.c +++ b/lib/gamespy/gt2/gt2Utility.c @@ -230,7 +230,7 @@ unsigned int** gt2StringToIPs(const char* string) { ** INTERNAL FUNCTIONS ** ***********************/ -#ifdef __MWERKS__ // CodeWarrior will warn if not prototyped +#ifdef __CWCC__ // CodeWarrior will warn if not prototyped void gti2MessageCheck(const GT2Byte** message, int* len); #endif diff --git a/lib/gamespy/qr2/qr2.c b/lib/gamespy/qr2/qr2.c index 30c9d9880..ddc791709 100644 --- a/lib/gamespy/qr2/qr2.c +++ b/lib/gamespy/qr2/qr2.c @@ -11,7 +11,7 @@ INCLUDES extern "C" { #endif -#ifdef __MWERKS__ // Codewarrior requires function prototypes +#ifdef __CWCC__ // Codewarrior requires function prototypes qr2_error_t qr2_initW(/*[out]*/ qr2_t* qrec, const unsigned short* ip, int baseport, const unsigned short* gamename, const unsigned short* secret_key, int ispublic, diff --git a/lib/gamespy/qr2/qr2regkeys.c b/lib/gamespy/qr2/qr2regkeys.c index 2fb9b9861..7d09990b9 100644 --- a/lib/gamespy/qr2/qr2regkeys.c +++ b/lib/gamespy/qr2/qr2regkeys.c @@ -4,7 +4,7 @@ #include "../common/gsDebug.h" #include "../common/gsStringUtil.h" -#ifdef __MWERKS__ // CodeWarrior requires prototypes +#ifdef __CWCC__ // CodeWarrior requires prototypes void qr2_register_keyW(int keyid, const unsigned short* key); void qr2_register_keyA(int keyid, const char* key); #endif diff --git a/lib/runtime/__ppc_eabi_init.c b/lib/runtime/__ppc_eabi_init.c index 3e7cfd6af..0a2040416 100644 --- a/lib/runtime/__ppc_eabi_init.c +++ b/lib/runtime/__ppc_eabi_init.c @@ -13,7 +13,7 @@ extern void __OSCacheInit(void); __declspec(section ".init") asm void __init_hardware() { // clang-format off - #ifdef __MWERKS__ + #ifdef __CWCC__ nofralloc; mfmsr r0; ori r0, r0, 0x2000; @@ -30,7 +30,7 @@ __declspec(section ".init") asm void __init_hardware() { __declspec(section ".init") asm void __flush_cache() { // clang-format off - #ifdef __MWERKS__ + #ifdef __CWCC__ nofralloc; lis r5, 0xffff; ori r5, r5, 0xfff1; diff --git a/lib/runtime/__start.c b/lib/runtime/__start.c index 497643232..14a402b0c 100644 --- a/lib/runtime/__start.c +++ b/lib/runtime/__start.c @@ -21,7 +21,7 @@ static u32 __OSPADButton AT_ADDRESS(0x800030e4); // PAL: 0x80006068..0x80006090 __declspec(section ".init") asm void __check_pad3() { // clang-format off - #ifdef __MWERKS__ + #ifdef __CWCC__ nofralloc; lis r3, __OSPADButton@ha; lhz r0, __OSPADButton@l(r3); @@ -49,7 +49,7 @@ __declspec(section ".init") u8 __get_debug_bba() { return __debug_bba; } // PAL: 0x800060a4..0x80006210 __declspec(section ".init") asm void __start() { // clang-format off - #ifdef __MWERKS__ + #ifdef __CWCC__ nofralloc; bl __init_registers; bl __init_hardware; @@ -157,7 +157,7 @@ __declspec(section ".init") asm void __start() { } __declspec(section ".init") asm void __init_registers(void) { - #ifdef __MWERKS__ + #ifdef __CWCC__ li r0, 0x0; li r3, 0x0; li r4, 0x0; @@ -201,7 +201,7 @@ __declspec(section ".init") asm void __init_registers(void) { // PAL: 0x800062a0..0x80006348 __declspec(section ".init") asm void __init_data() { // clang-format off - #ifdef __MWERKS__ + #ifdef __CWCC__ nofralloc; stwu r1, -0x20(r1); mflr r0; diff --git a/lib/runtime/eabi.c b/lib/runtime/eabi.c index f8d8ac6e9..aec56c9b7 100644 --- a/lib/runtime/eabi.c +++ b/lib/runtime/eabi.c @@ -1,4 +1,4 @@ -#ifndef __INTELLISENSE__ +#ifdef __CWCC__ // PAL: 0x8002156C extern void _savegpr_14(void);