From 4f4b92ba7ae9c56cb0f181d5f95d709e085b8bd5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 11 Jul 2014 15:56:16 +0200 Subject: always check for __BYTE_ORDER == __BIG_ENDIAN when checking for endianess Let's always stick to glibc's way to determine byte order, and not mix autoconf-specific checks with gcc checks. --- src/shared/time-dst.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/time-dst.c') diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c index ceca2fafae..6195b11017 100644 --- a/src/shared/time-dst.c +++ b/src/shared/time-dst.c @@ -207,8 +207,8 @@ read_again: if (type_idxs[i] >= num_types) return -EINVAL; - if (BYTE_ORDER == BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4 - : sizeof(time_t) == 4 || trans_width == 4) { + if (__BYTE_ORDER == __BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4 + : sizeof(time_t) == 4 || trans_width == 4) { /* Decode the transition times, stored as 4-byte integers in network (big-endian) byte order. We work from the end of the array so as not to clobber the next element to be @@ -216,7 +216,7 @@ read_again: i = num_transitions; while (i-- > 0) transitions[i] = decode((char *)transitions + i * 4); - } else if (BYTE_ORDER != BIG_ENDIAN && sizeof(time_t) == 8) { + } else if (__BYTE_ORDER != __BIG_ENDIAN && sizeof(time_t) == 8) { /* Decode the transition times, stored as 8-byte integers in network (big-endian) byte order. */ for (i = 0; i < num_transitions; ++i) -- cgit v1.2.3-54-g00ecf