From: Nathan Moinvaziri Date: Tue, 15 Mar 2022 23:54:44 +0000 (-0700) Subject: Added check for UNALIGNED64_OK when defining zmemcpy_8 and zmemcmp_8. X-Git-Tag: 2.1.0-beta1~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a6d5ace97a84ea7a9ec31b02cc64cad2e200e8d;p=thirdparty%2Fzlib-ng.git Added check for UNALIGNED64_OK when defining zmemcpy_8 and zmemcmp_8. --- diff --git a/zbuild.h b/zbuild.h index 0513bf0b..f6923853 100644 --- a/zbuild.h +++ b/zbuild.h @@ -228,7 +228,7 @@ # define zmemcmp_2(str1, str2) (*((uint16_t *)(str1)) != *((uint16_t *)(str2))) # define zmemcpy_4(dest, src) (*((uint32_t *)(dest)) = *((uint32_t *)(src))) # define zmemcmp_4(str1, str2) (*((uint32_t *)(str1)) != *((uint32_t *)(str2))) -# if UINTPTR_MAX == UINT64_MAX +# if defined(UNALIGNED64_OK) && (UINTPTR_MAX == UINT64_MAX) # define zmemcpy_8(dest, src) (*((uint64_t *)(dest)) = *((uint64_t *)(src))) # define zmemcmp_8(str1, str2) (*((uint64_t *)(str1)) != *((uint64_t *)(str2))) # else