diff --git a/src/Core.h b/src/Core.h index 7db53dbf4..9d5a773d5 100644 --- a/src/Core.h +++ b/src/Core.h @@ -59,8 +59,17 @@ typedef unsigned __INTPTR_TYPE__ cc_uintptr; #endif #endif #elif __MWERKS__ +typedef signed char cc_int8; +typedef signed short cc_int16; +typedef signed int cc_int32; +typedef signed long long cc_int64; + +typedef unsigned char cc_uint8; +typedef unsigned short cc_uint16; +typedef unsigned int cc_uint32; +typedef unsigned long long cc_uint64; +typedef unsigned int cc_uintptr; /* TODO: Is there actual attribute support for these somewhere? */ -#include #define CC_INLINE inline #define CC_NOINLINE #define CC_API diff --git a/src/Logger.c b/src/Logger.c index 372a46414..b9a7e8c27 100644 --- a/src/Logger.c +++ b/src/Logger.c @@ -333,7 +333,7 @@ static void Logger_DumpFrame(String* trace, void* addr) { /* android's bionic libc doesn't provide backtrace (execinfo.h) */ #include -static _Unwind_Reason_Code Logger_DumpFrame(struct _Unwind_Context* ctx, void* arg) { +static _Unwind_Reason_Code Logger_UnwindFrame(struct _Unwind_Context* ctx, void* arg) { cc_uintptr addr = _Unwind_GetIP(ctx); if (!addr) return _URC_END_OF_STACK; @@ -342,7 +342,7 @@ static _Unwind_Reason_Code Logger_DumpFrame(struct _Unwind_Context* ctx, void* a } void Logger_Backtrace(String* trace, void* ctx) { - _Unwind_Backtrace(Logger_DumpFrame, trace); + _Unwind_Backtrace(Logger_UnwindFrame, trace); String_AppendConst(trace, _NL); } #elif defined CC_BUILD_OSX diff --git a/src/Menus.c b/src/Menus.c index 06f5b27f1..8272dd2a8 100644 --- a/src/Menus.c +++ b/src/Menus.c @@ -1942,7 +1942,7 @@ static void MenuOptionsScreen_Enum(void* screen, void* widget) { struct ButtonWidget* btn = (struct ButtonWidget*)widget; int index; struct MenuInputDesc* desc; - const char** names; + const char* const* names; int raw, count; index = Menu_Index(s, btn); diff --git a/src/Options.c b/src/Options.c index f5f582707..3d551bbad 100644 --- a/src/Options.c +++ b/src/Options.c @@ -87,7 +87,7 @@ float Options_GetFloat(const char* key, float min, float max, float defValue) { return value; } -int Options_GetEnum(const char* key, int defValue, const char** names, int namesCount) { +int Options_GetEnum(const char* key, int defValue, const char* const* names, int namesCount) { String str; if (!Options_UNSAFE_Get(key, &str)) return defValue; return Utils_ParseEnum(&str, defValue, names, namesCount); diff --git a/src/Options.h b/src/Options.h index 7e9a1cd13..d7a6bd8ab 100644 --- a/src/Options.h +++ b/src/Options.h @@ -84,7 +84,7 @@ CC_API bool Options_GetBool(const char* key, bool defValue); CC_API float Options_GetFloat(const char* key, float min, float max, float defValue); /* Returns value of given option as an integer, or defalt value if could not be converted. */ /* NOTE: Conversion is done by going through all elements of names, returning index of a match. */ -CC_API int Options_GetEnum(const char* key, int defValue, const char** names, int namesCount); +CC_API int Options_GetEnum(const char* key, int defValue, const char* const* names, int namesCount); /* Sets value of given option to either "true" or "false". */ CC_API void Options_SetBool(const char* keyRaw, bool value);