This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Split up endian.h to minimize exposure of BYTE_ORDER.
- From: Andreas Schwab <schwab at suse dot de>
- To: Alistair Francis <alistair dot francis at wdc dot com>
- Cc: libc-alpha at sourceware dot org, alistair23 at gmail dot com
- Date: Wed, 25 Sep 2019 09:33:57 +0200
- Subject: Re: [PATCH 1/2] Split up endian.h to minimize exposure of BYTE_ORDER.
- References: <20190925002903.15928-1-alistair.francis@wdc.com>
On Sep 24 2019, Alistair Francis <alistair.francis@wdc.com> wrote:
> diff --git a/inet/netinet/in.h b/inet/netinet/in.h
> index 148bc663fc7..609ad66bcb8 100644
> --- a/inet/netinet/in.h
> +++ b/inet/netinet/in.h
> @@ -380,9 +380,9 @@ extern uint32_t htonl (uint32_t __hostlong)
> extern uint16_t htons (uint16_t __hostshort)
> __THROW __attribute__ ((__const__));
>
> -#include <endian.h>
>
> /* Get machine dependent optimized versions of byte swapping functions. */
> +#include <bits/endian.h>
> #include <bits/byteswap.h>
> #include <bits/uintn-identity.h>
>
> diff --git a/resolv/arpa/nameser_compat.h b/resolv/arpa/nameser_compat.h
> index f1c390f3b91..37c178b5243 100644
> --- a/resolv/arpa/nameser_compat.h
> +++ b/resolv/arpa/nameser_compat.h
> @@ -29,7 +29,7 @@
> #ifndef _ARPA_NAMESER_COMPAT_
> #define _ARPA_NAMESER_COMPAT_
>
> -#include <endian.h>
> +#include <bits/endian.h>
>
> /*%
> * Structure for query header. The order of the fields is machine- and
Not sure whether we should change the network headers. There are
probably uses that depend on BYTE_ORDER to be defined through them.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."