]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
And add detection for machine/endian.h to it.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 25 Mar 2013 14:53:09 +0000 (14:53 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 25 Mar 2013 14:53:09 +0000 (14:53 +0000)
git-svn-id: file:///svn/unbound/trunk@2875 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/storage/lookup3.c

index b1eda4d4d954dc0d5cdf25c5ecf52e681f322497..29e2df976cd72ddb6bb6063863f91feed7a6b145 100644 (file)
@@ -2,6 +2,7 @@
        - #492: Fix endianness detection, revert to older lookup3.c detection
          and put new detect lines after previous tests, to avoid regressions
          but allow new detections to succeed.
+         And add detection for machine/endian.h to it.
 
 22 March 2013: Wouter
        - Fix resolve of names that use a mix of public and private addresses.
index eb03254f13c53d47fd5a819ca6e78155775fdcf1..775503c940ec26b6a77535ec72734870f95da25c 100644 (file)
@@ -84,13 +84,13 @@ hash_set_raninit(uint32_t v)
       (defined(sparc) || defined(__sparc) || defined(__sparc__) || defined(POWERPC) || defined(mc68000) || defined(sel))
 # define HASH_LITTLE_ENDIAN 0
 # define HASH_BIG_ENDIAN 1
-/* test later because it fails when they are defined to empty strings */
-#elif (defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && \
-       _BYTE_ORDER == _BIG_ENDIAN)
+/* test for machine_endian_h protects failure if some are empty strings */
+#elif (defined(_MACHINE_ENDIAN_H_) && defined(_BYTE_ORDER) && \
+       defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN)
 # define HASH_LITTLE_ENDIAN 0
 # define HASH_BIG_ENDIAN 1
-#elif (defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && \
-     _BYTE_ORDER == _LITTLE_ENDIAN)
+#elif (defined(_MACHINE_ENDIAN_H_) && defined(_BYTE_ORDER) && \
+       defined(_LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN)
 # define HASH_LITTLE_ENDIAN 1
 # define HASH_BIG_ENDIAN 0
 #else