summaryrefslogtreecommitdiff
path: root/sha1dc/ubc_check.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-06-04 09:55:41 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-04 09:55:41 +0900
commit2281b8a36288a13ba17eb908ee7be366843c84f5 (patch)
tree1bce094853d22d569f7b5e84ed707f27a8ae3fbd /sha1dc/ubc_check.c
parentFifth batch for 2.14 (diff)
parentsha1dc: update from upstream (diff)
downloadtgif-2281b8a36288a13ba17eb908ee7be366843c84f5.tar.xz
Merge branch 'ab/sha1dc-maint'
The "collision detecting" SHA-1 implementation shipped with 2.13 was quite broken on some big-endian platforms and/or platforms that do not like unaligned fetches. Update to the upstream code which has already fixed these issues. * ab/sha1dc-maint: sha1dc: update from upstream
Diffstat (limited to 'sha1dc/ubc_check.c')
-rw-r--r--sha1dc/ubc_check.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sha1dc/ubc_check.c b/sha1dc/ubc_check.c
index 089dd4743d..b3beff2afb 100644
--- a/sha1dc/ubc_check.c
+++ b/sha1dc/ubc_check.c
@@ -24,8 +24,13 @@
// ubc_check has been verified against ubc_check_verify using the 'ubc_check_test' program in the tools section
*/
-#include "git-compat-util.h"
-#include "sha1dc/ubc_check.h"
+#ifndef SHA1DC_NO_STANDARD_INCLUDES
+#include <stdint.h>
+#endif
+#ifdef SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
+#include SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
+#endif
+#include "ubc_check.h"
static const uint32_t DV_I_43_0_bit = (uint32_t)(1) << 0;
static const uint32_t DV_I_44_0_bit = (uint32_t)(1) << 1;
@@ -361,3 +366,7 @@ if (mask) {
dvmask[0]=mask;
}
+
+#ifdef SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
+#include SHA1DC_CUSTOM_TRAILING_INCLUDE_UBC_CHECK_C
+#endif