unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 1d7c81b98e6e5fdbed23682b6f69a070643bd4f1 3365 bytes (raw)
name: gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch 	 # note: path name is non-authoritative(*)

 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
 
Upstream-status: Taken from <https://salsa.debian.org/glibc-team/glibc/-/blob/25a0a47767fe7dc5151eb36afaade17218728efe/debian/patches/hurd-i386/local-static_pthread_setcancelstate.diff>.

This is needed for the 64bit Hurd statically linked tar non to hang when
issuing a warning.

since the move of libpthread functions to libc, glibc dropped the use
of __libc_ptf_call. But htl hasn't made the move yet, so we have to use
__libc_ptf_call there for now.

Index: glibc-2.36/misc/error.c
===================================================================
--- glibc-2.36.orig/misc/error.c
+++ glibc-2.36/misc/error.c
@@ -240,7 +240,8 @@ __error_internal (int status, int errnum
   /* We do not want this call to be cut short by a thread
      cancellation.  Therefore disable cancellation for now.  */
   int state = PTHREAD_CANCEL_ENABLE;
-  __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
+  __libc_ptf_call (__pthread_setcancelstate,
+		   (PTHREAD_CANCEL_DISABLE, &state), 0);
 #endif
 
   flush_stdout ();
@@ -262,7 +263,7 @@ __error_internal (int status, int errnum
 
 #ifdef _LIBC
   _IO_funlockfile (stderr);
-  __pthread_setcancelstate (state, NULL);
+  __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
 #endif
 }
 
@@ -306,7 +307,9 @@ __error_at_line_internal (int status, in
   /* We do not want this call to be cut short by a thread
      cancellation.  Therefore disable cancellation for now.  */
   int state = PTHREAD_CANCEL_ENABLE;
-  __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
+  __libc_ptf_call (__pthread_setcancelstate,
+		   (PTHREAD_CANCEL_DISABLE, &state),
+		   0);
 #endif
 
   flush_stdout ();
@@ -336,7 +339,7 @@ __error_at_line_internal (int status, in
 
 #ifdef _LIBC
   _IO_funlockfile (stderr);
-  __pthread_setcancelstate (state, NULL);
+  __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
 #endif
 }
 
Index: glibc-2.36/libio/iopopen.c
===================================================================
--- glibc-2.36.orig/libio/iopopen.c
+++ glibc-2.36/libio/iopopen.c
@@ -281,9 +281,10 @@ _IO_new_proc_close (FILE *fp)
   do
     {
       int state;
-      __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
+      __libc_ptf_call (__pthread_setcancelstate,
+		       (PTHREAD_CANCEL_DISABLE, &state), 0);
       wait_pid = __waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0);
-      __pthread_setcancelstate (state, NULL);
+      __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
     }
   while (wait_pid == -1 && errno == EINTR);
   if (wait_pid == -1)
Index: glibc-2.36/stdlib/fmtmsg.c
===================================================================
--- glibc-2.36.orig/stdlib/fmtmsg.c
+++ glibc-2.36/stdlib/fmtmsg.c
@@ -124,7 +124,8 @@ fmtmsg (long int classification, const c
   /* We do not want this call to be cut short by a thread
      cancellation.  Therefore disable cancellation for now.  */
   int state = PTHREAD_CANCEL_ENABLE;
-  __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
+  __libc_ptf_call (__pthread_setcancelstate,
+		   (PTHREAD_CANCEL_DISABLE, &state), 0);
 
   __libc_lock_lock (lock);
 
@@ -193,7 +194,7 @@ fmtmsg (long int classification, const c
 
   __libc_lock_unlock (lock);
 
-  __pthread_setcancelstate (state, NULL);
+  __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
 
   return result;
 }

debug log:

solving 1d7c81b98e ...
found 1d7c81b98e in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).