From 5c78499ae2ae6ac28854b43a1ad73d917b40c62d Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 14 Mar 2016 16:39:56 -0500 Subject: Feature test macros overhaul: signal.h Use proper internal macros for BSD sig_t and GNU sighandler_t. sigaltstack and friends are XSI even in SUSv4 but in glibc are nonetheless handled as POSIX.1-2008 (not 2001). The requirement for the ucontext_t typedef in signal.h was XSI prior to POSIX.1-2008. Signed-off-by: Yaakov Selkowitz --- newlib/libc/include/signal.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'newlib/libc/include/signal.h') diff --git a/newlib/libc/include/signal.h b/newlib/libc/include/signal.h index 8c50a2eb3..0324ae71a 100644 --- a/newlib/libc/include/signal.h +++ b/newlib/libc/include/signal.h @@ -2,15 +2,18 @@ #define _SIGNAL_H_ #include "_ansi.h" +#include #include _BEGIN_STD_C typedef int sig_atomic_t; /* Atomic entity type (ANSI) */ -#ifndef _POSIX_SOURCE +#if __BSD_VISIBLE typedef _sig_func_ptr sig_t; /* BSD naming */ +#endif +#if __GNU_VISIBLE typedef _sig_func_ptr sighandler_t; /* glibc naming */ -#endif /* !_POSIX_SOURCE */ +#endif #define SIG_DFL ((_sig_func_ptr)0) /* Default action */ #define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */ -- cgit v1.2.3