[17183] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

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

daemon@ATHENA.MIT.EDU (Russ Allbery)
Tue Sep 20 13:17:14 2011

From: Russ Allbery <rra@stanford.edu>
To: Greg Hudson <ghudson@mit.edu>
In-Reply-To: <1316537572.718.265.camel@t410> (Greg Hudson's message of "Tue,
	20 Sep 2011 12:52:52 -0400")
Date: Tue, 20 Sep 2011 10:17:10 -0700
Message-ID: <87litj2kx5.fsf@windlord.stanford.edu>
MIME-Version: 1.0
Cc: Ken Raeburn <raeburn@mit.edu>, "krbdev@mit.edu" <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

Greg Hudson <ghudson@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@stanford.edu)             <http://www.eyrie.org/~eagle/>
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post