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: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair23 at gmail dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 27 Sep 2019 15:37:52 +0000
- Subject: Re: [PATCH 1/2] Split up endian.h to minimize exposure of BYTE_ORDER.
- Ironport-sdr: Hn0c6gtcQJIej6mzIbncFA3cczuhuS9faRCona3j5BTnUaPu6HCtKgP7ktON4y0a3cX7ewJVyF lrJuhK/mTHsyQJLyniAPL4un9Fv9qe5qAhIP7by0Zunu4817rWK/DiBIg1Kq7WYRajIbRRcNpY B0cUgihJTqDuRHVfxNAaa/5qQBbkyD8eoNdbdUP3H2TZnbFOuK5bcnPC2khfcxwOxqpJQzXsC8 tePkHzBoKQZwa4phZUrt+1XXt45A8Msp4hr4XHUuGHtBcabiyRJLtIs/cg+weMCc/KTqoj3ABQ VOk=
- Ironport-sdr: TU1LjcfQtVzOXNECB1XxZ5BymhecMmEQy6ztODjXZpuf2MK7ozYhzMFWwsn3ZIgF0cEUiyx4jT i847UH6Mj9BFkIa4gWLEempHMqdcN6VIDJZUhXvcyTsmsEBk7snW7jH37+BCI+R1sLSl8yCL4+ icidlV1sxVZWA8Bq8guhSszc/JoApuTyJ8nUTVAxrmKHfRb4DnJiiJM6qvJfzdWZVrrWknW4h9 MjiwOrPsZo0TSOdwR4iVj/4PV13bk6d/Yl/XBVfp3Yms/D4EO3ZUb9cvkCqm20147fZ074rgQL O3U=
- References: <20190925002903.15928-1-alistair.francis@wdc.com> <mvmimpgde3e.fsf@suse.de> <CAKmqyKN82QkmGsOYZ1PBOdzqhN_igg=mKE7D_+1uaXq+CmoVYg@mail.gmail.com> <mvm4l0z4k1z.fsf@suse.de> <CAKmqyKN5TOfWZUo4kfeatoHz4+yYVO3qVbQ6mQbkbpo3g90Xyg@mail.gmail.com>
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.
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.
--
Joseph S. Myers
joseph@codesourcery.com