diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-08-11 04:50:38 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-08-11 04:50:38 +0000 |
commit | 29cf68401ed5707d041064ce1addc91a4b3eeca9 (patch) | |
tree | 90648a825159893d394ec3807cdb8df2083849e6 | |
parent | 13c7a3fd2452e1806c99105e180385a5fc543244 (diff) | |
download | klibc-29cf68401ed5707d041064ce1addc91a4b3eeca9.tar.gz |
Correct the handling of the byte order macros in netinet/in.hklibc-0.16
-rw-r--r-- | include/netinet/in.h | 4 | ||||
-rw-r--r-- | klibc/include/netinet/in.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/netinet/in.h b/include/netinet/in.h index a4bcb7efc4731..c1f1c164fd359 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -8,14 +8,14 @@ #include <stdint.h> #include <endian.h> -#ifdef __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN #define htonl(x) ((uint32_t)(x)) #define ntohl(x) ((uint32_t)(x)) #define htons(x) ((uint16_t)(x)) #define ntohs(x) ((uint16_t)(x)) -#elif defined(__LITTLE_ENDIAN) +#elif __BYTE_ORDER == __LITTLE_ENDIAN static __inline__ uint32_t htonl(uint32_t __x) diff --git a/klibc/include/netinet/in.h b/klibc/include/netinet/in.h index a4bcb7efc4731..c1f1c164fd359 100644 --- a/klibc/include/netinet/in.h +++ b/klibc/include/netinet/in.h @@ -8,14 +8,14 @@ #include <stdint.h> #include <endian.h> -#ifdef __BIG_ENDIAN +#if __BYTE_ORDER == __BIG_ENDIAN #define htonl(x) ((uint32_t)(x)) #define ntohl(x) ((uint32_t)(x)) #define htons(x) ((uint16_t)(x)) #define ntohs(x) ((uint16_t)(x)) -#elif defined(__LITTLE_ENDIAN) +#elif __BYTE_ORDER == __LITTLE_ENDIAN static __inline__ uint32_t htonl(uint32_t __x) |