From a84c4e646c2d21e2ac7f21dfcfd83329662f24c3 Mon Sep 17 00:00:00 2001 From: Oleh Kulykov Date: Fri, 19 Jul 2024 09:33:54 +0200 Subject: [PATCH] 1721374434 --- src/C/7zCrc.c | 30 ++++++++++++++++++++++++++++++ src/C/Aes.c | 21 +++++++++++++++++++++ src/C/AesOpt.c | 21 +++++++++++++++++++++ src/CPP/7zip/Crypto/MyAes.cpp | 21 +++++++++++++++++++++ src/CPP/Windows/TimeUtils.cpp | 3 +-- 5 files changed, 94 insertions(+), 2 deletions(-) diff --git a/src/C/7zCrc.c b/src/C/7zCrc.c index 9be9a75a..28e4768d 100644 --- a/src/C/7zCrc.c +++ b/src/C/7zCrc.c @@ -14,6 +14,21 @@ #define Z7_CRC_HW_FORCE #endif +#if defined(LIBPLZMA) +#if defined(Z7_CRC_HW_FORCE) +#undef Z7_CRC_HW_FORCE +#endif // Z7_CRC_HW_FORCE +#if defined(Z7_CRC_HW_USE) +#undef Z7_CRC_HW_USE +#endif // Z7_CRC_HW_USE +#if defined(__ARM_FEATURE_CRC32) +#undef __ARM_FEATURE_CRC32 +#endif // __ARM_FEATURE_CRC32 +#if defined(__ARM_ARCH) +#undef __ARM_ARCH +#endif // __ARM_ARCH +#endif // LIBPLZMA + // #define Z7_CRC_DEBUG_BE #ifdef Z7_CRC_DEBUG_BE #undef MY_CPU_LE @@ -171,6 +186,21 @@ Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER #endif // non-ARM* +#if defined(LIBPLZMA) +#if defined(Z7_CRC_HW_FORCE) +#undef Z7_CRC_HW_FORCE +#endif // Z7_CRC_HW_FORCE +#if defined(Z7_CRC_HW_USE) +#undef Z7_CRC_HW_USE +#endif // Z7_CRC_HW_USE +#if defined(__ARM_FEATURE_CRC32) +#undef __ARM_FEATURE_CRC32 +#endif // __ARM_FEATURE_CRC32 +#if defined(__ARM_ARCH) +#undef __ARM_ARCH +#endif // __ARM_ARCH +#endif // LIBPLZMA + #if defined(Z7_CRC_HW_USE) diff --git a/src/C/Aes.c b/src/C/Aes.c index fc2c492d..78d78742 100644 --- a/src/C/Aes.c +++ b/src/C/Aes.c @@ -6,6 +6,27 @@ #include "CpuArch.h" #include "Aes.h" +#if defined(LIBPLZMA) +#if defined(Z7_CRC_HW_FORCE) +#undef Z7_CRC_HW_FORCE +#endif // Z7_CRC_HW_FORCE +#if defined(Z7_CRC_HW_USE) +#undef Z7_CRC_HW_USE +#endif // Z7_CRC_HW_USE +#if defined(__ARM_FEATURE_CRC32) +#undef __ARM_FEATURE_CRC32 +#endif // __ARM_FEATURE_CRC32 +#if defined(__ARM_ARCH) +#undef __ARM_ARCH +#endif // __ARM_ARCH +#if defined(MY_CPU_X86_OR_AMD64) +#undef MY_CPU_X86_OR_AMD64 +#endif // MY_CPU_X86_OR_AMD64 +#if defined(MY_CPU_ARM_OR_ARM64) +#undef MY_CPU_ARM_OR_ARM64 +#endif // MY_CPU_ARM_OR_ARM64 +#endif // LIBPLZMA + AES_CODE_FUNC g_AesCbc_Decode; #ifndef Z7_SFX AES_CODE_FUNC g_AesCbc_Encode; diff --git a/src/C/AesOpt.c b/src/C/AesOpt.c index 00b6c06b..34473e2e 100644 --- a/src/C/AesOpt.c +++ b/src/C/AesOpt.c @@ -6,6 +6,27 @@ #include "Aes.h" #include "CpuArch.h" +#if defined(LIBPLZMA) +#if defined(Z7_CRC_HW_FORCE) +#undef Z7_CRC_HW_FORCE +#endif // Z7_CRC_HW_FORCE +#if defined(Z7_CRC_HW_USE) +#undef Z7_CRC_HW_USE +#endif // Z7_CRC_HW_USE +#if defined(__ARM_FEATURE_CRC32) +#undef __ARM_FEATURE_CRC32 +#endif // __ARM_FEATURE_CRC32 +#if defined(__ARM_ARCH) +#undef __ARM_ARCH +#endif // __ARM_ARCH +#if defined(MY_CPU_X86_OR_AMD64) +#undef MY_CPU_X86_OR_AMD64 +#endif // MY_CPU_X86_OR_AMD64 +#if defined(MY_CPU_ARM_OR_ARM64) +#undef MY_CPU_ARM_OR_ARM64 +#endif // MY_CPU_ARM_OR_ARM64 +#endif // LIBPLZMA + #ifdef MY_CPU_X86_OR_AMD64 #if defined(__INTEL_COMPILER) diff --git a/src/CPP/7zip/Crypto/MyAes.cpp b/src/CPP/7zip/Crypto/MyAes.cpp index 6717d41b..3e23092a 100644 --- a/src/CPP/7zip/Crypto/MyAes.cpp +++ b/src/CPP/7zip/Crypto/MyAes.cpp @@ -4,6 +4,27 @@ #include "../../../C/CpuArch.h" +#if defined(LIBPLZMA) +#if defined(Z7_CRC_HW_FORCE) +#undef Z7_CRC_HW_FORCE +#endif // Z7_CRC_HW_FORCE +#if defined(Z7_CRC_HW_USE) +#undef Z7_CRC_HW_USE +#endif // Z7_CRC_HW_USE +#if defined(__ARM_FEATURE_CRC32) +#undef __ARM_FEATURE_CRC32 +#endif // __ARM_FEATURE_CRC32 +#if defined(__ARM_ARCH) +#undef __ARM_ARCH +#endif // __ARM_ARCH +#if defined(MY_CPU_X86_OR_AMD64) +#undef MY_CPU_X86_OR_AMD64 +#endif // MY_CPU_X86_OR_AMD64 +#if defined(MY_CPU_ARM_OR_ARM64) +#undef MY_CPU_ARM_OR_ARM64 +#endif // MY_CPU_ARM_OR_ARM64 +#endif // LIBPLZMA + #include "MyAes.h" namespace NCrypto { diff --git a/src/CPP/Windows/TimeUtils.cpp b/src/CPP/Windows/TimeUtils.cpp index 709effd3..a75abe0c 100644 --- a/src/CPP/Windows/TimeUtils.cpp +++ b/src/CPP/Windows/TimeUtils.cpp @@ -315,7 +315,6 @@ void GetCurUtc_FiTime(CFiTime &ft) throw() #endif } -#endif // LIBPLZMA #ifndef _WIN32 void GetCurUtcFileTime(FILETIME &ft) throw() @@ -345,7 +344,7 @@ void GetCurUtcFileTime(FILETIME &ft) throw() ft.dwHighDateTime = (DWORD)(v >> 32); } #endif - +#endif // LIBPLZMA }}