Skip to content

Commit 23e37f8

Browse files
avargitster
authored andcommitted
sha1dc: update from upstream
Update sha1dc from the latest version by the upstream maintainer[1]. See 2db8732 ("Merge branch 'ab/sha1dc'", 2017-07-10) for the last update. This fixes an issue where AIX was wrongly detected as a Little-endian instead of a Big-endian system. See [2][3][4]. 1. cr-marcstevens/sha1collisiondetection@232357e 2. cr-marcstevens/sha1collisiondetection#45 3. cr-marcstevens/sha1collisiondetection#42 4. https://public-inbox.org/git/[email protected]/ Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ffc6fa0 commit 23e37f8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

sha1collisiondetection

sha1dc/sha1.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,23 @@
9393
#define SHA1DC_BIGENDIAN
9494

9595
/* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> */
96+
#elif (defined(_AIX))
97+
98+
/*
99+
* Defines Big Endian on a whitelist of OSs that are known to be Big
100+
* Endian-only. See
101+
* https://public-inbox.org/git/[email protected]/
102+
*/
103+
#define SHA1DC_BIGENDIAN
104+
105+
/* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <os whitelist> */
96106
#elif defined(SHA1DC_ON_INTEL_LIKE_PROCESSOR)
97107
/*
98108
* As a last resort before we do anything else we're not 100% sure
99109
* about below, we blacklist specific processors here. We could add
100110
* more, see e.g. https://wiki.debian.org/ArchitectureSpecificsMemo
101111
*/
102-
#else /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <processor blacklist> */
112+
#else /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <os whitelist> or <processor blacklist> */
103113

104114
/* We do nothing more here for now */
105115
/*#error "Uncomment this to see if you fall through all the detection"*/

0 commit comments

Comments
 (0)