gitattributes: do not rewrite patches containing crlf

This commit is contained in:
Leonid Pliushch 2020-05-23 15:43:47 +03:00
parent 7c3839bf5c
commit 3d82109504
6 changed files with 339 additions and 332 deletions

7
.gitattributes vendored
View File

@ -1,6 +1,13 @@
# Default. # Default.
* text eol=lf * text eol=lf
# Patches.
*.diff text=auto
*.patch text=auto
*.patch32 text=auto
*.patch64 text=auto
*.patch.* text=auto
# Powershell scripts. # Powershell scripts.
*.ps1 text eol=crlf *.ps1 text eol=crlf

View File

@ -2,282 +2,282 @@ diff -uNr cryptopp/cpu.cpp cryptopp.mod/cpu.cpp
--- cryptopp/cpu.cpp 2019-04-28 23:36:50.000000000 +0000 --- cryptopp/cpu.cpp 2019-04-28 23:36:50.000000000 +0000
+++ cryptopp.mod/cpu.cpp 2019-05-10 14:47:58.091890446 +0000 +++ cryptopp.mod/cpu.cpp 2019-05-10 14:47:58.091890446 +0000
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
// "$ANDROID_NDK_ROOT/sources/android/cpufeatures". // "$ANDROID_NDK_ROOT/sources/android/cpufeatures".
// setenv-android.sh will copy the header and source file // setenv-android.sh will copy the header and source file
// into PWD and the makefile will build it in place. // into PWD and the makefile will build it in place.
-#if defined(__ANDROID__) -#if defined(__ANDROID__)
+#if 0 +#if 0
# include "cpu-features.h" # include "cpu-features.h"
#endif #endif
@@ -548,264 +548,64 @@ @@ -548,264 +548,64 @@
inline bool CPU_QueryARMv7() inline bool CPU_QueryARMv7()
{ {
-#if defined(__aarch32__) || defined(__aarch64__) -#if defined(__aarch32__) || defined(__aarch64__)
- // ARMv7 or above - // ARMv7 or above
+#if defined(__arm__) || defined(__aarch32__) || defined(__aarch64__) +#if defined(__arm__) || defined(__aarch32__) || defined(__aarch64__)
return true; return true;
-#elif defined(__ANDROID__) && defined(__arm__) -#elif defined(__ANDROID__) && defined(__arm__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_ARMv7) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_ARMv7) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__arm__) -#elif defined(__linux__) && defined(__arm__)
- if ((getauxval(AT_HWCAP) & HWCAP_ARMv7) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_ARMv7) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__arm__) -#elif defined(__APPLE__) && defined(__arm__)
- // Apple hardware is ARMv7 or above. - // Apple hardware is ARMv7 or above.
- return true; - return true;
-#endif -#endif
+#else +#else
return false; return false;
+#endif +#endif
} }
inline bool CPU_QueryNEON() inline bool CPU_QueryNEON()
{ {
-#if defined(__ANDROID__) && defined(__aarch64__) -#if defined(__ANDROID__) && defined(__aarch64__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_ASIMD) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_ASIMD) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__arm__) -#elif defined(__ANDROID__) && defined(__arm__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_ASIMD) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_ASIMD) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_ASIMD) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_ASIMD) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__arm__) -#elif defined(__linux__) && defined(__arm__)
- if ((getauxval(AT_HWCAP) & HWCAP_ARM_NEON) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_ARM_NEON) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) -#elif defined(__APPLE__) && defined(__aarch64__)
- // Core feature set for Aarch32 and Aarch64. - // Core feature set for Aarch32 and Aarch64.
+#if defined(__arm__) || defined(__aarch32__) || defined(__aarch64__) +#if defined(__arm__) || defined(__aarch32__) || defined(__aarch64__)
return true; return true;
-#endif -#endif
+#else +#else
return false; return false;
+#endif +#endif
} }
inline bool CPU_QueryCRC32() inline bool CPU_QueryCRC32()
{ {
-#if defined(__ANDROID__) && defined(__aarch64__) -#if defined(__ANDROID__) && defined(__aarch64__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_CRC32) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_CRC32) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) -#elif defined(__ANDROID__) && defined(__aarch32__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_CRC32) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_CRC32) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_CRC32) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_CRC32) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_CRC32) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_CRC32) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) -#elif defined(__APPLE__) && defined(__aarch64__)
- // No compiler support. CRC intrinsics result in a failed compiled. - // No compiler support. CRC intrinsics result in a failed compiled.
- return false; - return false;
-#endif -#endif
return false; return false;
} }
inline bool CPU_QueryPMULL() inline bool CPU_QueryPMULL()
{ {
-#if defined(__ANDROID__) && defined(__aarch64__) -#if defined(__ANDROID__) && defined(__aarch64__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_PMULL) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_PMULL) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) -#elif defined(__ANDROID__) && defined(__aarch32__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_PMULL) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_PMULL) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_PMULL) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_PMULL) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_PMULL) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_PMULL) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) -#elif defined(__APPLE__) && defined(__aarch64__)
- // No compiler support. PMULL intrinsics result in a failed compiled. - // No compiler support. PMULL intrinsics result in a failed compiled.
- return false; - return false;
-#endif -#endif
return false; return false;
} }
inline bool CPU_QueryAES() inline bool CPU_QueryAES()
{ {
-#if defined(__ANDROID__) && defined(__aarch64__) -#if defined(__ANDROID__) && defined(__aarch64__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_AES) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_AES) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) -#elif defined(__ANDROID__) && defined(__aarch32__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_AES) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_AES) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_AES) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_AES) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_AES) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_AES) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) -#elif defined(__APPLE__) && defined(__aarch64__)
- unsigned int device, version; - unsigned int device, version;
- GetAppleMachineInfo(device, version); - GetAppleMachineInfo(device, version);
- return IsAppleMachineARMv8(device, version); - return IsAppleMachineARMv8(device, version);
-#endif -#endif
return false; return false;
} }
inline bool CPU_QuerySHA1() inline bool CPU_QuerySHA1()
{ {
-#if defined(__ANDROID__) && defined(__aarch64__) -#if defined(__ANDROID__) && defined(__aarch64__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA1) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA1) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) -#elif defined(__ANDROID__) && defined(__aarch32__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA1) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA1) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_SHA1) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_SHA1) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA1) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_SHA1) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) -#elif defined(__APPLE__) && defined(__aarch64__)
- unsigned int device, version; - unsigned int device, version;
- GetAppleMachineInfo(device, version); - GetAppleMachineInfo(device, version);
- return IsAppleMachineARMv8(device, version); - return IsAppleMachineARMv8(device, version);
-#endif -#endif
return false; return false;
} }
inline bool CPU_QuerySHA2() inline bool CPU_QuerySHA2()
{ {
-#if defined(__ANDROID__) && defined(__aarch64__) -#if defined(__ANDROID__) && defined(__aarch64__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA2) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA2) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) -#elif defined(__ANDROID__) && defined(__aarch32__)
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA2) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA2) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_SHA2) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_SHA2) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA2) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_SHA2) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) -#elif defined(__APPLE__) && defined(__aarch64__)
- unsigned int device, version; - unsigned int device, version;
- GetAppleMachineInfo(device, version); - GetAppleMachineInfo(device, version);
- return IsAppleMachineARMv8(device, version); - return IsAppleMachineARMv8(device, version);
-#endif -#endif
return false; return false;
} }
inline bool CPU_QuerySHA512() inline bool CPU_QuerySHA512()
{ {
-// Some ARMv8.4 features are disabled at the moment -// Some ARMv8.4 features are disabled at the moment
-#if defined(__ANDROID__) && defined(__aarch64__) && 0 -#if defined(__ANDROID__) && defined(__aarch64__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA512) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA512) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0 -#elif defined(__ANDROID__) && defined(__aarch32__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA512) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA512) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_SHA512) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_SHA512) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA512) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_SHA512) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) && 0 -#elif defined(__APPLE__) && defined(__aarch64__) && 0
- unsigned int device, version; - unsigned int device, version;
- GetAppleMachineInfo(device, version); - GetAppleMachineInfo(device, version);
- return IsAppleMachineARMv84(device, version); - return IsAppleMachineARMv84(device, version);
-#endif -#endif
return false; return false;
} }
inline bool CPU_QuerySHA3() inline bool CPU_QuerySHA3()
{ {
-// Some ARMv8.4 features are disabled at the moment -// Some ARMv8.4 features are disabled at the moment
-#if defined(__ANDROID__) && defined(__aarch64__) && 0 -#if defined(__ANDROID__) && defined(__aarch64__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA3) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SHA3) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0 -#elif defined(__ANDROID__) && defined(__aarch32__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA3) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SHA3) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_SHA3) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_SHA3) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_SHA3) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_SHA3) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) && 0 -#elif defined(__APPLE__) && defined(__aarch64__) && 0
- unsigned int device, version; - unsigned int device, version;
- GetAppleMachineInfo(device, version); - GetAppleMachineInfo(device, version);
- return IsAppleMachineARMv84(device, version); - return IsAppleMachineARMv84(device, version);
-#endif -#endif
return false; return false;
} }
inline bool CPU_QuerySM3() inline bool CPU_QuerySM3()
{ {
-// Some ARMv8.4 features are disabled at the moment -// Some ARMv8.4 features are disabled at the moment
-#if defined(__ANDROID__) && defined(__aarch64__) && 0 -#if defined(__ANDROID__) && defined(__aarch64__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SM3) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SM3) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0 -#elif defined(__ANDROID__) && defined(__aarch32__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SM3) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SM3) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_SM3) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_SM3) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_SM3) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_SM3) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) && 0 -#elif defined(__APPLE__) && defined(__aarch64__) && 0
- unsigned int device, version; - unsigned int device, version;
- GetAppleMachineInfo(device, version); - GetAppleMachineInfo(device, version);
- return IsAppleMachineARMv84(device, version); - return IsAppleMachineARMv84(device, version);
-#endif -#endif
return false; return false;
} }
inline bool CPU_QuerySM4() inline bool CPU_QuerySM4()
{ {
-// Some ARMv8.4 features are disabled at the moment -// Some ARMv8.4 features are disabled at the moment
-#if defined(__ANDROID__) && defined(__aarch64__) && 0 -#if defined(__ANDROID__) && defined(__aarch64__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM64) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SM4) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM64_FEATURE_SM4) != 0))
- return true; - return true;
-#elif defined(__ANDROID__) && defined(__aarch32__) && 0 -#elif defined(__ANDROID__) && defined(__aarch32__) && 0
- if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) && - if (((android_getCpuFamily() & ANDROID_CPU_FAMILY_ARM) != 0) &&
- ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SM4) != 0)) - ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_SM4) != 0))
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch64__) -#elif defined(__linux__) && defined(__aarch64__)
- if ((getauxval(AT_HWCAP) & HWCAP_SM4) != 0) - if ((getauxval(AT_HWCAP) & HWCAP_SM4) != 0)
- return true; - return true;
-#elif defined(__linux__) && defined(__aarch32__) -#elif defined(__linux__) && defined(__aarch32__)
- if ((getauxval(AT_HWCAP2) & HWCAP2_SM4) != 0) - if ((getauxval(AT_HWCAP2) & HWCAP2_SM4) != 0)
- return true; - return true;
-#elif defined(__APPLE__) && defined(__aarch64__) && 0 -#elif defined(__APPLE__) && defined(__aarch64__) && 0
- unsigned int device, version; - unsigned int device, version;
- GetAppleMachineInfo(device, version); - GetAppleMachineInfo(device, version);
- return IsAppleMachineARMv84(device, version); - return IsAppleMachineARMv84(device, version);
-#endif -#endif
return false; return false;
} }

