diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-05-19 00:38:43 +0300 |
---|---|---|
committer | Marc Stevens <cr-marcstevens@users.noreply.github.com> | 2017-05-20 13:49:39 +0300 |
commit | ca94024de3b8b1bfc73ffac004a8b14ebaf7bc7e (patch) | |
tree | 09045cd6b06fa0b2acb5f47e1de237d9ffa74539 | |
parent | 394e2f0f3ff51da9d7b6f3a6305006daadc85e6c (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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__) || \ |