krb4 library major version bump

Alexandra Ellwood lxs at MIT.EDU
Fri Feb 7 11:45:48 EST 2003


>  >>>>> "Jacques" == Jacques A Vidrine <nectar at celabo.org> writes:
>
>Jacques> I'm not sure to what code this is in reference, but you cannot define
>Jacques> a symbol as an array in one file and declare it as a pointer in
>Jacques> another.  e.g.
>
>Jacques>    krb.c: const char *const krb_err_txt [256];
>Jacques>    krb.h: const char * const * const krb_err_txt;
>
>Jacques> will cause undefined behavior because the pointer arithmetic will be
>Jacques> wrong in consumers of <krb.h>.
>
>Yeah, I stared at some compiler output later and realized this.  Just
>because implicit conversions happen between array names and pointers
>to their member types doesn't mean that they have the same
>representations... even though they do when they're parameters to
>functions.
>
>My current hack is to use yet another awk script to generate an actual
>array with contents identical to the com_err string table, but named
>krb_err_txt.  krb_err.c will still be included in err_txt.c, so
>compilers that do string consolidation can do that optimization.

The KfM 4.5.x and 4.0.x ABI defines and exports krb_err_txt as:

extern const char * const * krb_err_txt;

This includes the unchangeable CFM ABI.  So to preserve ABIs on KfM, 
we will need to usea different mechanism on the Mac.  Sigh.


--lxs
-- 
-----------------------------------------------------------------------------
Alexandra Ellwood                                               <lxs at mit.edu>
MIT Information Systems                               http://mit.edu/lxs/www/
-----------------------------------------------------------------------------
--


More information about the krbdev mailing list