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] Fix up bswap_* types


On Sun, Aug 19, 2012 at 10:49:05PM +0000, Joseph S. Myers wrote:
> But uint64_type_node etc. do not necessarily correspond to the stdint.h 
> typedefs (see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37743>; making 
> them correspond to the typedefs involves finishing adding stdint.h type 
> information to GCC for various target OSes).

I see.  Thanks.

> When posting a patch where corresponding ports changes would be 
> appropriate but are not included, please call out in the submission where 
> ports changes may be appropriate.

I should have done that.  I'll let libc-ports know when/if this patch
gets applied.

> You are making headers include <stdint.h> that didn't previously.  Could 
> you detail the analysis of what public headers, directly or indirectly, 
> end up including <stdint.h> as a result, and why it is OK in namespace 
> terms for those headers to expose all symbols from <stdint.h> if they 
> didn't already do so?

Well.  It looks like this affects <netinet/in.h>, but this header
already includes <stdint.h> (and man in.h says "The uint8_t
and uint32_t type shall be defined as described in <inttypes.h>.
Inclusion of the <netinet/in.h> header may also make visible all
symbols from <inttypes.h> and <sys/socket.h>.", so it's fine).

Furthermore, it affects <endian.h>, but
<https://www.opengroup.org/austin/docs/austin_514.txt>
says "The <endian.h> header shall define the uint64_t, uint32_t
and uint16_t types as described in <stdint.h>.

Inclusion of the <endian.h> header may also make visible all
symbols from <stdint.h>".  So it's presumably ok to include it
here as well.  Interestingly, current <endian.h> doesn't do that,
it's needed to include <stdint.h> explicitly.

Other than these two, I haven't found other headers that use
byteswap.h.

Is there anything else?  Thanks,

	Marek


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