File: cvs-hurd_signal.h_c%2B%2B.diff

package info (click to toggle)
glibc 2.24-11%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 225,316 kB
  • sloc: ansic: 996,116; asm: 261,826; sh: 10,483; makefile: 9,849; cpp: 4,169; python: 3,971; perl: 2,254; awk: 1,753; pascal: 1,521; yacc: 291; sed: 80
file content (68 lines) | stat: -rw-r--r-- 2,258 bytes parent folder | download | duplicates (3)
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
commit 2dacdc5eb0171078eeb96b12b0761f533a62f70e
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Nov 27 17:22:22 2016 +0100

    hurd: fix using hurd/signal.h in C++ programs
    
            * hurd/hurd/signal.h (HURD_MSGPORT_RPC): Cast expressions results to
            error_t to fix usage in C++ programs.

diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
index 85e5152..96f42d5 100644
--- a/hurd/hurd/signal.h
+++ b/hurd/hurd/signal.h
@@ -340,18 +340,18 @@ extern mach_msg_timeout_t _hurd_interrupted_rpc_timeout;
     do									      \
       {									      \
 	/* Get the message port.  */					      \
-	__err = (fetch_msgport_expr);					      \
+	__err = (error_t) (fetch_msgport_expr);				      \
 	if (__err)							      \
 	  break;							      \
 	/* Get the reference port.  */					      \
-	__err = (fetch_refport_expr);					      \
+	__err = (error_t) (fetch_refport_expr);				      \
 	if (__err)							      \
 	  {								      \
 	    /* Couldn't get it; deallocate MSGPORT and fail.  */	      \
 	    __mach_port_deallocate (__mach_task_self (), msgport);	      \
 	    break;							      \
 	  }								      \
-	__err = (rpc_expr);						      \
+	__err = (error_t) (rpc_expr);					      \
 	__mach_port_deallocate (__mach_task_self (), msgport);		      \
 	if ((dealloc_refport) && refport != MACH_PORT_NULL)		      \
 	  __mach_port_deallocate (__mach_task_self (), refport);    	      \

commit 71be79a25f1d9efeafa5c634c4499281e8c313f2
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Dec 4 23:18:32 2016 +0100

    hurd: fix using hurd.h in C++ programs
    
            * hurd/hurd.h: Cast errno constants to error_t to fix usage in C++
            programs.

diff --git a/hurd/hurd.h b/hurd/hurd.h
index ec07827..022abb5 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -54,15 +54,15 @@ __hurd_fail (error_t err)
     case EMACH_SEND_INVALID_DEST:
     case EMIG_SERVER_DIED:
       /* The server has disappeared!  */
-      err = EIEIO;
+      err = (error_t) EIEIO;
       break;
 
     case KERN_NO_SPACE:
-      err = ENOMEM;
+      err = (error_t) ENOMEM;
       break;
 
     case KERN_INVALID_ARGUMENT:
-      err = EINVAL;
+      err = (error_t) EINVAL;
       break;
 
     case 0: