simplify some logic in scanf and remove redundant invalid-format check
[musl] / include / ucontext.h
index 96c27cb..3bb776e 100644 (file)
@@ -4,33 +4,20 @@
 extern "C" {
 #endif
 
-#include <signal.h>
+#include <features.h>
 
-struct __fpstate {
-       unsigned long __x[7];
-       unsigned char __y[80];
-       unsigned long __z;
-};
+#include <signal.h>
 
-typedef struct {
-       unsigned long __gregs[19];
-       void *__fpregs;
-       unsigned long __oldmask, __cr2;
-} mcontext_t;
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define NGREG (sizeof(gregset_t)/sizeof(greg_t))
+#endif
 
-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;
+struct __ucontext;
 
-int  getcontext(ucontext_t *);
-void makecontext(ucontext_t *, void (*)(void), int, ...);
-int  setcontext(const ucontext_t *);
-int  swapcontext(ucontext_t *, const ucontext_t *);
+int  getcontext(struct __ucontext *);
+void makecontext(struct __ucontext *, void (*)(void), int, ...);
+int  setcontext(const struct __ucontext *);
+int  swapcontext(struct __ucontext *, const struct __ucontext *);
 
 #ifdef __cplusplus
 }