From 6ac213d62275676c1ba79039c6fd2683e2877662 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Mon, 14 May 2018 21:37:11 +0800 Subject: Add GCC version detection. Add cconfig.h file for different version of GCC, which is automatically detected and generated by scons script. --- include/libc/libc_signal.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/libc/libc_signal.h b/include/libc/libc_signal.h index dabcad1a34..d3050bfb54 100644 --- a/include/libc/libc_signal.h +++ b/include/libc/libc_signal.h @@ -25,12 +25,15 @@ #ifndef LIBC_SIGNAL_H__ #define LIBC_SIGNAL_H__ - #ifdef __cplusplus extern "C" { #endif -#ifndef HAVE_SYS_SIGNALS +#ifdef HAVE_CCONFIG_H +#include +#endif + +#ifndef HAVE_SIGVAL /* Signal Generation and Delivery, P1003.1b-1993, p. 63 NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and sigev_notify_attributes to the sigevent structure. */ @@ -40,7 +43,9 @@ union sigval int sival_int; /* Integer signal value */ void *sival_ptr; /* Pointer signal value */ }; +#endif +#ifndef HAVE_SIGEVENT struct sigevent { int sigev_notify; /* Notification type */ @@ -50,12 +55,13 @@ struct sigevent /* Notification function */ void *sigev_notify_attributes; /* Notification Attributes, really pthread_attr_t */ }; +#endif +#ifndef HAVE_SIGINFO struct siginfo { - rt_uint8_t si_signo; - rt_uint8_t si_code; - rt_int16_t si_errno; + rt_uint16_t si_signo; + rt_uint16_t si_code; union sigval si_value; }; -- cgit v1.3.1