From ce46d23537ebfc4be5b5c2a05950b6c13813c868 Mon Sep 17 00:00:00 2001 From: Maxime Gervais Date: Sun, 1 Dec 2024 23:53:19 +0100 Subject: [PATCH] Apply ARM patches from vcpkg Signed-off-by: Maxime Gervais --- Source/MediaInfo/MediaInfo_Internal.cpp | 18 ++++++++++-------- Source/ThirdParty/aes-gladman/aesopt.h | 2 +- Source/ThirdParty/aes-gladman/brg_endian.h | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Source/MediaInfo/MediaInfo_Internal.cpp b/Source/MediaInfo/MediaInfo_Internal.cpp index 8b0387ae16..d485c7ec1f 100644 --- a/Source/MediaInfo/MediaInfo_Internal.cpp +++ b/Source/MediaInfo/MediaInfo_Internal.cpp @@ -66,12 +66,14 @@ #if MEDIAINFO_ADVANCED && defined(MEDIAINFO_FILE_YES) #include #ifdef WINDOWS - namespace WindowsNamespace - { + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif + #ifndef NOMINMAX + #define NOMINMAX + #endif #include #undef Yield - #undef max - } #else #include #include @@ -1017,7 +1019,7 @@ static void CtrlC_Received() } #ifdef WINDOWS -static WindowsNamespace::BOOL WINAPI SignalHandler(WindowsNamespace::DWORD SignalType) +static BOOL WINAPI SignalHandler(DWORD SignalType) { if (SignalType==CTRL_C_EVENT) { @@ -1030,12 +1032,12 @@ static WindowsNamespace::BOOL WINAPI SignalHandler(WindowsNamespace::DWORD Signa static void CtrlC_Register() { - WindowsNamespace::SetConsoleCtrlHandler(SignalHandler, TRUE); + SetConsoleCtrlHandler(SignalHandler, TRUE); } static void CtrlC_Unregister() { - WindowsNamespace::SetConsoleCtrlHandler(SignalHandler, FALSE); + SetConsoleCtrlHandler(SignalHandler, FALSE); } #else //WINDOWS static void SignalHandler(int SignalType) @@ -1489,7 +1491,7 @@ void MediaInfo_Internal::Entry() } #ifdef WINDOWS - WindowsNamespace::Sleep(0); + Sleep(0); #elif defined(_POSIX_PRIORITY_SCHEDULING) sched_yield(); #endif //_POSIX_PRIORITY_SCHEDULING diff --git a/Source/ThirdParty/aes-gladman/aesopt.h b/Source/ThirdParty/aes-gladman/aesopt.h index 6ad9ca1eb6..a858396fa8 100644 --- a/Source/ThirdParty/aes-gladman/aesopt.h +++ b/Source/ThirdParty/aes-gladman/aesopt.h @@ -183,7 +183,7 @@ Issue Date: 20/12/2007 AES_REV_DKS must NOT be defined when such assembler files are built */ -#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) +#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) && defined( _M_AMD64 ) # define INTEL_AES_POSSIBLE #endif diff --git a/Source/ThirdParty/aes-gladman/brg_endian.h b/Source/ThirdParty/aes-gladman/brg_endian.h index 4c34f2b5af..9f3b54525f 100644 --- a/Source/ThirdParty/aes-gladman/brg_endian.h +++ b/Source/ThirdParty/aes-gladman/brg_endian.h @@ -101,6 +101,7 @@ Issue Date: 20/12/2007 defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \ defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \ defined( vax ) || defined( vms ) || defined( VMS ) || \ + defined( _M_ARM64 ) || defined ( _M_ARM ) || \ defined( __VMS ) || defined( _M_X64 ) # define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN