]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Revise the Windows section of <isc/endian.h>
authorOndřej Surý <ondrej@sury.org>
Mon, 3 Jun 2019 12:13:23 +0000 (14:13 +0200)
committerMichał Kępień <michal@isc.org>
Mon, 3 Jun 2019 12:13:23 +0000 (14:13 +0200)
Add a comment and remove redundant definitions.

lib/isc/include/isc/endian.h

index f0ceab64171be67f7859e7afcdcc2b3b1f19501f..54421d55d4beb3b7b0a28f45fa7738f398857658 100644 (file)
 # endif /* !be16toh */
 
 #elif defined(_WIN32)
-/* Windows is always little endian */
 
-#include <stdlib.h>
+/*
+ * Windows is always little-endian and has its own byte-swapping routines, so
+ * use these.
+ */
+
+# include <stdlib.h>
 
 # define htobe16(x) _byteswap_ushort(x)
 # define htole16(x) (x)
 # define be64toh(x) _byteswap_uint64(x)
 # define le64toh(x) (x)
 
-# define __BYTE_ORDER    BYTE_ORDER
-# define __BIG_ENDIAN    BIG_ENDIAN
-# define __LITTLE_ENDIAN LITTLE_ENDIAN
-# define __PDP_ENDIAN    PDP_ENDIAN
-
 #elif defined __APPLE__
 
 /*