summaryrefslogtreecommitdiff
path: root/cad/gnetlist/patches/patch-aa
blob: e1d0ba69872f075eeb93a83babe5c8a6ce8dbc14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-aa,v 1.11 2006/12/21 00:19:54 dmcmahill Exp $

work around compilers without __FUNCTION__ like sun studio compilers.
Patch is already in the upstream sources.

--- utils/mk_verilog_syms.c.orig	2005-02-04 18:14:31.000000000 -0500
+++ utils/mk_verilog_syms.c
@@ -46,6 +46,12 @@
 #define CYAN		6
 #define GREY		7
 
+/* __FUNCTION__ seems to be a gcc extension */
+#ifndef __GNUC__
+#define __FUNCTION1(a,b) a ":" #b
+#define __FUNCTION2(a,b) __FUNCTION1(a,b)
+#define __FUNCTION__ __FUNCTION2(__FILE__,__LINE__)
+#endif
 
 /* external prototypes */
 int GetStringDisplayLength(char *str,int font_size);  /* char_width.c */