Skip Menu |
 

Subject: Error code definitions are outside macros to prevent multiple inclusion in public headers
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.
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #3522] Error code definitions are outside macros to prevent multiple inclusion in public headers
Date: Tue, 14 Mar 2006 16:47:52 -0500
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
On Mar 14, 2006, at 14:11, Alexandra Ellwood via RT wrote:
Show quoted text
> 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?
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #3522] Error code definitions are outside macros to prevent multiple inclusion in public headers
From: Tom Yu <tlyu@MIT.EDU>
Date: Thu, 06 Apr 2006 00:51:35 -0400
RT-Send-Cc:
Alternatively, make the com_err generated header files have
protection against multiple inclusion.
From: raeburn@mit.edu
Subject: SVN Commit
* Makefile.in (krb5/krb5.h): Wrap the content in macro test for
multiple-inclusion protection.

Commit By: raeburn



Revision: 18571
Changed Files:
U trunk/src/include/Makefile.in