Subject: sigaction handler prototype
To: None <tech-pkg@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-pkg
Date: 02/12/2004 01:04:04
In my experience, it's rather easier to get something to compile than to
get it to run.  This is especially true when one is unsure what to do....

I'm not all that familiar with portable signal handling, and could use
some advice.  

I am undertaking to add the Firebird database to NetBSD, or NetBSD to
Firebird, depending on how you look at it.  Two days into the effort, I
encounter this bit of header file:

typedef struct sig {
	struct sig* sig_next;
	int sig_signal;
	union {
		FPTR_VOID_PTR user;
		void (*client) (int, siginfo_t*, void*);
		FPTR_INT_VOID_PTR informs;
		FPTR_VOID untyped;
	} sig_routine;
	void* sig_arg;
	USHORT sig_flags;
} *SIG;

NetBSD 1.6 doesn't define siginfo_t; its signal handler is described in
K&R form:

           void
           handler(sig, code, scp)
                   int sig, code;
                   struct sigcontext *scp;

The project has a place for OS-specific definitions.  What is considered
good form here?  I'm going with:

	typedef int siginfo_t;

but maybe there's a better way?  

Thanks.

--jkl