FreeBSD Bugzilla – Attachment 166831 Details for
Bug 207079
#include <signal.h> doesn't make ucontext_t available
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
A fix
1.patch (text/plain), 3.65 KB, created by
Konstantin Belousov
on 2016-02-10 15:27:46 UTC
(
hide
)
Description:
A fix
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2016-02-10 15:27:46 UTC
Size:
3.65 KB
patch
obsolete
>diff --git a/include/signal.h b/include/signal.h >index 895ccc3..33be55c 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 *); >diff --git a/sys/sys/_ucontext.h b/sys/sys/_ucontext.h >new file mode 100644 >index 0000000..5502f38 >--- /dev/null >+++ b/sys/sys/_ucontext.h >@@ -0,0 +1,52 @@ >+/*- >+ * Copyright (c) 1999 Marcel Moolenaar >+ * All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer >+ * in this position and unchanged. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * 3. The name of the author may not be used to endorse or promote products >+ * derived from this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR >+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES >+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. >+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, >+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT >+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF >+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ * >+ * $FreeBSD$ >+ */ >+ >+#ifndef _SYS__UCONTEXT_H_ >+#define _SYS__UCONTEXT_H_ >+ >+typedef struct __ucontext { >+ /* >+ * Keep the order of the first two fields. Also, >+ * keep them the first two fields in the structure. >+ * This way we can have a union with struct >+ * sigcontext and ucontext_t. This allows us to >+ * support them both at the same time. >+ * note: the union is not defined, though. >+ */ >+ sigset_t uc_sigmask; >+ mcontext_t uc_mcontext; >+ >+ struct __ucontext *uc_link; >+ stack_t uc_stack; >+ int uc_flags; >+ int __spare__[4]; >+} ucontext_t; >+ >+#endif /* _SYS__UCONTEXT_H */ >diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h >index e80ed50..260c157 100644 >--- a/sys/sys/ucontext.h >+++ b/sys/sys/ucontext.h >@@ -33,25 +33,9 @@ > > #include <sys/signal.h> > #include <machine/ucontext.h> >+#include <sys/_ucontext.h> > >-typedef struct __ucontext { >- /* >- * Keep the order of the first two fields. Also, >- * keep them the first two fields in the structure. >- * This way we can have a union with struct >- * sigcontext and ucontext_t. This allows us to >- * support them both at the same time. >- * note: the union is not defined, though. >- */ >- sigset_t uc_sigmask; >- mcontext_t uc_mcontext; >- >- struct __ucontext *uc_link; >- stack_t uc_stack; >- int uc_flags; > #define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */ >- int __spare__[4]; >-} ucontext_t; > > #if defined(_KERNEL) && defined(COMPAT_FREEBSD4) > #if defined(__i386__)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207079
:
166831
|
166868