Relying on stdint.h in krb5
Greg Hudson
ghudson at MIT.EDU
Sat Feb 1 16:56:48 EST 2014
http://k5wiki.kerberos.org/wiki/Portability_assumptions currently says
"The C99 stdint.h or inttypes.h capabilities should be available."
I would like to change this to specifically require stdint.h, so that we
can include it unconditionally in public headers. C99 specifies
<stdint.h> to declare the fixed-width typedefs and min/max constants,
and <inttypes.h> to declare those as well as the printf format
specifiers and some utility functions. Right now we only need the
fixed-width type names; we don't need any of the extra stuff in
inttypes.h.
According to my notes, MSVC provides <stdint.h> as of SDK 7.1, but not
<inttypes.h>. I believe <stdint.h> is available on every Unix-like
platform we would want to support.
I've prototyped some changes at
https://github.com/greghudson/krb5/commits/stdint which get rid of a
bunch of autoconf goo and use standard names for 64-bit types.
I would also like to stop using (but continue declaring)
krb5_int32/krb5_ui_4/krb5_int16/krb5_ui_2 in favor of
int32_t/uint32_t/int16_t/uint16_t, but that's a big change, so I'm going
to defer it until I see how this discussion goes.
More information about the krbdev
mailing list