aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-02-12 07:38:19 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2016-02-12 07:38:19 +0000
commit90edf67ecf94bce51e6c823ee2a10a7b65f416f8 (patch)
tree783f901008bac7a377fe9c52843c1f80c9e84512 /include
parent411c83ccd691eec84686df54c5cc7ee3cdbeb265 (diff)
downloadsrc-90edf67ecf94bce51e6c823ee2a10a7b65f416f8.tar.gz
src-90edf67ecf94bce51e6c823ee2a10a7b65f416f8.zip
POSIX states that #include <signal.h> shall make both mcontext_t and
ucontext_t available. Our code even has XXX comment about this. Add a bit of compliance by moving struct __ucontext definition into sys/_ucontext.h and including it into signal.h and sys/ucontext.h. Several machine/ucontext.h headers were changed to use namespace-safe types (like uint64_t->__uint64_t) to not depend on sys/types.h. struct __stack_t from sys/signal.h is made always visible in private namespace to satisfy sys/_ucontext.h requirements. Apparently mips _types.h pollutes global namespace with f_register_t type definition. This commit does not try to fix the issue. PR: 207079 Reported and tested by: Ting-Wei Lan <lantw44@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=295561
Diffstat (limited to 'include')
-rw-r--r--include/signal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/signal.h b/include/signal.h
index 895ccc30bc06..33be55c6dd25 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -36,6 +36,8 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
#include <sys/signal.h>
+#include <machine/ucontext.h>
+#include <sys/_ucontext.h>
#if __BSD_VISIBLE
/*
@@ -114,7 +116,6 @@ void psignal(unsigned int, const char *);
#if __BSD_VISIBLE
int sigblock(int);
-struct __ucontext; /* XXX spec requires a complete declaration. */
int sigreturn(const struct __ucontext *);
int sigsetmask(int);
int sigstack(const struct sigstack *, struct sigstack *);