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/signal.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'newlib/libc/include/signal.h') diff --git a/newlib/libc/include/signal.h b/newlib/libc/include/signal.h index e1170a234..1b3b57b49 100644 --- a/newlib/libc/include/signal.h +++ b/newlib/libc/include/signal.h @@ -8,17 +8,9 @@ _BEGIN_STD_C typedef int sig_atomic_t; /* Atomic entity type (ANSI) */ -#if defined(__STDC__) || defined(__cplusplus) -#define SIG_DFL ((void (*)(int))0) /* Default action */ -#define SIG_IGN ((void (*)(int))1) /* Ignore action */ -#define SIG_ERR ((void (*)(int))-1) /* Error return */ -#else -#define SIG_DFL ((void (*)())0) /* Default action */ -#define SIG_IGN ((void (*)())1) /* Ignore action */ -#define SIG_ERR ((void (*)())-1) /* Error return */ -#endif - -typedef void (*_sig_func_ptr) (int); +#define SIG_DFL ((_sig_func_ptr)0) /* Default action */ +#define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */ +#define SIG_ERR ((_sig_func_ptr)-1) /* Error return */ struct _reent; -- cgit v1.2.3