[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: convert_sym.c
User: danmc
Date: 06/12/04 17:10:09
Modified: . convert_sym.c
Log:
work around some gcc-isms to make this build with the sun studio compilers
Revision Changes Path
1.14 +23 -4 eda/geda/gaf/utils/src/convert_sym.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: convert_sym.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/utils/src/convert_sym.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- convert_sym.c 2 Aug 2006 13:34:19 -0000 1.13
+++ convert_sym.c 4 Dec 2006 22:10:09 -0000 1.14
@@ -33,7 +33,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
*
- * $Id: convert_sym.c,v 1.13 2006/08/02 13:34:19 mike Exp $
+ * $Id: convert_sym.c,v 1.14 2006/12/04 22:10:09 danmc Exp $
*/
#include <stdio.h>
@@ -50,11 +50,30 @@
#include <dmalloc.h>
#endif
-#if 0 /* removed by AVH just to make a -Wall -Werror happy */
+/* __FUNCTION__ seems to be a gcc thing */
+#ifndef __GNUC__
+#define __FUNCTION1(a,b) a ":" #b
+#define __FUNCTION2(a,b) __FUNCTION1(a,b)
+#define __FUNCTION__ __FUNCTION2(__FILE__,__LINE__)
+#endif
+
+/*
+ * make it so we can use __attribute__((unused)) on gcc without
+ * breaking non-gcc
+ */
+#ifndef GCC_VERSION
+#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
+#endif /* GCC_VERSION */
+
+#if GCC_VERSION > 2007
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
#ifndef lint
-static char vcid[] = "$Id: convert_sym.c,v 1.13 2006/08/02 13:34:19 mike Exp $";
+static char vcid[] ATTRIBUTE_UNUSED = "$Id: convert_sym.c,v 1.14 2006/12/04 22:10:09 danmc Exp $";
#endif /* lint */
-#endif
#ifndef OPTARG_IN_UNISTD
extern char *optarg;
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs