Patch to allow compilation of silc-toolkit on Solaris with sun cc

Chad Harp <[email protected]> Tue, 30 Dec 2008 13:14:23 -0600
Newsgroups gmane.network.silc.devel
Message-ID <[email protected]>
The following patch allows silc-toolkit to be compliled on Solaris using 
Sun Studio cc.

Ideally all instances of __FUNCTION__ should be replaced with __func__ 
(see http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Function-Names.html), 
but until that happens this adds a #define __FUNCTION__ __func__ for Sun 
compilers only.

diff -rud silc-toolkit-1.1.8.o/lib/silcutil/silclog_i.h 
silc-toolkit-1.1.8/lib/silcutil/silclog_i.h
--- silc-toolkit-1.1.8.o/lib/silcutil/silclog_i.h       2008-12-30 
12:56:47.527964480 -0600
+++ silc-toolkit-1.1.8/lib/silcutil/silclog_i.h 2008-12-30 
13:01:36.261545042 -0600
@@ -24,9 +24,11 @@
  #error "Do not include this header directly"
  #endif

-#if defined(SILC_WIN32)
  #ifndef __FUNCTION__
+#if defined(SILC_WIN32)
  #define __FUNCTION__ __FILE__
+#elif defined(__SUNPRO_C)
+#define __FUNCTION__ __func__
  #endif
  #endif

_______________________________________________________________________
Info:    https://lists.silcnet.org/mailman/listinfo/silc-announce
Archive: https://lists.silcnet.org/pipermail/silc-announce
FAQ:     http://silcnet.org/support/faq/