This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix up bswap_* types
There is also the public <byteswap.h> (string/byteswap.h).
That is not standardized and I think it's entirely reasonable that it
include <stdint.h>.
Note that endian.h is not specified by any published standard.
You cited materials of the POSIX working group that indicate how
it's expected to be specified in a future edition of POSIX.1, but
until such an edition is actually finalized, we're still dealing
with an <endian.h> that is a GNU invention.
I think the right approach to the name space issue is to have the headers
that include <bits/byteswap.h> include <stdint.h> themselves directly but
not have any <bits/byteswap.h> include any header that defines any symbols
in the application name space.
If a future need arises to use the <bits/byteswap.h> macros/inlines in
another header that should not include <stdint.h>, then we can address
that with a new set of private (__) type names that match uintNN_t.
I believe the -Wformat warnings from PRIx64 et al vs {u,}int64_t on x86_64
are a 2.16 regression that we will be fixing with this change. So it ought
to have a bug number.
Thanks,
Roland