From dbf98ecc8936e0959b473efe6f70bc7a9eeb9c7c Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 20 Dec 2005 12:02:15 +0000 Subject: Fix C99/GCC 3.4+ issues: C99 math macros, test for C99 math macros, access of template members without template argument, explicit constructor vs. copy constructor. --- cad/gnucap/distinfo | 8 ++++++-- cad/gnucap/patches/patch-ab | 22 ++++++++++++++++++++++ cad/gnucap/patches/patch-af | 14 +++++++++++--- cad/gnucap/patches/patch-ag | 15 +++++++++++++++ cad/gnucap/patches/patch-ah | 15 +++++++++++++++ cad/gnucap/patches/patch-ai | 13 +++++++++++++ 6 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 cad/gnucap/patches/patch-ab create mode 100644 cad/gnucap/patches/patch-ag create mode 100644 cad/gnucap/patches/patch-ah create mode 100644 cad/gnucap/patches/patch-ai (limited to 'cad') diff --git a/cad/gnucap/distinfo b/cad/gnucap/distinfo index 9ae0f604295..6f35c585e0f 100644 --- a/cad/gnucap/distinfo +++ b/cad/gnucap/distinfo @@ -1,10 +1,14 @@ -$NetBSD: distinfo,v 1.8 2005/02/23 14:59:24 agc Exp $ +$NetBSD: distinfo,v 1.9 2005/12/20 12:02:15 joerg Exp $ SHA1 (gnucap-0.34.tar.gz) = 2094c3b9d6bcc1c036ec2cef5ff35216da24868a RMD160 (gnucap-0.34.tar.gz) = 41661927ca5fc1b9ff358ada007c8ff5eb15c9cd Size (gnucap-0.34.tar.gz) = 1412004 bytes SHA1 (patch-aa) = 404d6f926f4985a7d117e1361e9c2c9cabd6323b +SHA1 (patch-ab) = 62d69152ebeb23257cc08727bbe03ed9b1251469 SHA1 (patch-ac) = b87c6eb33b427a154b03802e7633048b4ed003ab SHA1 (patch-ad) = 58ddab0864cc950e39f46c2230da2280ab26e19c SHA1 (patch-ae) = 1104114b205ed3d520ca56c39e453f82a18b1d52 -SHA1 (patch-af) = c3451399e147e5ab96a6764882224e6a98fff99f +SHA1 (patch-af) = 07811937aa01335ef461a27dae4f7f36c959a46a +SHA1 (patch-ag) = f40f5bdb386bb364cd7277d47ae8eaf1ff319539 +SHA1 (patch-ah) = 16a96aafa9cdc2c3354c90ea7a93ee912f82b179 +SHA1 (patch-ai) = 8bf5cf190e02026b52fb7d21b360681a0324fdc6 diff --git a/cad/gnucap/patches/patch-ab b/cad/gnucap/patches/patch-ab new file mode 100644 index 00000000000..8f7600ff8e7 --- /dev/null +++ b/cad/gnucap/patches/patch-ab @@ -0,0 +1,22 @@ +$NetBSD: patch-ab,v 1.3 2005/12/20 12:02:15 joerg Exp $ + +--- modelgen/mg_.h.orig 2005-12-13 15:26:08.000000000 +0000 ++++ modelgen/mg_.h +@@ -118,7 +118,7 @@ class List + } + T* p = new T(file); + {if (!file.stuck(&here)) { +- _list.push_back(p); ++ this->_list.push_back(p); + }else { + delete p; + file.warn(0, "not valid here"); +@@ -137,7 +137,7 @@ class Collection + int here = file.cursor(); + T* m = new T(file); + {if (!file.stuck(&here)) { +- _list.push_back(m); ++ this->_list.push_back(m); + }else{ + delete m; + file.warn(0, "what's this??"); diff --git a/cad/gnucap/patches/patch-af b/cad/gnucap/patches/patch-af index bf99aaa2d01..85b25bdea9e 100644 --- a/cad/gnucap/patches/patch-af +++ b/cad/gnucap/patches/patch-af @@ -1,8 +1,8 @@ -$NetBSD: patch-af,v 1.1 2004/03/21 13:10:56 dmcmahill Exp $ +$NetBSD: patch-af,v 1.2 2005/12/20 12:02:15 joerg Exp $ ---- src/l_ftos.cc.orig Sun Feb 1 21:13:19 2004 +--- src/l_ftos.cc.orig 2004-02-01 21:13:19.000000000 +0000 +++ src/l_ftos.cc -@@ -36,6 +36,8 @@ +@@ -36,8 +36,16 @@ * there is a finite pool, so repeated calls work, to a point. * after that, the space is overwritten, every POOLSIZE calls */ @@ -10,4 +10,12 @@ $NetBSD: patch-af,v 1.1 2004/03/21 13:10:56 dmcmahill Exp $ +#include #include "l_lib.h" #include "constant.h" ++ ++#if defined(_GLIBCXX_USE_C99_MATH) && !defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) ++using std::isinf; ++using std::isnan; ++#endif ++ /*--------------------------------------------------------------------------*/ + char* utos(unsigned,char*,int); + char* itos(int,char*,int,int); diff --git a/cad/gnucap/patches/patch-ag b/cad/gnucap/patches/patch-ag new file mode 100644 index 00000000000..8a6354c91bf --- /dev/null +++ b/cad/gnucap/patches/patch-ag @@ -0,0 +1,15 @@ +$NetBSD: patch-ag,v 1.1 2005/12/20 12:02:15 joerg Exp $ + +--- src/test_isnan.cc.orig 2005-12-13 15:36:50.000000000 +0000 ++++ src/test_isnan.cc +@@ -1,5 +1,7 @@ +-#include "md.h" +-void foo() ++#include ++ ++double val; ++int foo() + { +- double x = isnan(2.3); ++ return isnan(val); + } diff --git a/cad/gnucap/patches/patch-ah b/cad/gnucap/patches/patch-ah new file mode 100644 index 00000000000..c465030b937 --- /dev/null +++ b/cad/gnucap/patches/patch-ah @@ -0,0 +1,15 @@ +$NetBSD: patch-ah,v 1.1 2005/12/20 12:02:15 joerg Exp $ + +--- src/test_isinf.cc.orig 2005-12-13 15:37:57.000000000 +0000 ++++ src/test_isinf.cc +@@ -1,5 +1,7 @@ +-#include "md.h" +-void foo() ++#include ++ ++double val; ++int foo() + { +- double x = isnan(2.3); ++ return isinf(val); + } diff --git a/cad/gnucap/patches/patch-ai b/cad/gnucap/patches/patch-ai new file mode 100644 index 00000000000..ef66673b52a --- /dev/null +++ b/cad/gnucap/patches/patch-ai @@ -0,0 +1,13 @@ +$NetBSD: patch-ai,v 1.1 2005/12/20 12:02:15 joerg Exp $ + +--- src/m_cpoly.h.orig 2005-12-19 16:50:18.000000000 +0000 ++++ src/m_cpoly.h +@@ -67,7 +67,7 @@ struct CPOLY1{ /* first order polynomia + double c0; /* f(x) - x*f'(x), or f0 - x*f1 */ + double c1; /* the first derivative */ + explicit CPOLY1() : x(0), c0(0), c1(0) {} +- explicit CPOLY1(const CPOLY1& p) : x(p.x), c0(p.c0), c1(p.c1){untested();} ++ CPOLY1(const CPOLY1& p) : x(p.x), c0(p.c0), c1(p.c1){untested();} + explicit CPOLY1(double X,double C0,double C1) : x(X), c0(C0), c1(C1) {} + explicit CPOLY1(const FPOLY1& p); + -- cgit v1.2.3