From: Francesco Chemolli Date: Wed, 4 Nov 2009 16:20:53 +0000 (+0100) Subject: Portability fix: __FUNCTION__ is not available on all preprocessors. X-Git-Tag: SQUID_3_2_0_1~616 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4d4688641b4878cf8968bab71cbf72ef8427cec;p=thirdparty%2Fsquid.git Portability fix: __FUNCTION__ is not available on all preprocessors. --- diff --git a/src/Debug.h b/src/Debug.h index 1a30f17c9a..2f4fb433ec 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -117,7 +117,12 @@ const char * SkipBuildPrefix(const char* path); * * debugs(1,2, HERE << "some message"); */ -#define HERE SkipBuildPrefix(__FILE__)<<"("<<__LINE__<<") "<<__FUNCTION__<<": " +#ifdef __FUNCTION__ +#define _SQUID__FUNCTION__ __FUNCTION__ +#else +#define _SQUID__FUNCTION__ "(function unknown)" +#endif +#define HERE SkipBuildPrefix(__FILE__)<<"("<<__LINE__<<") "<<_SQUID__FUNCTION__<<": " /* * MYNAME is for use at debug levels 0 and 1 where HERE is too messy.