From: Nathan Moinvaziri Date: Tue, 4 Jan 2022 16:30:39 +0000 (-0800) Subject: Remove use_byfour compile time detection of the existence of four byte integer types... X-Git-Tag: 2.1.0-beta1~457 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c082d926cb7c7a939a8bd3fb760a33659d2ee58;p=thirdparty%2Fzlib-ng.git Remove use_byfour compile time detection of the existence of four byte integer types since we are targeting newer systems. --- diff --git a/functable.c b/functable.c index 0118dc5b7..5d0005a98 100644 --- a/functable.c +++ b/functable.c @@ -519,22 +519,16 @@ Z_INTERNAL uint8_t* chunkmemset_safe_stub(uint8_t *out, unsigned dist, unsigned } Z_INTERNAL uint32_t crc32_stub(uint32_t crc, const unsigned char *buf, uint64_t len) { - int32_t use_byfour = sizeof(void *) == sizeof(ptrdiff_t); - Assert(sizeof(uint64_t) >= sizeof(size_t), "crc32_z takes size_t but internally we have a uint64_t len"); - if (use_byfour) { #if BYTE_ORDER == LITTLE_ENDIAN - functable.crc32 = crc32_little; + functable.crc32 = crc32_little; #elif BYTE_ORDER == BIG_ENDIAN - functable.crc32 = crc32_big; + functable.crc32 = crc32_big; #else -# error No endian defined + functable.crc32 = &crc32_generic; #endif - } else { - functable.crc32 = &crc32_generic; - } cpu_check_features(); #ifdef ARM_ACLE_CRC_HASH if (arm_cpu_has_crc32)