POV-Ray : Newsgroups : povray.unix : Compiling 3.5 on IRIX 6.5 : Re: Compiling 3.5 on IRIX 6.5 Server Time
28 Jul 2024 10:18:54 EDT (-0400)
  Re: Compiling 3.5 on IRIX 6.5  
From: Rohan Hart
Date: 7 Aug 2002 00:44:52
Message: <mzvg6ns2ez.fsf@zefiro.peace.co.nz>
Ken Cecka <cec### [at] alumniwashingtonedu> writes:

> 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.
> 
> Ken

From 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);
     #endif

So 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


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.