From 9cef8ef52b51ec39d9d38ec206824ae81e12edfa Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 24 Jul 2002 18:18:07 +0000 Subject: 2002-07-24 Jeff Johnston * libc/include/signal.h (SIG_IGN, SIG_DFL, SIG_ERR): Change to use _sig_func_ptr type casted constants. (_sig_func_ptr): Typedef moved to sys/signal.h. * libc/include/sys/signal.h (_sig_func_ptr): Typedef added. For __rtems, use POSIX definition, otherwise default to ANSI. * libc/sys/linux/sys/signal.h (_sig_func_ptr): Typedef added. --- newlib/libc/include/sys/signal.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'newlib/libc/include/sys/signal.h') diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h index 11d370ac4..dde3aaa04 100644 --- a/newlib/libc/include/sys/signal.h +++ b/newlib/libc/include/sys/signal.h @@ -84,13 +84,15 @@ typedef struct { * application should not use both simultaneously. */ +typedef void (*_sig_func_ptr)(); + struct sigaction { int sa_flags; /* Special flags to affect behavior of signal */ sigset_t sa_mask; /* Additional set of signals to be blocked */ /* during execution of signal-catching */ /* function. */ union { - void (*_handler)(); /* SIG_DFL, SIG_IGN, or pointer to a function */ + _sig_func_ptr _handler; /* SIG_DFL, SIG_IGN, or pointer to a function */ #if defined(_POSIX_REALTIME_SIGNALS) void (*_sigaction)( int, siginfo_t *, void * ); #endif @@ -104,9 +106,11 @@ struct sigaction { #else +typedef void (*_sig_func_ptr)(int); + struct sigaction { - void (*sa_handler)(int); + _sig_func_ptr sa_handler; sigset_t sa_mask; int sa_flags; }; -- cgit v1.2.3