diff layer/Colour3DPlotLayer.cpp @ 545:be5c35d3f409

* solaris build fixes
author Chris Cannam
date Thu, 10 Sep 2009 18:44:45 +0000
parents 0cc658fe1423
children f4960f8ce798
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Tue Aug 18 11:01:57 2009 +0000
+++ b/layer/Colour3DPlotLayer.cpp	Thu Sep 10 18:44:45 2009 +0000
@@ -30,6 +30,10 @@
 
 #include <cassert>
 
+#ifndef __GNUC__
+#include <alloca.h>
+#endif
+
 //#define DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1
 
 
@@ -1372,7 +1376,11 @@
 
     float epsilon = 0.000001;
 
+#ifdef __GNUC__
     float sxa[w * 2];
+#else
+    float *sxa = (float *)alloca(w * 2 * sizeof(float));
+#endif
     for (int x = 0; x < w; ++x) {
 
         xf = nxf;