about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-18 22:03:03 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-18 22:03:03 -0500
commitad2fe25041622b6cf426b0f98af0e52c2c9727f6 (patch)
treee824a24f6f6e7257ce8fc1077b33a98bebe50380 /include
parente9417fffb39c299e556c5ad0c1545f0c02618e3c (diff)
downloadmusl-ad2fe25041622b6cf426b0f98af0e52c2c9727f6.tar.gz
musl-ad2fe25041622b6cf426b0f98af0e52c2c9727f6.tar.xz
musl-ad2fe25041622b6cf426b0f98af0e52c2c9727f6.zip
support the ugly and deprecated ucontext and sigcontext header stuff...
only the structures, not the functions from ucontext.h, are supported
at this point. the main goal of this commit is to make modern gcc with
dwarf2 unwinding build without errors.

honestly, it probably doesn't matter how we define these as long as
they have members with the right names to prevent errors while
compiling libgcc. the only time they will be used is for propagating
exceptions across signal-handler boundaries, which invokes undefined
behavior anyway. but as-is, they're probably correct and may be useful
to various low-level applications dealing with virtualization, jit
code generation, and so on...
Diffstat (limited to 'include')
-rw-r--r--include/ucontext.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/include/ucontext.h b/include/ucontext.h
index 96c27cb7..cd6d223e 100644
--- a/include/ucontext.h
+++ b/include/ucontext.h
@@ -6,26 +6,9 @@ extern "C" {
 
 #include <signal.h>
 
-struct __fpstate {
-	unsigned long __x[7];
-	unsigned char __y[80];
-	unsigned long __z;
-};
-
-typedef struct {
-	unsigned long __gregs[19];
-	void *__fpregs;
-	unsigned long __oldmask, __cr2;
-} mcontext_t;
-
-typedef struct ucontext {
-	unsigned long uc_flags;
-	struct ucontext *uc_link;
-	stack_t uc_stack;
-	mcontext_t uc_mcontext;
-	sigset_t uc_sigmask;
-	struct __fpstate __fpregs_mem;
-} ucontext_t;
+#ifdef _GNU_SOURCE
+#define ucontext __ucontext
+#endif
 
 int  getcontext(ucontext_t *);
 void makecontext(ucontext_t *, void (*)(void), int, ...);