aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro-toolchain/recipes-core/glibc/glibc-linaro-2.20/0027-Add-sigstack.h-header-for-ILP32-reasons.patch
blob: 93d7cf97a37cbaeb83f3b483287a36e044c642f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
From d010da312e05ef8543f6e176d14bcb68a7c369e0 Mon Sep 17 00:00:00 2001
From: Andrew Pinski <apinski@cavium.com>
Date: Mon, 27 Oct 2014 00:59:50 -0700
Subject: [PATCH 27/32] Add sigstack.h header for ILP32 reasons.

ILP32 uses the same structure layout for sigaltstack as
LP64 so we need a special header file.

* sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h: New file.
---
 sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h | 71 +++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h

diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h b/sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
new file mode 100644
index 0000000..2dd8f6b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
@@ -0,0 +1,71 @@
+/* sigstack, sigaltstack definitions.
+   Copyright (C) 1998, 1999 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
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _SIGNAL_H
+# error "Never include this file directly.  Use <signal.h> instead"
+#endif
+
+
+/* Structure describing a signal stack (obsolete).  */
+struct sigstack
+  {
+    void *ss_sp;		/* Signal stack pointer.  */
+    int ss_onstack;		/* Nonzero if executing on this stack.  */
+  };
+
+
+/* Possible values for `ss_flags.'.  */
+enum
+{
+  SS_ONSTACK = 1,
+#define SS_ONSTACK	SS_ONSTACK
+  SS_DISABLE
+#define SS_DISABLE	SS_DISABLE
+};
+
+/* Minimum stack size for a signal handler.  */
+#define MINSIGSTKSZ	2048
+
+/* System default stack size.  */
+#define SIGSTKSZ	8192
+
+
+/* Alternate, preferred interface.
+   This structure matches the same size and layout
+   for both ILP32 and LP64.  */
+typedef struct sigaltstack
+  {
+#if defined(__ILP32__) && defined(__AARCH64EB__)
+    int __pad_ss_sp;
+#endif
+    void *ss_sp;
+#if defined(__ILP32__) && !defined(__AARCH64EB__)
+    int __pad_ss_sp;
+#endif
+    int ss_flags;
+#if defined(__ILP32__)
+    int __pad_after_ss_flags;
+#endif
+#if defined(__ILP32__) && defined(__AARCH64EB__)
+    int __pad_ss_size;
+#endif
+    size_t ss_size;
+#if defined(__ILP32__) && !defined(__AARCH64EB__)
+    int __pad_ss_size;
+#endif
+  } stack_t;
-- 
1.9.3