[2557] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: Prototype hell

daemon@ATHENA.MIT.EDU (Theodore Y. Ts'o)
Fri Oct 10 16:16:32 1997

Date: Fri, 10 Oct 1997 16:16:14 -0400
From: "Theodore Y. Ts'o" <tytso@MIT.EDU>
To: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Cc: Ken Raeburn <raeburn@cygnus.com>, krbdev@MIT.EDU
In-Reply-To: Ken Hornstein's message of Thu, 09 Oct 1997 23:50:27 -0400,
	<199710100350.XAA11639@ginger.cmf.nrl.navy.mil>

   Date: Thu, 09 Oct 1997 23:50:27 -0400
   From: Ken Hornstein <kenh@cmf.nrl.navy.mil>

   However ... there is a catch.  If you use a short, it takes up 8 bytes ...
   but only has 32 bits of integer precision.  So, that seems like the
   closest thing I'm going to get, so I made krb5_int32 == short.  As you
   can see, this breaks things :-/

Stupid question ---- why does it help to make krb5_int32 be a short?
Given that sizeof(short) is still 8 bytes, it's still going to break
things.....  you might as well set krb5_int32 to be an int.  Either way,
you'll still need to fix those places which depend on sizeof(krb5_int32)
to be equal to 4.

As I've said earlier, I consider this a bug, and we're going to be
working to fix it.  Fixing this will be a pain, but 99.97% of the cases
where sizeof(krb5_int32) is used, it probably shouldn't be.  The only
exception might be in some place where it's being used in a malloc
statement, but there shouldn't be too many of cases where we malloc a
krb5_int32.

						- Ted

home help back first fref pref prev next nref lref last post