autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

signal handler definition


From: Richard Bos
Subject: signal handler definition
Date: Wed, 30 Jul 2003 21:37:18 +0200
User-agent: KMail/1.5

Hello,

I'm putting some effort in getting a database application converted from its 
own build environment to the autotools environment.  The application itself 
runs already on many different systems.  As the application has quite some 
files and some build tricks it is quite a challenge to get this done. Today 
my first question to this list, and most likely more will follow if you don't 
mind. 

My first question to you: the application's makefiles use a definition called 
SIGFUNC which must be set manually to void or int depending on the system.  
Is there a similar autoconf defition (macro) that can be used to do this 
automatically?

SIGFUNC: Portability definition to get rid of warnings from
         compiler about signal handler functions.  On most
         systems expect signal handlers to return an int
         (which is ignored).  On some machines (sun, 3b2)
         signal handlers are expected to be defined as void.
         If your machine expects a void, add "-DSIGFUNC=void"
         to the DEFS macro.]

It is used as follows:

static SIGFUNC
intr(unused)
int unused;
{
        /* ignore new signals */
        (void) signal(SIGINT,SIG_IGN);

-- 
Richard Bos
Without a home the journey is endless





reply via email to

[Prev in Thread] Current Thread [Next in Thread]