This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Split up endian.h to minimize exposure of BYTE_ORDER.


On Wed, Sep 25, 2019 at 12:33 AM Andreas Schwab <schwab@suse.de> wrote:
>
> 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.

Isn't BYTE_ORDER still defined after this patch in the network headers?

Alistair

>
> 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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]