From 84ff6a69639845d52d6e4b9c922d91d873d1fefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 3 Jun 2019 14:13:23 +0200 Subject: [PATCH] Revise the Windows section of Add a comment and remove redundant definitions. --- lib/isc/include/isc/endian.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/isc/include/isc/endian.h b/lib/isc/include/isc/endian.h index f0ceab6417..54421d55d4 100644 --- a/lib/isc/include/isc/endian.h +++ b/lib/isc/include/isc/endian.h @@ -31,9 +31,13 @@ # endif /* !be16toh */ #elif defined(_WIN32) -/* Windows is always little endian */ -#include +/* + * Windows is always little-endian and has its own byte-swapping routines, so + * use these. + */ + +# include # define htobe16(x) _byteswap_ushort(x) # define htole16(x) (x) @@ -50,11 +54,6 @@ # 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__ /*