about summary refs log tree commit diff
path: root/setjmp
diff options
context:
space:
mode:
Diffstat (limited to 'setjmp')
-rw-r--r--setjmp/Makefile3
-rw-r--r--setjmp/bits/types/struct___jmp_buf_tag.h37
-rw-r--r--setjmp/setjmp.h15
3 files changed, 40 insertions, 15 deletions
diff --git a/setjmp/Makefile b/setjmp/Makefile
index dcac56932d..603f61d76e 100644
--- a/setjmp/Makefile
+++ b/setjmp/Makefile
@@ -22,7 +22,8 @@ subdir	:= setjmp
 
 include ../Makeconfig
 
-headers	:= setjmp.h bits/setjmp.h bits/setjmp2.h
+headers	:= setjmp.h bits/setjmp.h bits/setjmp2.h \
+	   bits/types/struct___jmp_buf_tag.h
 
 routines	:= setjmp sigjmp bsd-setjmp bsd-_setjmp \
 		   longjmp __longjmp jmp-unwind
diff --git a/setjmp/bits/types/struct___jmp_buf_tag.h b/setjmp/bits/types/struct___jmp_buf_tag.h
new file mode 100644
index 0000000000..9d8634f1e4
--- /dev/null
+++ b/setjmp/bits/types/struct___jmp_buf_tag.h
@@ -0,0 +1,37 @@
+/* Define struct __jmp_buf_tag.
+   Copyright (C) 1991-2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef	__jmp_buf_tag_defined
+#define	__jmp_buf_tag_defined 1
+
+#include <bits/setjmp.h>		/* Get `__jmp_buf'.  */
+#include <bits/types/__sigset_t.h>
+
+/* Calling environment, plus possibly a saved signal mask.  */
+struct __jmp_buf_tag
+  {
+    /* NOTE: The machine-dependent definitions of `__sigsetjmp'
+       assume that a `jmp_buf' begins with a `__jmp_buf' and that
+       `__mask_was_saved' follows it.  Do not move these members
+       or add others before it.  */
+    __jmp_buf __jmpbuf;		/* Calling environment.  */
+    int __mask_was_saved;	/* Saved the signal mask?  */
+    __sigset_t __saved_mask;	/* Saved signal mask.  */
+  };
+
+#endif
diff --git a/setjmp/setjmp.h b/setjmp/setjmp.h
index 4e3443c37e..c6c59f4094 100644
--- a/setjmp/setjmp.h
+++ b/setjmp/setjmp.h
@@ -27,20 +27,7 @@
 __BEGIN_DECLS
 
 #include <bits/setjmp.h>		/* Get `__jmp_buf'.  */
-#include <bits/types/__sigset_t.h>
-
-/* Calling environment, plus possibly a saved signal mask.  */
-struct __jmp_buf_tag
-  {
-    /* NOTE: The machine-dependent definitions of `__sigsetjmp'
-       assume that a `jmp_buf' begins with a `__jmp_buf' and that
-       `__mask_was_saved' follows it.  Do not move these members
-       or add others before it.  */
-    __jmp_buf __jmpbuf;		/* Calling environment.  */
-    int __mask_was_saved;	/* Saved the signal mask?  */
-    __sigset_t __saved_mask;	/* Saved signal mask.  */
-  };
-
+#include <bits/types/struct___jmp_buf_tag.h>
 
 typedef struct __jmp_buf_tag jmp_buf[1];