View File

@ -1,11 +1,11 @@
--- ../exiv2json.cpp.orig 2019-05-31 21:32:41.319959442 +0200 --- ../exiv2json.cpp.orig 2019-05-31 21:32:41.319959442 +0200
+++ ./samples/exiv2json.cpp 2019-05-31 21:33:11.399959231 +0200 +++ ./samples/exiv2json.cpp 2019-05-31 21:33:11.399959231 +0200
@@ -236,7 +236,7 @@ @@ -236,7 +236,7 @@
{ {
Jzon::Object& fs = (Jzon::Object&) nfs; Jzon::Object& fs = (Jzon::Object&) nfs;
fs.Add("path",path); fs.Add("path",path);
- char resolved_path[2000]; // PATH_MAX]; - char resolved_path[2000]; // PATH_MAX];
+ char resolved_path[PATH_MAX]; + char resolved_path[PATH_MAX];
fs.Add("realpath",realpath(path,resolved_path)); fs.Add("realpath",realpath(path,resolved_path));
struct stat buf; struct stat buf;

View File

@ -12,21 +12,21 @@ index 13d1802..0605405 100644
--- a/k2pdfoptlib/k2pdfopt.h --- a/k2pdfoptlib/k2pdfopt.h
+++ b/k2pdfoptlib/k2pdfopt.h +++ b/k2pdfoptlib/k2pdfopt.h
@@ -259,7 +259,6 @@ typedef struct @@ -259,7 +259,6 @@ typedef struct
int text_only; /* Do not send figures to output file */ int text_only; /* Do not send figures to output file */
/* OCR */ /* OCR */
-#ifdef HAVE_OCR_LIB -#ifdef HAVE_OCR_LIB
char ocrout[128]; char ocrout[128];
int dst_ocr; int dst_ocr;
int ocr_detection_type; /* New in v2.50, 'w', 'l', or 'p' */ int ocr_detection_type; /* New in v2.50, 'w', 'l', or 'p' */
@@ -284,7 +283,6 @@ typedef struct @@ -284,7 +283,6 @@ typedef struct
double ocr_max_height_inches; double ocr_max_height_inches;
OCRWORDS dst_ocrwords; OCRWORDS dst_ocrwords;
int sort_ocr_text; int sort_ocr_text;
-#endif -#endif
int dst_userdpi; /* Specified device DPI, not including magnification */ int dst_userdpi; /* Specified device DPI, not including magnification */
int dst_dpi; /* Device virtual DPI--takes magnification/fontsize into account */ int dst_dpi; /* Device virtual DPI--takes magnification/fontsize into account */
-- --
2.20.1 2.20.1

View File

@ -2,32 +2,32 @@ diff -uNr k2pdfopt_v2.51/k2pdfoptlib/k2sys.c k2pdfopt_v2.51.mod/k2pdfoptlib/k2sy
--- k2pdfopt_v2.51/k2pdfoptlib/k2sys.c 2019-01-04 20:41:52.000000000 +0200 --- k2pdfopt_v2.51/k2pdfoptlib/k2sys.c 2019-01-04 20:41:52.000000000 +0200
+++ k2pdfopt_v2.51.mod/k2pdfoptlib/k2sys.c 2020-01-01 22:20:34.606541436 +0200 +++ k2pdfopt_v2.51.mod/k2pdfoptlib/k2sys.c 2020-01-01 22:20:34.606541436 +0200
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
#include "k2pdfopt.h" #include "k2pdfopt.h"
#include <stdarg.h> #include <stdarg.h>
-#ifdef __ANDROID__ -#ifdef __ANDROID__
+#if defined(__ANDROID__) && !defined(__TERMUX__) +#if defined(__ANDROID__) && !defined(__TERMUX__)
#include <android/log.h> #include <android/log.h>
#endif #endif
@@ -179,7 +179,7 @@ @@ -179,7 +179,7 @@
} }
else else
#endif #endif
-#ifdef __ANDROID__ -#ifdef __ANDROID__
+#if defined(__ANDROID__) && !defined(__TERMUX__) +#if defined(__ANDROID__) && !defined(__TERMUX__)
{ {
char buf[1024]; char buf[1024];
status=vsnprintf(buf,sizeof(buf),fmt,args); status=vsnprintf(buf,sizeof(buf),fmt,args);
diff -uNr k2pdfopt_v2.51/k2pdfoptlib/wrapbmp.c k2pdfopt_v2.51.mod/k2pdfoptlib/wrapbmp.c diff -uNr k2pdfopt_v2.51/k2pdfoptlib/wrapbmp.c k2pdfopt_v2.51.mod/k2pdfoptlib/wrapbmp.c
--- k2pdfopt_v2.51/k2pdfoptlib/wrapbmp.c 2019-01-04 20:41:40.000000000 +0200 --- k2pdfopt_v2.51/k2pdfoptlib/wrapbmp.c 2019-01-04 20:41:40.000000000 +0200
+++ k2pdfopt_v2.51.mod/k2pdfoptlib/wrapbmp.c 2020-01-01 22:16:03.613556631 +0200 +++ k2pdfopt_v2.51.mod/k2pdfoptlib/wrapbmp.c 2020-01-01 22:16:03.613556631 +0200
@@ -480,7 +480,7 @@ @@ -480,7 +480,7 @@
** but when I ask for back coordinates (original coordinates on source image) ** but when I ask for back coordinates (original coordinates on source image)
** I got wrong results. It happens because 'wrmap' malformed during parsing. ** I got wrong results. It happens because 'wrmap' malformed during parsing.
*/ */
-#if (defined(__ANDROID__) && defined(K2PDFOPT_KINDLEPDFVIEWER)) -#if (defined(__ANDROID__) && defined(K2PDFOPT_KINDLEPDFVIEWER))
+#if (defined(__ANDROID__) && defined(K2PDFOPT_KINDLEPDFVIEWER) && !defined(__TERMUX__)) +#if (defined(__ANDROID__) && defined(K2PDFOPT_KINDLEPDFVIEWER) && !defined(__TERMUX__))
{ {
int dstmar_pixels[4]; int dstmar_pixels[4];
int i,w; int i,w;

View File

@ -1,11 +1,11 @@
--- old/Project/GNU/Library/libmediainfo.pc.in 2019-09-10 21:27:35.000000000 +0200 --- old/Project/GNU/Library/libmediainfo.pc.in 2019-09-10 21:27:35.000000000 +0200
+++ Project/GNU/Library/libmediainfo.pc.in 2019-12-05 13:05:47.469137700 +0100 +++ Project/GNU/Library/libmediainfo.pc.in 2019-12-05 13:05:47.469137700 +0100
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
libdir=@libdir@ libdir=@libdir@
includedir=@includedir@ includedir=@includedir@
Unicode=@MediaInfoLib_Unicode@ Unicode=@MediaInfoLib_Unicode@
-Libs_Static=${libdir}/lib@MediaInfoLib_LibName@.a ${libdir}/libzen.a -lpthread -lz@Curl_Lib@ -Libs_Static=${libdir}/lib@MediaInfoLib_LibName@.a ${libdir}/libzen.a -lpthread -lz@Curl_Lib@
+Libs_Static=${libdir}/lib@MediaInfoLib_LibName@.a ${libdir}/libzen.a -lz@Curl_Lib@ +Libs_Static=${libdir}/lib@MediaInfoLib_LibName@.a ${libdir}/libzen.a -lz@Curl_Lib@
la_name=lib@MediaInfoLib_LibName@.la la_name=lib@MediaInfoLib_LibName@.la
Name: libmediainfo Name: libmediainfo