From: Amos Jeffries Date: Fri, 13 Nov 2009 01:43:54 +0000 (+1300) Subject: Compat: __FUNCTION__ not available on SunStudio X-Git-Tag: SQUID_3_2_0_1~581 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=082d494605d0249847e6df944991928ea5857210;p=thirdparty%2Fsquid.git Compat: __FUNCTION__ not available on SunStudio --- diff --git a/compat/os/solaris.h b/compat/os/solaris.h index b77db6de67..b88a4d2faa 100644 --- a/compat/os/solaris.h +++ b/compat/os/solaris.h @@ -48,11 +48,16 @@ SQUIDCEXTERN int gethostname(char *, int); /* * SunPro CC handles extern inline as inline, PLUS extern symbols. */ - #if !defined(_SQUID_EXTERNNEW_) && defined(__SUNPRO_CC) #define _SQUID_EXTERNNEW_ extern #endif +/* + * SunStudio CC does not define C++ portability API __FUNCTION__ + */ +#if defined(__SUNPRO_CC) && !defined(__FUNCTION__) +#define __FUNCTION__ __func__ +#endif #endif /* _SQUID_SOLARIS_ */ #endif /* SQUID_OS_SOALRIS_H */ diff --git a/src/Debug.h b/src/Debug.h index 1cce7073ea..1a30f17c9a 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -117,12 +117,7 @@ const char * SkipBuildPrefix(const char* path); * * debugs(1,2, HERE << "some message"); */ -#ifdef __FUNCTION__ -#define _SQUID__FUNCTION__ __FUNCTION__ -#else -#define _SQUID__FUNCTION__ "" -#endif -#define HERE SkipBuildPrefix(__FILE__)<<"("<<__LINE__<<") "<<_SQUID__FUNCTION__<<": " +#define HERE SkipBuildPrefix(__FILE__)<<"("<<__LINE__<<") "<<__FUNCTION__<<": " /* * MYNAME is for use at debug levels 0 and 1 where HERE is too messy.