pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libopensync-0.22 with sun c



libopensync breaks with sun studio c because there is no __FUNCTION__ in it. A equivalent is called __func__ (see http://docs.sun.com/app/docs/doc/819-5265/bjaze?a=view ).

Attached is a little patch which fixes that.
$NetBSD$

--- opensync/opensync_internals.h.orig  2007-03-27 13:49:18.000000000 +0200
+++ opensync/opensync_internals.h
@@ -13,6 +13,10 @@
 #include <errno.h>
 extern int errno;
 
+#ifndef __FUNCTION__
+#define __FUNCTION__ __func__
+#endif
+
 #define osync_assert(x) do {                                                   
        \
   if (!(x)) {                                                                  
        \
     fprintf(stderr, "%s:%i:E:%s: Assertion \"" #x "\" failed\n", __FILE__, 
__LINE__, __FUNCTION__); \


Home | Main Index | Thread Index | Old Index