Package: glibc / 2.28-10

hurd-i386/local-hurdsig-global-dispositions-version.diff Patch series | download
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
jkoenig's work on signals

2.13-19 dates when the global signal disposition call was added.
TODO: _DEBIAN_ in versions however pose problem. Remove the _DEBIAN_ version
once packages are rebuilt against 2.21.

---
 hurd/Versions                       |   16 ++++++++++
 hurd/hurdsig.c                      |   56 ++++++++++++++++++++++++++++++++----
 sysdeps/mach/hurd/i386/libc.abilist |   11 +++++++
 3 files changed, 78 insertions(+), 5 deletions(-)

--- a/hurd/Versions
+++ b/hurd/Versions
@@ -136,6 +136,22 @@
     __hurd_threadvar_location;
     _hurd_userlink_link; _hurd_userlink_unlink; _hurd_userlink_clear;
   }
+  GLIBC_2.13_DEBIAN_19 {
+    # functions used by libpthread and <hurd/signal.h>
+    _hurd_sigstate_set_global_rcv;
+    _hurd_sigstate_lock;
+    _hurd_sigstate_pending;
+    _hurd_sigstate_unlock;
+    _hurd_sigstate_delete;
+  }
+  GLIBC_2.21 {
+    # functions used by libpthread and <hurd/signal.h>
+    _hurd_sigstate_set_global_rcv;
+    _hurd_sigstate_lock;
+    _hurd_sigstate_pending;
+    _hurd_sigstate_unlock;
+    _hurd_sigstate_delete;
+  }
 
   HURD_CTHREADS_0.3 {
     # weak refs to libthreads functions that libc calls iff libthreads in use
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -35,6 +35,8 @@
 
 #include <libc-diag.h>
 
+#include <shlib-compat.h>
+
 const char *_hurdsig_getenv (const char *);
 
 struct mutex _hurd_siglock;
@@ -132,7 +134,7 @@
  * corresponding thread is terminated (the kernel thread port must remain valid
  * until this function is called.) */
 void
-_hurd_sigstate_delete (thread_t thread)
+__hurd_sigstate_delete (thread_t thread)
 {
   struct hurd_sigstate **ssp, *ss;
 
@@ -149,14 +151,32 @@
   if (ss)
     free (ss);
 }
+versioned_symbol (libc, __hurd_sigstate_delete, _hurd_sigstate_delete, GLIBC_2_21);
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+void
+__hurd_sigstate_delete_2_13 (thread_t thread)
+{
+  __hurd_sigstate_delete (thread);
+}
+compat_symbol (libc, __hurd_sigstate_delete_2_13, _hurd_sigstate_delete, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Make SS a global receiver, with pthread signal semantics.  */
 void
-_hurd_sigstate_set_global_rcv (struct hurd_sigstate *ss)
+__hurd_sigstate_set_global_rcv (struct hurd_sigstate *ss)
 {
   assert (ss->thread != MACH_PORT_NULL);
   ss->actions[0].sa_handler = SIG_IGN;
 }
+versioned_symbol (libc, __hurd_sigstate_set_global_rcv, _hurd_sigstate_set_global_rcv, GLIBC_2_21);
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+void
+__hurd_sigstate_set_global_rcv_2_13 (struct hurd_sigstate *ss)
+{
+  __hurd_sigstate_set_global_rcv (ss);
+}
+compat_symbol (libc, __hurd_sigstate_set_global_rcv_2_13, _hurd_sigstate_set_global_rcv, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Check whether SS is a global receiver.  */
 static int
@@ -168,30 +188,56 @@
 /* Lock/unlock a hurd_sigstate structure.  If the accessors below require
    it, the global sigstate will be locked as well.  */
 void
-_hurd_sigstate_lock (struct hurd_sigstate *ss)
+__hurd_sigstate_lock (struct hurd_sigstate *ss)
 {
   if (sigstate_is_global_rcv (ss))
     __spin_lock (&_hurd_global_sigstate->lock);
   __spin_lock (&ss->lock);
 }
 void
-_hurd_sigstate_unlock (struct hurd_sigstate *ss)
+__hurd_sigstate_unlock (struct hurd_sigstate *ss)
 {
   __spin_unlock (&ss->lock);
   if (sigstate_is_global_rcv (ss))
     __spin_unlock (&_hurd_global_sigstate->lock);
 }
+versioned_symbol (libc, __hurd_sigstate_lock, _hurd_sigstate_lock, GLIBC_2_21);
+versioned_symbol (libc, __hurd_sigstate_unlock, _hurd_sigstate_unlock, GLIBC_2_21);
+
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+void
+__hurd_sigstate_lock_2_13 (struct hurd_sigstate *ss)
+{
+  __hurd_sigstate_lock (ss);
+}
+void
+__hurd_sigstate_unlock_2_13 (struct hurd_sigstate *ss)
+{
+  __hurd_sigstate_unlock (ss);
+}
+compat_symbol (libc, __hurd_sigstate_lock_2_13, _hurd_sigstate_lock, GLIBC_2_13_DEBIAN_19);
+compat_symbol (libc, __hurd_sigstate_unlock_2_13, _hurd_sigstate_unlock, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Retreive a thread's full set of pending signals, including the global
    ones if appropriate.  SS must be locked.  */
 sigset_t
-_hurd_sigstate_pending (const struct hurd_sigstate *ss)
+__hurd_sigstate_pending (const struct hurd_sigstate *ss)
 {
   sigset_t pending = ss->pending;
   if (sigstate_is_global_rcv (ss))
     __sigorset (&pending, &pending, &_hurd_global_sigstate->pending);
   return pending;
 }
+versioned_symbol (libc, __hurd_sigstate_pending, _hurd_sigstate_pending, GLIBC_2_21);
+#if SHLIB_COMPAT (libc, GLIBC_2_13, GLIBC_2_21)
+sigset_t
+__hurd_sigstate_pending_2_13 (const struct hurd_sigstate *ss)
+{
+  return __hurd_sigstate_pending (ss);
+}
+compat_symbol (libc, __hurd_sigstate_pending_2_13, _hurd_sigstate_pending, GLIBC_2_13_DEBIAN_19);
+#endif
 
 /* Clear a pending signal and return the associated detailed
    signal information. SS must be locked, and must have signal SIGNO
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -29,6 +29,11 @@
 GLIBC_2.11 mkstemps F
 GLIBC_2.11 mkstemps64 F
 GLIBC_2.13 __fentry__ F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_delete F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_lock F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_pending F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_set_global_rcv F
+GLIBC_2.13_DEBIAN_19 _hurd_sigstate_unlock F
 GLIBC_2.14 syncfs F
 GLIBC_2.15 __fdelt_chk F
 GLIBC_2.15 __fdelt_warn F
@@ -1940,6 +1946,11 @@
 GLIBC_2.2.6 xprt_unregister F
 GLIBC_2.21 __mach_host_self_ D 0x4
 GLIBC_2.21 __pthread_get_cleanup_stack F
+GLIBC_2.21 _hurd_sigstate_delete F
+GLIBC_2.21 _hurd_sigstate_lock F
+GLIBC_2.21 _hurd_sigstate_pending F
+GLIBC_2.21 _hurd_sigstate_set_global_rcv F
+GLIBC_2.21 _hurd_sigstate_unlock F
 GLIBC_2.21 pthread_attr_destroy F
 GLIBC_2.21 pthread_attr_getdetachstate F
 GLIBC_2.21 pthread_attr_getinheritsched F