diff --git a/ChangeLog b/ChangeLog index 9ca199d45d..bbd62c3cc0 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11916,3 +11916,6 @@ kfazz (2016-06). * arch/arm/src/stm32: Add support for the STM32F105R. From Konstantin Berezenko (2016-06-06). + * include/signal.h: Change type of SIG_ERR, SIG_IGN, ... to + _sa_handler_t. They type void does not work with the IAR toolchain. + From Aleksandr Vyhovanec (2016-06-07). diff --git a/include/signal.h b/include/signal.h index 12585c91e3..7cfc93b136 100644 --- a/include/signal.h +++ b/include/signal.h @@ -175,22 +175,21 @@ /* Special values of of sa_handler used by sigaction and sigset. They are all * treated like NULL for now. This is okay for SIG_DFL and SIG_IGN because * in NuttX, the default action for all signals is to ignore them. - * - * REVISIT: Need to distinguish the value of SIG_HOLD. It is needed in the - * implementation of sigset() but would need to be recognized in all signal - * functions that deal with signal disposition. */ -#define SIG_ERR ((CODE void *)-1) /* And error occurred */ -#define SIG_DFL ((CODE void *)0) /* Default is SIG_IGN for all signals */ -#define SIG_IGN ((CODE void *)0) /* Ignore the signal */ -#define SIG_HOLD ((CODE void *)1) /* Used only with sigset() */ +#define SIG_ERR ((_sa_handler_t)-1) /* And error occurred */ +#define SIG_DFL ((_sa_handler_t)0) /* Default is SIG_IGN for all signals */ +#define SIG_IGN ((_sa_handler_t)0) /* Ignore the signal */ +#define SIG_HOLD ((_sa_handler_t)1) /* Used only with sigset() */ /******************************************************************************** * Public Type Definitions ********************************************************************************/ -/* This defines a set of 32 signals (numbered 0 through 31). */ +/* This defines a set of 32 signals (numbered 0 through 31). + * REVISIT: Signal 0 is, however, not generally usable since that value has + * special meaning in some circumstances (e.g., kill()). + */ typedef uint32_t sigset_t; /* Bit set of 32 signals */ #define __SIGSET_T_DEFINED 1