Re: Bug on Solaris 2.0

Writes Pedro:

>I got the following problem:
>Architecture: 		Sun Sparc
>OS: 			Solaris 2.0
>File: 			sgCallGraph.C
>Output from "Make install"
>g++ -I../../h -I../../lib/include -g -c  sgCallGraph.C
>In file included from /usr/include/sys/time.h:237,
>                 from /usr/compsci/gnu/lib/g++-include/sys/time.h:25,
>                 from sgCallGraph.C:104:
>/usr/compsci/gnu/lib/g++-include/time.h:83: conflicting types for `int gettimeofday(struct timeval *, struct timezone *)'
>/usr/include/sys/time.h:220: previous declaration as `int gettimeofday(struct timeval *, void *)'
>Quick fix: Comment out the include line the the use of gettimeofday in the 

Actually, I would like to amend that a little. First, in the latest
version of the file Sage++/extentions/sgCallGraph.C (which Pedro may or
may not have, but I suspect he doesn't), all use of gettimeofday() is
exclusively in sections bracketed by #if DEBUG ... #endif, with DEBUG
being 0 by default. The DEBUG code is meaningful only on Solaris (this
is documented in the code) with SUNpro CC, for reasons having to do with
the use of gettimeofday(). Consequently, most people should not run into
this problem by compiling out-of-the-box code, at least not when 1.9
comes out.

Second, judging from the error messages, this is really a problem with the
g++ include file.

That said, Pedro's fix should work fine.