[krbdev.mit.edu #3522] Error code definitions are outside macros to prevent multiple inclusion in public headers

Ken Raeburn via RT rt-comment at krbdev.mit.edu
Tue Mar 14 16:48:00 EST 2006


On Mar 14, 2006, at 14:11, Alexandra Ellwood via RT wrote:
> For example in krb5.h the error codes are appended after the  
> "#endif /* KRB5_GENERAL__ */"
>
> This isn't actually causing problems for normal usage of our  
> headers.  However, I want to switch
> to using these headers on KfM (rather than the ones KfM  
> autogenerates for itself).  Having the
> error code definitions outside the macros to prevent multiple  
> inclusion would be a change from
> what KfM's headers do.

Since redefinitions to the same expansion are valid, this should only  
be a problem if some code includes krb5.h (or whatever), redefines  
one of the error code macros to something else, and then includes  
krb5.h again.  (Or, maybe, include krb5.h, undef a macro, include  
krb5.h again, test to see if macro is defined.)  Is that case important?




More information about the krb5-bugs mailing list