Hi,

building radiance fails with gcc >=4.5 with
rhdobj.c:221:15: error: storage size of 'neighlist' isn't constant

which is due to the fact that using a define like
#define NAZI            ((int)(PI/2.*NALT+.5))
to define the size of an array is not allowed - gcc 4.5 implements various
details of the standard stricter than versions before.

Attached patch fixes that, not sure if it is the best way to handle it - I
didn't check if NAZI or NALT will be redfined somewhere. The issue should be
fixed in some way, though.

Cheers,

Bernd

-- 
 Bernd Zeimetz                            Debian GNU/Linux Developer
 http://bzed.de                                http://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F
--- a/src/hd/rhdobj.c
+++ b/src/hd/rhdobj.c
@@ -34,7 +34,8 @@ void  (*dobj_lightsamp)(COLR clr, FVECT d
 #define NALT           11              /* # sampling altitude angles */
 #endif
 #ifndef NAZI
-#define NAZI           ((int)(PI/2.*NALT+.5))
+//#define NAZI         ((int)(PI/2.*NALT+.5))
+#define NAZI           17
 #endif
 
 typedef struct dlights {
_______________________________________________
Radiance-dev mailing list
Radiance-dev@radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-dev

Reply via email to