> http://build-failures.rhaalovely.net/sparc64/2019-07-11/cad/gnucap.log
> http://build-failures.rhaalovely.net/powerpc/2019-07-14/cad/gnucap.log

"Since C++11, auto is no longer a storage class specifier; it is used
to indicate type deduction." [0]

This explains the error message, as gcc-8 uses C++14 by default.
'adata' is supposed to be char as 'emptydata' is, so i've just removed
auto. Clang must have been permissive on that one.

This fixes the build on macppc [1], the tests are running fine as well.
This causes no issues on amd64.

Comments/feedback are welcome!

Charlène. 


[0] https://en.cppreference.com/w/cpp/language/storage_duration
[1] https://bin.charlenew.xyz/gnucap.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/cad/gnucap/Makefile,v
retrieving revision 1.20
diff -u -p -u -p -r1.20 Makefile
--- Makefile    12 Jul 2019 20:43:45 -0000      1.20
+++ Makefile    28 Jul 2019 16:02:57 -0000
@@ -6,7 +6,7 @@ NOT_FOR_ARCHS=          m88k
 COMMENT=               Gnu Circuit Analysis Package
 
 DISTNAME=              gnucap-0.35
-REVISION=              8
+REVISION=              9
 CATEGORIES=            cad
 
 HOMEPAGE=              http://www.gnucap.org/
Index: patches/patch-src_plot_cc
===================================================================
RCS file: patches/patch-src_plot_cc
diff -N patches/patch-src_plot_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_plot_cc   28 Jul 2019 16:02:57 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+ports-gcc fix for
+error: two or more data types in declaration of 'adata'
+
+Index: src/plot.cc
+--- src/plot.cc.orig
++++ src/plot.cc
+@@ -230,7 +230,7 @@ static void plotarg(
+       double yhi,
+       double zhi)
+ {
+-  auto char adata[MAXWIDTH+1];     /* actual data. copy emptydata, insert */
++  char adata[MAXWIDTH+1];     /* actual data. copy emptydata, insert */
+   char *xxs;                               /* string representation of xx */
+   memcpy(adata, emptydata, MAXWIDTH); /* copy prototype */
+   xxs = ftos( xx, 11, 5, IO::formaat );

Reply via email to