[2581] in Kerberos_V5_Development
sized types, and ridding ourselves of them
daemon@ATHENA.MIT.EDU (Tom Yu)
Fri Oct 17 23:45:33 1997
Date: Fri, 17 Oct 1997 23:44:52 -0400 (EDT)
To: krbdev@MIT.EDU
From: Tom Yu <tlyu@MIT.EDU>
So what do people think about getting rid of sized types completely?
In particular, krb5_int32 will always be a long, and krb5_int16 will
always be an int. Better yet, what about just using long and int
where we mean types at least 32 and 16 bits wide, accordingly? I
don't think that's inherently a bad thing. It will likely break some
binary compatibility, but considering Ken Hornstein's experiences with
with Crays and other associated confusion, I am strongly considering
it.
The major argument against if is if there is some architecture where
an int is 32 bits wide and a long is wider but is more expensive to do
arithmetic on. I suspect that all architectures that have longs wider
than 32 bits actually don't make arithmetic on them expensive, but I
may be mistaken. Any compiler gurus want to comment on that?
Certainly unconditionally defining krb5_int32 as a long and a
krb5_int16 as an int would simplify the headers a whole lot, as it
means we might actually get away without custom-generating the headers
at all, or without requiring that people do things like define
SIZEOF_INT when compiling against the headers. For that matter doing
away with the types krb5_int32 and krb5_int16 completely might not be
a bad idea either.
---Tom