[AG-TECH] Re: vic with gcc3

Christoph Willing chris at vislab.usyd.edu.au
Fri Aug 8 18:35:04 CDT 2003


On Sat, 2003-08-09 at 09:17, Stuart Levy wrote:
> When you wrote
> 
>    #if (__GNUC__ <= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
> 
> didn't you mean
> 
>    #if (__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
> 
> ?  The <= 3 condition would make it apply for all versions of
> gcc so far -- not just for >=2.96 and >=3.x.  Right?


Yes, of course you're right Stuart. It should be
#if (__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)


So, the correct full story is to manually edit ag-vic/vic/main.cpp at
line 182
from
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 96
to
#if (__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)


Or copy following patch to ag-vic directory as file vic-gcc3.patch, then
run command
    patch -p0 <vic-gcc3.patch


Then build as normal.

chris

## (corrected) patch for gcc3 ##### Don't include this line! ##
--- vic/main.cpp.orig   2003-08-08 21:53:49.000000000 +1000
+++ vic/main.cpp        2003-08-08 21:54:17.000000000 +1000
@@ -179,7 +179,7 @@
 #ifdef __SUNPRO_CC
 #define SIGARGS int arg
 #else
-#if __GNUC__ == 2 && __GNUC_MINOR__ >= 96
+#if (__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
 #define SIGARGS int
 #else
 #define SIGARGS ... 
################## Don't include this line ! ##################

-- 
Chris Willing                      Telephone   (61-2) 9351 3914
VisLab, A28                        Facsimile   (61-2) 9351 7726
University of Sydney
NSW 2006 Australia                http://www.vislab.usyd.edu.au





More information about the ag-tech mailing list