Package: glibc / 2.24-11+deb9u4

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
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 |    8 ++++++++
 1 files changed, 8 insertions(+)

Index: glibc-2.21/hurd/Versions
===================================================================
--- glibc-2.21.orig/hurd/Versions
+++ glibc-2.21/hurd/Versions
@@ -124,6 +124,22 @@ libc {
     # functions used in macros & inline functions
     __errno_location;
   }
+  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
Index: glibc-2.21/hurd/hurdsig.c
===================================================================
--- glibc-2.21.orig/hurd/hurdsig.c
+++ glibc-2.21/hurd/hurdsig.c
@@ -32,6 +32,8 @@
 #include "hurdmalloc.h"		/* XXX */
 #include "../locale/localeinfo.h"
 
+#include <shlib-compat.h>
+
 const char *_hurdsig_getenv (const char *);
 
 struct mutex _hurd_siglock;
@@ -128,7 +130,7 @@ _hurd_thread_sigstate (thread_t thread)
  * 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;
 
@@ -145,14 +147,32 @@ _hurd_sigstate_delete (thread_t thread)
   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
@@ -164,30 +184,56 @@ sigstate_is_global_rcv (const struct hur
 /* 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