Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cr-marcstevens/sha1collisiondetection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-05-19 00:38:43 +0300
committerMarc Stevens <cr-marcstevens@users.noreply.github.com>2017-05-20 13:49:39 +0300
commitca94024de3b8b1bfc73ffac004a8b14ebaf7bc7e (patch)
tree09045cd6b06fa0b2acb5f47e1de237d9ffa74539
parent394e2f0f3ff51da9d7b6f3a6305006daadc85e6c (diff)
Allow for defining SHA1DC_FORCE_UNALIGNED_ACCESS externally
This allows for doing -DSHA1DC_FORCE_UNALIGNED_ACCESS on a platform/CPU that's not listed here, since the default is to fall back to aligned access unless except on a whitelist of CPUs. It would be nice e.g. for the git project if someone running on such a platform didn't have to monkeypatch the code, instead they can just provide a -DSHA1DC_FORCE_UNALIGNED_ACCESS argument
-rw-r--r--lib/sha1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index 8f16d42..6d9f1a1 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -45,7 +45,8 @@
#endif /*ENDIANNESS SELECTION*/
-#if (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || \
+#if (defined SHA1DC_FORCE_UNALIGNED_ACCESS || \
+ defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || \
defined(i386) || defined(__i386) || defined(__i386__) || defined(__i486__) || \
defined(__i586__) || defined(__i686__) || defined(_M_IX86) || defined(__X86__) || \
defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) || defined(__INTEL__) || \