Skip to content

Commit

Permalink
1721374434
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleh Kulykov committed Jul 19, 2024
1 parent 94af556 commit a84c4e6
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 2 deletions.
30 changes: 30 additions & 0 deletions src/C/7zCrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
21 changes: 21 additions & 0 deletions src/C/Aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
21 changes: 21 additions & 0 deletions src/C/AesOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 21 additions & 0 deletions src/CPP/7zip/Crypto/MyAes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions src/CPP/Windows/TimeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ void GetCurUtc_FiTime(CFiTime &ft) throw()

#endif
}
#endif // LIBPLZMA

#ifndef _WIN32
void GetCurUtcFileTime(FILETIME &ft) throw()
Expand Down Expand Up @@ -345,7 +344,7 @@ void GetCurUtcFileTime(FILETIME &ft) throw()
ft.dwHighDateTime = (DWORD)(v >> 32);
}
#endif

#endif // LIBPLZMA

}}

Expand Down

0 comments on commit a84c4e6

Please sign in to comment.