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.
On Fri, Sep 27, 2019 at 8:37 AM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Thu, 26 Sep 2019, Alistair Francis wrote:
>
> > __BYTE_ORDER is exposed in the network headers, while BYTE_ORDER is not.
> >
> > Do you want me to add #include <endian.h> back to?
> > - inet/netinet/in.h
> > - resolv/arpa/nameser_compat.h
>
> Given the concern expressed, I think it makes sense to keep the <endian.h>
> include there. Zack's cleanup series can always keep a reduced version of
> the patch that just changes those includes to <bits/endian.h> if we wish
> to consider the change in those headers as a future cleanup.
>
> As the goal of getting this patch in right now is to avoid adding a new
> include of <endian.h> from all headers that end up defining struct
> timespec, it should be fine to omit (defer to later) the removal from any
> headers where there are concerns about the removal.
Works for me, I have not made changes to the two networking files.
>
> Note also: the text in the commit message and the ChangeLog entry about
> C-SKY needs updating to reflect the big-endian still results in an error.
Good point, fixed.
Alistair
>
> --
> Joseph S. Myers
> joseph@codesourcery.com