]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Compat: __FUNCTION__ not available on SunStudio
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 13 Nov 2009 01:43:54 +0000 (14:43 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 13 Nov 2009 01:43:54 +0000 (14:43 +1300)
compat/os/solaris.h
src/Debug.h

index b77db6de67c419af98fdf158e4456113ef9b4edb..b88a4d2faa8f1bdb82f70d37acba0b3da1f795e4 100644 (file)
@@ -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 */
index 1cce7073ea08c0573a995234c7fd412e72406c97..1a30f17c9a2c22c4aba80c26fd6ccf301823b5c9 100644 (file)
@@ -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.