This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] Fix up bswap_* types
- From: Marek Polacek <polacek at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, libc-ports <libc-ports at sourceware dot org>
- Date: Thu, 23 Aug 2012 01:04:43 +0200
- Subject: Re: [PATCH] Fix up bswap_* types
- References: <20120819160958.GB3156@redhat.com> <Pine.LNX.4.64.1208192243590.24239@digraph.polyomino.org.uk> <20120820143509.GG3156@redhat.com> <20120821210132.C13992C0D5@topped-with-meat.com> <20120822154645.GB16963@redhat.com> <20120822164747.90AD42C0F4@topped-with-meat.com> <20120822200555.GE16963@redhat.com> <20120822201224.5E0B22C0F8@topped-with-meat.com>
On Wed, Aug 22, 2012 at 01:12:24PM -0700, Roland McGrath wrote:
> They are wrong to include <endian.h>, which declares public symbols.
> They should use only <bits/endian.h> instead. This means all the various
> bits/endian.h files need their #ifndef _ENDIAN_H sanity checks adjusted.
In that case I think I could in {w,}ctype.h before including
<bits/endian.h> define say `__need_byteorder' and then tweak guards
in all the bits/endian.h so that they look like
#if !defined _ENDIAN_H && !defined __need_byteorder
# error blah...
#endif
And it also looks that I have to move following definitions:
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
#define __PDP_ENDIAN 3412
from string/endian.h to ctype/ctype.h, otherwise charset test
when running check just blow up.
What do ya say?
Marek