svn rev #25200: trunk/src/lib/gssapi/generic/

Russ Allbery rra at stanford.edu
Tue Sep 20 13:17:10 EDT 2011


Greg Hudson <ghudson at MIT.EDU> writes:

> The right thing to do is probably to convert all uses of __FUNCTION__ in
> to __func__ and "#define __func__ __FUNCTION__" in k5-platform.h if
> _WIN32 is defined.  If MSVC ever implements __func__, or if Cygwin/MinGW
> is used to build the code base on Windows, then the define becomes
> vestigial but harmless.

Something like:

/* __func__ is C99, but not provided by all implementations. */
#if __STDC_VERSION__ < 199901L
# if (__GNUC__ >= 2) || defined(_WIN32)
#  define __func__ __FUNCTION__
# else
#  define __func__ "<unknown>"
# endif
#endif

may be slightly more robust, or may just be overkill.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the krbdev mailing list