X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/e5a551284a63f7f984d48babddbc0b25cf95058a..550697d618054b2358da0f4da60663859d63454c:/zaphod32_hash.h diff --git a/zaphod32_hash.h b/zaphod32_hash.h index c9b60cc..2fb391a 100644 --- a/zaphod32_hash.h +++ b/zaphod32_hash.h @@ -74,41 +74,6 @@ #define STMT_END while(0) #endif -#ifndef ZAPHOD32_ALLOW_UNALIGNED_AND_LITTLE_ENDIAN -/* ZAPHOD32_ALLOW_UNALIGNED_AND_LITTLE_ENDIAN only matters if nothing has defined U8TO64_LE etc, - * and when built with Perl these should be defined before this file is loaded. - */ -#ifdef U32_ALIGNMENT_REQUIRED -#define ZAPHOD32_ALLOW_UNALIGNED_AND_LITTLE_ENDIAN 0 -#else -#define ZAPHOD32_ALLOW_UNALIGNED_AND_LITTLE_ENDIAN 1 -#endif -#endif - -#ifndef U8TO32_LE -#if ZAPHOD32_ALLOW_UNALIGNED_AND_LITTLE_ENDIAN -#define U8TO32_LE(ptr) (*((const U32 *)(ptr))) -#else -#define U8TO32_LE(ptr) (\ - (U32)(ptr)[3] << 24 | \ - (U32)(ptr)[2] << 16 | \ - (U32)(ptr)[1] << 8 | \ - (U32)(ptr)[0] \ -) -#endif -#endif - -#ifndef U8TO16_LE -#if ZAPHOD32_ALLOW_UNALIGNED_AND_LITTLE_ENDIAN -#define U8TO16_LE(ptr) (*((const U16 *)(ptr))) -#else -#define U8TO16_LE(ptr) (\ - (U16)(ptr)[1] << 8 | \ - (U16)(ptr)[0] \ -) -#endif -#endif - /* This is two marsaglia xor-shift permutes, with a prime-multiple * sandwiched inside. The end result of doing this twice with different * primes is a completely avalanched v. */