diff --git a/Library/MemLogLibDefault/printf_lite.c b/Library/MemLogLibDefault/printf_lite.c index 9d9fa8b5f..fbe66ba36 100644 --- a/Library/MemLogLibDefault/printf_lite.c +++ b/Library/MemLogLibDefault/printf_lite.c @@ -565,7 +565,7 @@ extern uint32_t getUptimeInMilliseconds(void); #include #include -uint32_t getUptimeInMilliseconds() +uint32_t getUptimeInMilliseconds(void) { static mach_timebase_info_data_t s_timebase_info; diff --git a/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/project.pbxproj b/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/project.pbxproj index 7c658077e..1e2ce50af 100644 --- a/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/project.pbxproj +++ b/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/project.pbxproj @@ -126,7 +126,7 @@ 9A8792EA261886F5000B9362 /* abort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = abort.h; sourceTree = ""; }; 9A8792EC261886F5000B9362 /* printlib-test-cpp_conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printlib-test-cpp_conf.h"; sourceTree = ""; }; 9A8792ED261886F5000B9362 /* printf_lite-test-cpp_conf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "printf_lite-test-cpp_conf.h"; sourceTree = ""; }; - 9A8792EE261886F5000B9362 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Platform.h; sourceTree = ""; }; + 9A8792EE261886F5000B9362 /* Platform.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = Platform.h; sourceTree = ""; }; 9A8792EF261886F5000B9362 /* XToolsConf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XToolsConf.h; sourceTree = ""; }; 9A8792F0261886F5000B9362 /* BootLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BootLog.cpp; sourceTree = ""; }; 9A8792F1261886F5000B9362 /* BasicIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BasicIO.cpp; sourceTree = ""; }; @@ -715,7 +715,7 @@ 9A9223252402FD1000483CBA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1120; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = Jief_Machak; TargetAttributes = { 9A92232C2402FD1000483CBA = { @@ -847,7 +847,6 @@ "wcsncmp=wcsncmp_fixed", "wcsstr=wcsstr_fixed", NO_DEBUG_TRACE, - _UINTPTR_T, ); GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; @@ -893,7 +892,7 @@ ); INCLUDED_SOURCE_FILE_NAMES = ""; LLVM_LTO = NO; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -976,7 +975,6 @@ "wcsncmp=wcsncmp_fixed", "wcsstr=wcsstr_fixed", NO_DEBUG_TRACE, - _UINTPTR_T, ); GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; @@ -1022,7 +1020,7 @@ ); INCLUDED_SOURCE_FILE_NAMES = ""; LLVM_LTO = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; OTHER_CFLAGS = ( diff --git a/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/xcshareddata/xcschemes/CloverConfigPlistValidator.xcscheme b/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/xcshareddata/xcschemes/CloverConfigPlistValidator.xcscheme index 14fc281dc..9da4cf6f4 100644 --- a/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/xcshareddata/xcschemes/CloverConfigPlistValidator.xcscheme +++ b/Xcode/CloverConfigPlistValidator/CloverConfigPlistValidator.xcodeproj/xcshareddata/xcschemes/CloverConfigPlistValidator.xcscheme @@ -1,6 +1,6 @@ getData()->dataLenValue(); if (Size > 8) Size = 8; INTN Data = 0; - CopyMem(&Data, Prop->getData()->dataValue(), Size); + memcpy(&Data, Prop->getData()->dataValue(), Size); return Data; } return Default; diff --git a/rEFIt_UEFI/PlatformPOSIX/include/Platform.h b/rEFIt_UEFI/PlatformPOSIX/include/Platform.h index 2f12656f0..7e4d83da3 100644 --- a/rEFIt_UEFI/PlatformPOSIX/include/Platform.h +++ b/rEFIt_UEFI/PlatformPOSIX/include/Platform.h @@ -9,12 +9,21 @@ #ifndef Platform_h_h #define Platform_h_h -#ifndef _UINTPTR_T -#define _UINTPTR_T // to prevent macOS/Clang definition of uintptr_t (map to a long). We prefer long long so we can use %llu on all platform (including microsoft) -#endif -#ifndef _PTRDIFF_T_DECLARED -#define _PTRDIFF_T_DECLARED // to prevent macOS/GCC definition of uintptr_t (map to a long). We prefer long long so we can use %llu on all platform (including microsoft) -#endif + +// Replacing uintptr_t with unsigned long long doesn't work anymore with stdlic++ with xcode 12.5 (or probably some before) +// +//#ifndef _UINTPTR_T +//#define _UINTPTR_T // to prevent macOS/Clang definition of uintptr_t (map to a long). We prefer long long so we can use %llu on all platform (including microsoft) +//#endif +//#ifndef _PTRDIFF_T_DECLARED +//#define _PTRDIFF_T_DECLARED // to prevent macOS/GCC definition of uintptr_t (map to a long). We prefer long long so we can use %llu on all platform (including microsoft) +//#endif +// +//// Replacement of uintptr_t to avoid warning in printf. It needs macro _UINTPTR_T to avoid to standard definition +//typedef unsigned long long uintptr_t; +//#undef PRIuPTR +//#define PRIuPTR "llu" +////#define _UINTPTR_T #ifdef _MSC_VER #include @@ -32,14 +41,12 @@ extern "C" { //#include //#include #include "../../../../rEFIt_UEFI/Platform/BootLog.h" -//#include "BootLog.h" #include // this is just to define DEBUG, because Slice wrongly did some #ifdef DEBUG #ifdef __cplusplus } #endif - #include #include #include @@ -59,12 +66,6 @@ extern "C" { //typedef uint8_t bool; //#endif -// Replacement of uintptr_t to avoid warning in printf. It needs macro _UINTPTR_T to avoid to standard definition -typedef unsigned long long uintptr_t; -#undef PRIuPTR -#define PRIuPTR "llu" -//#define _UINTPTR_T - #include "./posix/abort.h" #include "../../../rEFIt_UEFI/cpp_foundation/unicode_conversions.h" diff --git a/rEFIt_UEFI/PlatformPOSIX/posix/abort.h b/rEFIt_UEFI/PlatformPOSIX/posix/abort.h index e9714ed0c..f1071fdba 100755 --- a/rEFIt_UEFI/PlatformPOSIX/posix/abort.h +++ b/rEFIt_UEFI/PlatformPOSIX/posix/abort.h @@ -39,11 +39,13 @@ void log_technical_bug(const char* format, ...) __attribute__((__format__(__prin #endif +#ifndef assert #ifdef _MSC_VER # define assert(expr) _assert(expr, "Expression \"%s\" failed in %s", #expr, __FUNCSIG__) #else # define assert(expr) _assert(expr, "Expression \"%s\" failed in %s", #expr, __PRETTY_FUNCTION__) #endif +#endif #define assertf(...) _assert(__VA_ARGS__) void _assert(bool b, const char* format, ...) __attribute__((__format__(__printf__, 2, 3)));