mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-21 15:57:42 +01:00
VS2019 compatibility
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
7b5e4acff3
commit
e37d782aad
@ -36,10 +36,9 @@ rem set DEFAULT_PYTHON_FREEZER_PATH=%PYTHON_HOME%\Scripts
|
||||
rem set "PYTHONHOME=d:\Program File\Python37"
|
||||
rem set "PYTHON_FREEZER_PATH=%PYTHONHOME%\Scripts"
|
||||
set PYTHON3_ENABLE=TRUE
|
||||
set DEFAULT_NASM_PREFIX=
|
||||
rem C:\Program Files (x86)\NASM"
|
||||
set DEFAULT_NASM_PREFIX=C:\Program Files\NASM
|
||||
rem # %DEFAULT_CYGWIN_HOME%\bin
|
||||
set DEFAULT_TOOLCHAIN=VS2015x86
|
||||
set DEFAULT_TOOLCHAIN=VS2017
|
||||
set DEFAULT_BUILDTARGET=RELEASE
|
||||
set DEFAULT_TARGETARCH=X64
|
||||
set DEFAULT_THREADNUMBER=%NUMBER_OF_PROCESSORS%
|
||||
|
@ -118,9 +118,9 @@ goto check_cygwin
|
||||
if not defined NASM_PREFIX (
|
||||
@echo.
|
||||
@echo !!! WARNING !!! NASM_PREFIX environment variable is not set
|
||||
@if exist "C:\Program Files (x86)\NASM\nasm.exe" @set "NASM_PREFIX=C:\Program Files (x86)\NASM\"
|
||||
@if exist "C:\Program Files (x86)\NASM\nasm.exe" @echo Found nasm.exe, setting the environment variable to "C:\Program Files (x86)\NASM"
|
||||
@if not exist "C:\Program Files (x86)\NASM\nasm.exe" echo Attempting to build modules that require NASM will fail.
|
||||
@if exist "C:\Program\ Files\NASM\nasm.exe" @set "NASM_PREFIX=C:\Program\ Files\NASM\"
|
||||
@if exist "C:\Program\ Files\NASM\nasm.exe" @echo Found nasm.exe, setting the environment variable to "C:\Program Files\NASM"
|
||||
@if not exist "C:\Program\ Files\NASM\nasm.exe" echo Attempting to build modules that require NASM will fail.
|
||||
)
|
||||
|
||||
:check_cygwin
|
||||
|
@ -18,7 +18,7 @@ typedef uint16_t char16_t;
|
||||
#endif
|
||||
|
||||
#ifndef __WCHAR_MAX__
|
||||
#error __WCHAR_MAX__
|
||||
#define __WCHAR_MAX__ 0xFFFFu
|
||||
#endif
|
||||
|
||||
#if __WCHAR_MAX__ <= 0xFFFFu
|
||||
|
@ -118,7 +118,7 @@ int XStringW_tests()
|
||||
str2.SWPrintf("%lc", c); // UTF16(32) char. (2 bytes in total if UTF16)
|
||||
if (str2 != s) return 22;
|
||||
str2.takeValueFrom("");
|
||||
if (str2.length() != 0) return 221;
|
||||
if (str2.size() != 0) return 221;
|
||||
str2.takeValueFrom(s); // this is a UTF8 string 2 bytes long
|
||||
if (str2 != s) return 23;
|
||||
#else
|
||||
@ -177,9 +177,11 @@ int XStringW_tests()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef _MSC_VER
|
||||
wchar_t* s = XStringW().takeValueFrom("aa").forgetDataWithoutFreeing();
|
||||
if ( s != L"aa"_XSW ) return 102;
|
||||
|
||||
#endif
|
||||
// XStringW CommonName(L"EFI\\CLOVER\\misc\\screenshot");
|
||||
// for (UINTN Index = 0; Index < 20; Index++) {
|
||||
// XStringW Name = CommonName + SPrintf("%lld", Index) + L".png";
|
||||
|
@ -174,8 +174,11 @@ int printf_lite_tests(void)
|
||||
loggf(F("\n"));
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _MSC_VER
|
||||
Test1arg(F("|80123456|"), F("|%X|"), (int)0xFFFFFFFF80123456);
|
||||
|
||||
#endif // !_MSC_VER
|
||||
|
||||
Test1arg(F("|FFFFFFFF80123456|"), F("|%lX|"), 0xFFFFFFFF80123456);
|
||||
|
||||
Test1arg(F("Āࠀ𐀀🧊Выход'utf8'из"), F("Āࠀ𐀀🧊Выход'%s'из"), "utf8");
|
||||
|
@ -1580,7 +1580,7 @@ STATIC VOID AddCustomEntry(IN UINTN CustomIndex,
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
if ((1<<Volume->DiskKind) & GlobalConfig.DisableFlags) {
|
||||
if (((1ull<<Volume->DiskKind) & GlobalConfig.DisableFlags) != 0) {
|
||||
DBG("skipped because media is disabled\n");
|
||||
continue;
|
||||
}
|
||||
|
@ -1598,16 +1598,20 @@ static unsigned hash_init(Hash* hash, unsigned windowsize) {
|
||||
hash->headz = (int*)lodepng_malloc(sizeof(int) * (MAX_SUPPORTED_DEFLATE_LENGTH + 1));
|
||||
hash->chainz = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize);
|
||||
|
||||
|
||||
|
||||
if(!hash->head || !hash->chain || !hash->val || !hash->headz|| !hash->chainz || !hash->zeros) {
|
||||
return 83; /*alloc fail*/
|
||||
}
|
||||
|
||||
/*initialize hash table*/
|
||||
for(i = 0; i != HASH_NUM_VALUES; ++i) hash->head[i] = -1;
|
||||
for(i = 0; i != windowsize; ++i) hash->val[i] = -1;
|
||||
volatile int* p = hash->head;
|
||||
for(i = 0; i != HASH_NUM_VALUES; ++i) *p++ = -1;
|
||||
p = hash->val;
|
||||
for(i = 0; i != windowsize; ++i) *p++ = -1;
|
||||
for(i = 0; i != windowsize; ++i) hash->chain[i] = i; /*same value as index indicates uninitialized*/
|
||||
|
||||
for(i = 0; i <= MAX_SUPPORTED_DEFLATE_LENGTH; ++i) hash->headz[i] = -1;
|
||||
p = hash->headz;
|
||||
for(i = 0; i <= MAX_SUPPORTED_DEFLATE_LENGTH; ++i) *p++ = -1;
|
||||
for(i = 0; i != windowsize; ++i) hash->chainz[i] = i; /*same value as index indicates uninitialized*/
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user