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-06-27 23:02:14 +0300
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-06-27 23:02:14 +0300
commit9d3a0b3783afab335a1819543d039cf2980577bb (patch)
tree6ec87206563d2c827455d7491c97320fd0ac1ccf
parent56ab30c4c998e1e7f3075705087a2f0c4c4202d7 (diff)
Big Endian detection: stop special-casing Solaris
As discussed in some detail on the Git mailing list (87tw31jmau.fsf@gmail.com & 87r2y5jkb6.fsf@gmail.com) we don't actually need to check _BIG_ENDIAN at all, because this is covered by the __sparc check earlier on. Thus this makes the whole logic: - Check settings modern (post-2011) GCC & clang export - Check glibc settings exported since forever (1993-ish) - Check a long list of processors known to be big-endian - If any of the above say we're big endian... - ...otherwise little-endian
-rw-r--r--lib/sha1.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index 1ff325b..1e7e307 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -83,22 +83,15 @@
#if defined(SHA1DC_ON_INTEL_LIKE_PROCESSOR)
/*
- * As a last resort before we fall back on _BIG_ENDIAN or whatever
- * else we're not 100% sure about below, we blacklist specific
- * processors here. We could add more, see
- * e.g. https://wiki.debian.org/ArchitectureSpecificsMemo
+ * As a last resort before we do anything else we're not 100% sure
+ * about below, we blacklist specific processors here. We could add
+ * more, see e.g. https://wiki.debian.org/ArchitectureSpecificsMemo
*/
#else /* Not under GCC-alike or glibc or <processor whitelist> or <processor blacklist> */
-#ifdef _BIG_ENDIAN
-/*
- * Solaris / illumos defines either _LITTLE_ENDIAN or _BIG_ENDIAN in
- * <sys/isa_defs.h>.
- */
-#define SHA1DC_BIGENDIAN
-#else
+/* We do nothing more here for now */
/*#error "Uncomment this to see if you fall through all the detection"*/
-#endif /* Big Endian because of _BIG_ENDIAN (Solaris)*/
+
#endif /* !SHA1DC_ON_INTEL_LIKE_PROCESSOR */
#endif /* Big Endian under whitelist of processors */
#endif /* Big Endian under glibc */