Skip Menu |

Subject: namespace cleanliness in k5-platform.h
k5-platform.h contains a number of instances of JOIN2(foo, __bar). This
can cause a macro in the reserved namespace to get expanded. It might
be better to make a macro such as

#define JOINX__Y_2(x,y) x ## _ ## _ ## y
#define JOINX__Y(x,y) JOINX__Y_2(x,y)

or something like that, so that macros in the reserved namespace don't
get expanded. The example above doesn't use x ## __ ## y because that
might still invoke undefined behavior. (prefixes _[A-Z_] are reserved
for any use, while prefixes _[^A-Z_] are only reserved for file scope
ordinary and tag identifiers. It's conceivable, though perhaps
unlikely, that an compiler vendor could implement a preprocessor
extension using identifiers with a prefix of the form _[A-Z_], e.g., the
__VA_ARGS__ facility in c99.)
Subject: CVS Commit
* k5-platform.h (JOIN4, JOIN4_2, JOIN3, JOIN3_2): Unused macros deleted.
(JOIN__2, JOIN__2_2): Renamed from JOIN2 and JOIN2_2. Insert two underscores
between the tokens supplied. All uses changed to use new macros, and not use
identifiers with leading underscores.

To generate a diff of this commit:

cvs diff -r1.428 -r1.429 krb5/src/include/ChangeLog
cvs diff -r1.7 -r1.8 krb5/src/include/k5-platform.h