Rohan Hart wrote:
Ken Cecka <ceckak@alumni.washington.edu> writes:Tried -D_XOPEN_SOURCE and then got the following error:> That's pretty wierd! Not really familiar with IRIX, but I though it was
> standard for signal handlers to be called with an integer parameter - maybe
> they just have their protypes mixed up. You could try explicit casting to
> make the compiler happy:
>
> signal(SIGTERM, ((void (*)()) UNIX_Abort_Handler);
>
> ...although no promises on whether the signal handling will behave as
> expected.
>
> KenFrom the IRIX signal(2) manpage
C:
void (*signal (int sig, void (*func)()))();
C++:
void (*signal (int sig, void (*func)(int)))(int);#if _XOPEN_SOURCE
void (*signal (int sig, void (*func)(int)))(int);
#endifSo it looks like an additional test in the configure script and
setting _XOPEN_SOURCE should get the right proto. Not that I've
tested this nor checked with other things _XOPEN_SOURCE affects.Alternatively...
#define _BSD_SIGNALS or _BSD_COMPAT before including <signal.h>
and you get the slightly different and non-SYSV-compatible BSD proto:
int (*signal(int sig, int (*func)(int, ...)))(int, ...);Rohan
g++ -D_XOPEN_SOURCE -DPREFIX=\"/home/didonato/bin/povray35\" -DPOV_LIB_DIR=\"/home/didonato/bin/povray35/share/povray-3.5\"
-DCOMPILER_VER=\".Linux.gcc\" -DSYSCONFDIR=\"/home/didonato/bin/povray35/etc\"
-I/usr/freeware/include `if [ "Xgcc" = "Xgcc" ]; then echo "-Wno-multichar";
fi ` -c unix.cpp
unix.cpp:297: aggregate `timeval hstart' has incomplete type and cannot
be
initialized
unix.cpp:297: aggregate `timeval hstop' has incomplete type and cannot
be
initialized
unix.cpp: In function `void UNIX_Timer_Start()':
unix.cpp:500: `gettimeofday' undeclared (first use this function)
unix.cpp:500: (Each undeclared identifier is reported only once for
each
function it appears in.)
unix.cpp: At global scope:
unix.cpp:297: storage size of `hstart' isn't known
unix.cpp:297: storage size of `hstop' isn't known
gmake[1]: *** [unix.o] Error 1
gmake[1]: Leaving directory `/home/didonato/temp/povray-3.50a/src'
gmake: *** [all-recursive] Error 1
Mike
-- ********************************* Michael DiDonato, PhD The Scripps Research Institute Department of Molecular Biology Maildrop MB4 10550 North Torrey Pines Road La Jolla, CA, 92037 Tel: (858) 784-9261 FAX: (858) 784-2277 http://www.scripps.edu/~didonato *********************************