diff --git a/Xcode/CloverX64/CloverX64.xcodeproj/project.pbxproj b/Xcode/CloverX64/CloverX64.xcodeproj/project.pbxproj index a6a6149e8..7375108c6 100644 --- a/Xcode/CloverX64/CloverX64.xcodeproj/project.pbxproj +++ b/Xcode/CloverX64/CloverX64.xcodeproj/project.pbxproj @@ -14,14 +14,18 @@ 9A28CCA3241B66EA00F3D247 /* stdlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CC9A241B66EA00F3D247 /* stdlib.h */; }; 9A28CCA4241B66EA00F3D247 /* limits.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CC9B241B66EA00F3D247 /* limits.h */; }; 9A28CCA5241B66EA00F3D247 /* stddef.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CC9C241B66EA00F3D247 /* stddef.h */; }; - 9A28CCA6241B66EA00F3D247 /* abort.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CC9D241B66EA00F3D247 /* abort.c */; }; - 9A28CCA7241B66EA00F3D247 /* strlen.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CC9E241B66EA00F3D247 /* strlen.c */; }; - 9A28CCA8241B66EA00F3D247 /* strcmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CC9F241B66EA00F3D247 /* strcmp.c */; }; 9A28CCA9241B66EA00F3D247 /* posix.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CCA0241B66EA00F3D247 /* posix.h */; }; 9A28CCAA241B66EA00F3D247 /* stdarg.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CCA1241B66EA00F3D247 /* stdarg.h */; }; 9A28CCAB241B66EA00F3D247 /* stdint.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CCA2241B66EA00F3D247 /* stdint.h */; }; - 9A28CD03241B8CBA00F3D247 /* posix_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD01241B8CBA00F3D247 /* posix_test.cpp */; }; - 9A28CD04241B8CBA00F3D247 /* posix_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD02241B8CBA00F3D247 /* posix_test.h */; }; + 9A28CD28241BC0C700F3D247 /* abort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD25241BC0C700F3D247 /* abort.cpp */; }; + 9A28CD29241BC0C700F3D247 /* strcmp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD26241BC0C700F3D247 /* strcmp.cpp */; }; + 9A28CD2A241BC0C700F3D247 /* strlen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD27241BC0C700F3D247 /* strlen.cpp */; }; + 9A28CD31241BC0DF00F3D247 /* strlen_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD2B241BC0DF00F3D247 /* strlen_test.cpp */; }; + 9A28CD32241BC0DF00F3D247 /* strcmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD2C241BC0DF00F3D247 /* strcmp_test.cpp */; }; + 9A28CD33241BC0DF00F3D247 /* strcmp_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD2D241BC0DF00F3D247 /* strcmp_test.h */; }; + 9A28CD34241BC0DF00F3D247 /* strncmp_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A28CD2E241BC0DF00F3D247 /* strncmp_test.cpp */; }; + 9A28CD35241BC0DF00F3D247 /* strlen_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD2F241BC0DF00F3D247 /* strlen_test.h */; }; + 9A28CD36241BC0DF00F3D247 /* strncmp_test.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A28CD30241BC0DF00F3D247 /* strncmp_test.h */; }; 9A57C25724192D650029A39F /* XUINTN.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A57C25524192D650029A39F /* XUINTN.cpp */; }; 9A57C25824192D650029A39F /* XUINTN.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A57C25624192D650029A39F /* XUINTN.h */; }; 9A57C25B24192D710029A39F /* XUINTN_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A57C25924192D710029A39F /* XUINTN_test.cpp */; }; @@ -206,14 +210,18 @@ 9A28CC9A241B66EA00F3D247 /* stdlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdlib.h; sourceTree = ""; }; 9A28CC9B241B66EA00F3D247 /* limits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = limits.h; sourceTree = ""; }; 9A28CC9C241B66EA00F3D247 /* stddef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stddef.h; sourceTree = ""; }; - 9A28CC9D241B66EA00F3D247 /* abort.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = abort.c; sourceTree = ""; }; - 9A28CC9E241B66EA00F3D247 /* strlen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strlen.c; sourceTree = ""; }; - 9A28CC9F241B66EA00F3D247 /* strcmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strcmp.c; sourceTree = ""; }; 9A28CCA0241B66EA00F3D247 /* posix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = posix.h; sourceTree = ""; }; 9A28CCA1241B66EA00F3D247 /* stdarg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdarg.h; sourceTree = ""; }; 9A28CCA2241B66EA00F3D247 /* stdint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stdint.h; sourceTree = ""; }; - 9A28CD01241B8CBA00F3D247 /* posix_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = posix_test.cpp; sourceTree = ""; }; - 9A28CD02241B8CBA00F3D247 /* posix_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = posix_test.h; sourceTree = ""; }; + 9A28CD25241BC0C700F3D247 /* abort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = abort.cpp; sourceTree = ""; }; + 9A28CD26241BC0C700F3D247 /* strcmp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strcmp.cpp; sourceTree = ""; }; + 9A28CD27241BC0C700F3D247 /* strlen.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strlen.cpp; sourceTree = ""; }; + 9A28CD2B241BC0DF00F3D247 /* strlen_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strlen_test.cpp; sourceTree = ""; }; + 9A28CD2C241BC0DF00F3D247 /* strcmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strcmp_test.cpp; sourceTree = ""; }; + 9A28CD2D241BC0DF00F3D247 /* strcmp_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strcmp_test.h; sourceTree = ""; }; + 9A28CD2E241BC0DF00F3D247 /* strncmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strncmp_test.cpp; sourceTree = ""; }; + 9A28CD2F241BC0DF00F3D247 /* strlen_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strlen_test.h; sourceTree = ""; }; + 9A28CD30241BC0DF00F3D247 /* strncmp_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strncmp_test.h; sourceTree = ""; }; 9A57C25524192D650029A39F /* XUINTN.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XUINTN.cpp; sourceTree = ""; }; 9A57C25624192D650029A39F /* XUINTN.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XUINTN.h; sourceTree = ""; }; 9A57C25924192D710029A39F /* XUINTN_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XUINTN_test.cpp; sourceTree = ""; }; @@ -405,12 +413,12 @@ 9A28CC99241B66EA00F3D247 /* Posix */ = { isa = PBXGroup; children = ( + 9A28CD25241BC0C700F3D247 /* abort.cpp */, + 9A28CD26241BC0C700F3D247 /* strcmp.cpp */, + 9A28CD27241BC0C700F3D247 /* strlen.cpp */, 9A28CC9A241B66EA00F3D247 /* stdlib.h */, 9A28CC9B241B66EA00F3D247 /* limits.h */, 9A28CC9C241B66EA00F3D247 /* stddef.h */, - 9A28CC9D241B66EA00F3D247 /* abort.c */, - 9A28CC9E241B66EA00F3D247 /* strlen.c */, - 9A28CC9F241B66EA00F3D247 /* strcmp.c */, 9A28CCA0241B66EA00F3D247 /* posix.h */, 9A28CCA1241B66EA00F3D247 /* stdarg.h */, 9A28CCA2241B66EA00F3D247 /* stdint.h */, @@ -467,8 +475,12 @@ 9AC77ED724176C04005CDD5C /* all_tests.h */, 9AC780B22417EE4A005CDD5C /* global_test.cpp */, 9AC780B42417EE53005CDD5C /* global_test.h */, - 9A28CD01241B8CBA00F3D247 /* posix_test.cpp */, - 9A28CD02241B8CBA00F3D247 /* posix_test.h */, + 9A28CD2C241BC0DF00F3D247 /* strcmp_test.cpp */, + 9A28CD2D241BC0DF00F3D247 /* strcmp_test.h */, + 9A28CD2B241BC0DF00F3D247 /* strlen_test.cpp */, + 9A28CD2F241BC0DF00F3D247 /* strlen_test.h */, + 9A28CD2E241BC0DF00F3D247 /* strncmp_test.cpp */, + 9A28CD30241BC0DF00F3D247 /* strncmp_test.h */, 9AC77ED624176C04005CDD5C /* XArray_tests.cpp */, 9AC77ECD24176C04005CDD5C /* XArray_tests.h */, 9AC77ED524176C04005CDD5C /* XObjArray_tests.cpp */, @@ -745,6 +757,7 @@ 9AC7801D24176C04005CDD5C /* Events.h in Headers */, 9AC7808D24176C04005CDD5C /* XStringWArray.h in Headers */, 9A57C25824192D650029A39F /* XUINTN.h in Headers */, + 9A28CD33241BC0DF00F3D247 /* strcmp_test.h in Headers */, 9AC7802124176C04005CDD5C /* boot.h in Headers */, 9AC7802F24176C04005CDD5C /* ati.h in Headers */, 9AC780B52417EE53005CDD5C /* global_test.h in Headers */, @@ -770,6 +783,7 @@ 9AC7801224176C04005CDD5C /* LoaderUefi.h in Headers */, 9AC7801624176C04005CDD5C /* hda.h in Headers */, 9AC77FC424176C04005CDD5C /* all_tests.h in Headers */, + 9A28CD36241BC0DF00F3D247 /* strncmp_test.h in Headers */, 9AC7804A24176C04005CDD5C /* XPointer.h in Headers */, 9AC7808E24176C04005CDD5C /* XToolsCommon.h in Headers */, 9AC7806D24176C04005CDD5C /* bootscreen.h in Headers */, @@ -778,13 +792,13 @@ 9AC77FBF24176C04005CDD5C /* XStringW_test.h in Headers */, 9AC7803824176C04005CDD5C /* ati_reg.h in Headers */, 9AC7804824176C04005CDD5C /* libegint.h in Headers */, - 9A28CD04241B8CBA00F3D247 /* posix_test.h in Headers */, 9AC7800624176C04005CDD5C /* memvendors.h in Headers */, 9AC7800B24176C04005CDD5C /* kernel_patcher.h in Headers */, 9AC7808A24176C04005CDD5C /* memory.h in Headers */, 9AC7807F24176C04005CDD5C /* menu.h in Headers */, 9AC7806224176C04005CDD5C /* MSUEFICADB.h in Headers */, 9AC7800324176C04005CDD5C /* Hibernate.h in Headers */, + 9A28CD35241BC0DF00F3D247 /* strlen_test.h in Headers */, 9AC77FBA24176C04005CDD5C /* XArray_tests.h in Headers */, 9AC77FFF24176C04005CDD5C /* Handle.h in Headers */, 9AC7809724176C04005CDD5C /* XArray.h in Headers */, @@ -897,10 +911,10 @@ 9AC7802324176C04005CDD5C /* BootOptions.cpp in Sources */, 9AC7808924176C04005CDD5C /* operatorNewDelete.cpp in Sources */, 9AC7807124176C04005CDD5C /* securehash.cpp in Sources */, - 9A28CCA6241B66EA00F3D247 /* abort.c in Sources */, 9AC7804B24176C04005CDD5C /* image.cpp in Sources */, 9AC7803624176C04005CDD5C /* Events.cpp in Sources */, 9AC7805B24176C04005CDD5C /* libscreen.cpp in Sources */, + 9A28CD31241BC0DF00F3D247 /* strlen_test.cpp in Sources */, 9AC7808824176C04005CDD5C /* panic.cpp in Sources */, 9AC77FC524176C04005CDD5C /* XStringW_test.cpp in Sources */, 9AC7806F24176C04005CDD5C /* tool.cpp in Sources */, @@ -914,7 +928,9 @@ 9AC7800A24176C04005CDD5C /* StateGenerator.cpp in Sources */, 9AC7805C24176C04005CDD5C /* XImage.cpp in Sources */, 9AC7802B24176C04005CDD5C /* platformdata.cpp in Sources */, + 9A28CD29241BC0C700F3D247 /* strcmp.cpp in Sources */, 9AC7805724176C04005CDD5C /* XPointer.cpp in Sources */, + 9A28CD34241BC0DF00F3D247 /* strncmp_test.cpp in Sources */, 9AC7807E24176C04005CDD5C /* list.cpp in Sources */, 9AC7809424176C04005CDD5C /* printf_lite.cpp in Sources */, 9AC7807C24176C04005CDD5C /* IO.cpp in Sources */, @@ -925,7 +941,6 @@ 9AC780B32417EE4B005CDD5C /* global_test.cpp in Sources */, 9AC7805624176C04005CDD5C /* load_icns.cpp in Sources */, 9AC7805124176C04005CDD5C /* egemb_font.cpp in Sources */, - 9A28CD03241B8CBA00F3D247 /* posix_test.cpp in Sources */, 9AC7806424176C04005CDD5C /* securemenu.cpp in Sources */, 9AC7804D24176C04005CDD5C /* text.cpp in Sources */, 9AC7800C24176C04005CDD5C /* AmlGenerator.cpp in Sources */, @@ -936,7 +951,6 @@ 9AC780B92417F359005CDD5C /* XStringWP.cpp in Sources */, 9AC7808224176C04005CDD5C /* memory.cpp in Sources */, 9AC7803B24176C04005CDD5C /* cpu.cpp in Sources */, - 9A28CCA8241B66EA00F3D247 /* strcmp.c in Sources */, 9AC7800124176C04005CDD5C /* LegacyBoot.cpp in Sources */, 9AC7807524176C04005CDD5C /* REFIT_MENU_SCREEN.cpp in Sources */, 9AC7801F24176C04005CDD5C /* LegacyBiosThunk.cpp in Sources */, @@ -952,6 +966,7 @@ 9AC7800D24176C04005CDD5C /* BdsConnect.cpp in Sources */, 9AC7802924176C04005CDD5C /* spd.cpp in Sources */, 9AC7800424176C04005CDD5C /* kext_patcher.cpp in Sources */, + 9A28CD28241BC0C700F3D247 /* abort.cpp in Sources */, 9AC7802624176C04005CDD5C /* gma.cpp in Sources */, 9AC7805424176C04005CDD5C /* FloatLib.cpp in Sources */, 9AC7809A24178F02005CDD5C /* menu_items.cpp in Sources */, @@ -960,6 +975,7 @@ 9AC7803D24176C04005CDD5C /* FixBiosDsdt.cpp in Sources */, 9AC7801B24176C04005CDD5C /* BootLog.cpp in Sources */, 9AC7807624176C04005CDD5C /* icns.cpp in Sources */, + 9A28CD32241BC0DF00F3D247 /* strcmp_test.cpp in Sources */, 9AC7805524176C04005CDD5C /* nanosvgrast.cpp in Sources */, 9AC77FBB24176C04005CDD5C /* XStringWArray_test.cpp in Sources */, 9AC7808124176C04005CDD5C /* main.cpp in Sources */, @@ -975,8 +991,8 @@ 9AC7803C24176C04005CDD5C /* guid.cpp in Sources */, 9AC7806C24176C04005CDD5C /* bootscreen.cpp in Sources */, 9A57C25724192D650029A39F /* XUINTN.cpp in Sources */, + 9A28CD2A241BC0C700F3D247 /* strlen.cpp in Sources */, 9AC7801424176C04005CDD5C /* Console.cpp in Sources */, - 9A28CCA7241B66EA00F3D247 /* strlen.c in Sources */, 9AC7809224176C04005CDD5C /* utf8Conversion.cpp in Sources */, 9AC7802E24176C04005CDD5C /* StartupSound.cpp in Sources */, 9AC7808724176C04005CDD5C /* globals_ctor.cpp in Sources */, diff --git a/Xcode/cpp_tests/cpp_tests.xcodeproj/project.pbxproj b/Xcode/cpp_tests/cpp_tests.xcodeproj/project.pbxproj index 514285f7f..3f4432c44 100644 --- a/Xcode/cpp_tests/cpp_tests.xcodeproj/project.pbxproj +++ b/Xcode/cpp_tests/cpp_tests.xcodeproj/project.pbxproj @@ -138,12 +138,6 @@ 9A0B086B24039FE700E2B470 /* printf_lite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = printf_lite.cpp; path = "../../../../../Embedded/Shared/printf_lite-master/printf_lite.cpp"; sourceTree = ""; }; 9A0B086C24039FE700E2B470 /* printf_lite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = printf_lite.h; path = "../../../../../Embedded/Shared/printf_lite-master/printf_lite.h"; sourceTree = ""; }; 9A0B08862403B08400E2B470 /* cpp_tests UTF32 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "cpp_tests UTF32"; sourceTree = BUILT_PRODUCTS_DIR; }; - 9A28CCB0241B816400F3D247 /* stdlib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stdlib.h; sourceTree = ""; }; - 9A28CCB1241B816400F3D247 /* limits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = limits.h; sourceTree = ""; }; - 9A28CCB2241B816400F3D247 /* stddef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stddef.h; sourceTree = ""; }; - 9A28CCB6241B816400F3D247 /* posix.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = posix.h; sourceTree = ""; }; - 9A28CCB7241B816400F3D247 /* stdarg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stdarg.h; sourceTree = ""; }; - 9A28CCB8241B816400F3D247 /* stdint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stdint.h; sourceTree = ""; }; 9A28CD05241B8DD400F3D247 /* strncmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strncmp_test.cpp; sourceTree = ""; }; 9A28CD06241B8DD400F3D247 /* strcmp_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strcmp_test.cpp; sourceTree = ""; }; 9A28CD07241B8DD400F3D247 /* strcmp_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strcmp_test.h; sourceTree = ""; }; @@ -271,12 +265,6 @@ 9A28CD1D241BB61B00F3D247 /* abort.cpp */, 9A28CD1E241BB61B00F3D247 /* strlen.cpp */, 9A28CD0F241B9EF800F3D247 /* strcmp.cpp */, - 9A28CCB0241B816400F3D247 /* stdlib.h */, - 9A28CCB1241B816400F3D247 /* limits.h */, - 9A28CCB2241B816400F3D247 /* stddef.h */, - 9A28CCB6241B816400F3D247 /* posix.h */, - 9A28CCB7241B816400F3D247 /* stdarg.h */, - 9A28CCB8241B816400F3D247 /* stdint.h */, ); path = Posix; sourceTree = ""; @@ -554,7 +542,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -644,7 +632,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/Xcode/cpp_tests/src/Platform.cpp b/Xcode/cpp_tests/src/Platform.cpp index 545c49829..0561e8ef0 100755 --- a/Xcode/cpp_tests/src/Platform.cpp +++ b/Xcode/cpp_tests/src/Platform.cpp @@ -28,7 +28,7 @@ void CpuDeadLoop(void) static char *dull_replace(const char *in, const char *pattern, const char *by, char* res) { - size_t outsize = strlen(in) + 1; +// size_t outsize = strlen(in) + 1; // TODO maybe avoid reallocing by counting the non-overlapping occurences of pattern // char *res = malloc(outsize); // use this to iterate over the output @@ -61,7 +61,7 @@ void DebugLog(int DebugMode, const char *FormatString, ...) { (void)DebugMode; - char NewFormat[strlen(FormatString)+1]; + char* NewFormat = (char*)alloca(strlen(FormatString)+1); dull_replace(FormatString, "%a", "%s", NewFormat); va_list va;