diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2007-01-22 17:41:17 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2007-01-22 17:41:17 +0000 |
commit | 1ea05e7417f2baa5a78699d438622ab4fcd2f3bb (patch) | |
tree | 13d7a501a2bf1dcb25116efe9669fc6306e34f17 /cad | |
parent | 01e1e516f0e312d17c957ffa271b4cccebfc00e5 (diff) | |
download | pkgsrc-1ea05e7417f2baa5a78699d438622ab4fcd2f3bb.tar.gz |
Get this going with sunpro compilers. Gets rid of
Error: An integer constant expression is required within the array subscript operator.
VS: ----------------------------------------------------------------------
Diffstat (limited to 'cad')
-rw-r--r-- | cad/simian/distinfo | 5 | ||||
-rw-r--r-- | cad/simian/patches/patch-ac | 43 | ||||
-rw-r--r-- | cad/simian/patches/patch-ai | 12 |
3 files changed, 55 insertions, 5 deletions
diff --git a/cad/simian/distinfo b/cad/simian/distinfo index f12a9dddee4..7d73b9fb117 100644 --- a/cad/simian/distinfo +++ b/cad/simian/distinfo @@ -1,13 +1,14 @@ -$NetBSD: distinfo,v 1.4 2005/11/03 19:56:36 rillig Exp $ +$NetBSD: distinfo,v 1.5 2007/01/22 17:41:17 dmcmahill Exp $ SHA1 (simian_12_98.tar.gz) = c7d57087a397970b05195f497c98a058cea1a93a RMD160 (simian_12_98.tar.gz) = 3eecb229dd1fb3c761ee30c9d053673a45782170 Size (simian_12_98.tar.gz) = 18474 bytes SHA1 (patch-aa) = 25b5b63e26478b31956f902eaffd4976d09e1448 SHA1 (patch-ab) = 46c10535420ac625b7548e3b663ef9174d9c34b2 -SHA1 (patch-ac) = 06440a4718542b0c97079d2d47a00a917016510a +SHA1 (patch-ac) = 8f9785a688235689060ec504bc7f24a1f73b117f SHA1 (patch-ad) = e94d69600ef57e16a4d552e2c7e5d152f710c122 SHA1 (patch-ae) = fe34cacf05054a3e8465815aab67eda2e07d9432 SHA1 (patch-af) = 75830be229798faa340f4db9f3fdc2effe30420b SHA1 (patch-ag) = eb94c6b84b55a4a5441953a6031354732f0a5b6c SHA1 (patch-ah) = 853f89961f53b3bd1605d6e9ec15790ef09ca3a6 +SHA1 (patch-ai) = 46046596daeb7f3fd6cb2e8dc9435626e049d430 diff --git a/cad/simian/patches/patch-ac b/cad/simian/patches/patch-ac index a7efec1bcf7..bd3ac39039c 100644 --- a/cad/simian/patches/patch-ac +++ b/cad/simian/patches/patch-ac @@ -1,6 +1,8 @@ -$NetBSD: patch-ac,v 1.3 2005/11/03 19:56:36 rillig Exp $ +$NetBSD: patch-ac,v 1.4 2007/01/22 17:41:17 dmcmahill Exp $ ---- src/plane.cc.orig 1998-12-07 08:28:51.000000000 +0000 +sunpro compilers do not like non-constant array sizes in declarations. + +--- src/plane.cc.orig 1998-12-07 03:28:51.000000000 -0500 +++ src/plane.cc @@ -1,6 +1,7 @@ /* Ribbon segmentation on ground plane */ @@ -10,7 +12,42 @@ $NetBSD: patch-ac,v 1.3 2005/11/03 19:56:36 rillig Exp $ #include "weeks.h" #include "plane.h" #include "../include/linear.h" -@@ -334,11 +335,11 @@ void filplane(Conductor *c) +@@ -100,8 +101,11 @@ void filplane(Conductor *c) + y1=new double[sis->pc+1]; + y2=new double[sis->pc+1]; + int j,i,k; +- struct line line[sis->lc+1]; +- struct Plane Plane[sis->pc+2]; ++ struct line *line; ++ struct Plane *Plane; ++ line = new struct line[sis->lc+1]; ++ Plane = new struct Plane[sis->pc+2]; ++ + for (i=0;i<=sis->lc;i++) line[i].h1=line[i].h2=0.; + i=1; j=1; + double *sort; +@@ -213,8 +217,18 @@ void filplane(Conductor *c) + for (j=1;j<=l[i];j++) LX[i][j]=b[j]; + } + +- struct space su[sis->pc+1][sis->lc+2]; +- struct space sl[sis->pc+1][sis->lc+2]; ++ struct space **su; ++ struct space **sl; ++ su = new struct space *[sis->pc+1]; ++ sl = new struct space *[sis->pc+1]; ++ ++ if (su != NULL && sl != NULL) { ++ for (int i = 0; i < sis->pc+1; i++) { ++ su[i] = new struct space[sis->lc+2]; ++ sl[i] = new struct space[sis->lc+2]; ++ } ++ } ++ + for (i=1;i<=sis->pc;i++) { + for (j=1;j<=u[i]/2;j++) su[i][j].hl=su[i][j].hr=0.; + for (j=1;j<=l[i]/2;j++) sl[i][j].hl=sl[i][j].hr=0.; +@@ -334,11 +348,11 @@ void filplane(Conductor *c) for (i=1;i<=sis->pc;i++) { for (j=1;j<=l[i];j++) { if (l[i]!=2) diff --git a/cad/simian/patches/patch-ai b/cad/simian/patches/patch-ai new file mode 100644 index 00000000000..1c50db5ce36 --- /dev/null +++ b/cad/simian/patches/patch-ai @@ -0,0 +1,12 @@ +$NetBSD: patch-ai,v 1.1 2007/01/22 17:41:17 dmcmahill Exp $ + +fix prototype to match what the function actually is. Without this +linking fails on sunpro + +--- src/incident.h.orig 1998-12-07 03:28:51.000000000 -0500 ++++ src/incident.h +@@ -1,3 +1,3 @@ + complex **Zequ(Conductor *c,int numsgn,int Nc); +-complex **ysort(int Nc,int n,int m); ++void ysort(int Nc,int n,int m); + |