This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.25-108-g9d06726


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  9d067269f5c3ecc5913e7e424a4778608d784731 (commit)
      from  c89721e25d609ec4f3366a3956b2f3e5acd76e77 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d067269f5c3ecc5913e7e424a4778608d784731

commit 9d067269f5c3ecc5913e7e424a4778608d784731
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Mar 13 20:41:12 2017 +0100

    hurd: Make send/recv more posixish
    
    Thanks David Michael for the suggestion.
    
    	* sysdeps/mach/hurd/send.c (__send): Convert hurdish error code into
    	posix error code.
    	* sysdeps/mach/hurd/recv.c (__recv): Likewise.

diff --git a/ChangeLog b/ChangeLog
index c3b9de6..6ca8d7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-13  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+	* sysdeps/mach/hurd/send.c (__send): Convert hurdish error code into
+	posix error code.
+	* sysdeps/mach/hurd/recv.c (__recv): Likewise.
+
 2017-03-13  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	* scripts/build-many-glibcs.py (Context.add_all_configs): Remove
diff --git a/sysdeps/mach/hurd/recv.c b/sysdeps/mach/hurd/recv.c
index 78a67d0..133f49d 100644
--- a/sysdeps/mach/hurd/recv.c
+++ b/sysdeps/mach/hurd/recv.c
@@ -37,12 +37,16 @@ __recv (int fd, void *buf, size_t n, int flags)
   char *cdata = NULL;
   mach_msg_type_number_t clen = 0;
 
-  if (err = HURD_DPORT_USE (fd, __socket_recv (port, &addrport,
+  err = HURD_DPORT_USE (fd, __socket_recv (port, &addrport,
 					       flags, &bufp, &nread,
 					       &ports, &nports,
 					       &cdata, &clen,
 					       &flags,
-					       n)))
+					       n));
+  if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+    /* The file did not grok the socket protocol.  */
+    err = ENOTSOCK;
+  if (err)
     return __hurd_sockfail (fd, flags, err);
 
   __mach_port_deallocate (__mach_task_self (), addrport);
diff --git a/sysdeps/mach/hurd/send.c b/sysdeps/mach/hurd/send.c
index 8eb97e9..98ffcbf 100644
--- a/sysdeps/mach/hurd/send.c
+++ b/sysdeps/mach/hurd/send.c
@@ -33,6 +33,10 @@ __send (int fd, const void *buf, size_t n, int flags)
 					   NULL, MACH_MSG_TYPE_COPY_SEND, 0,
 					   NULL, 0, &wrote));
 
+  if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+    /* The file did not grok the socket protocol.  */
+    err = ENOTSOCK;
+
   return err ? __hurd_sockfail (fd, flags, err) : wrote;
 }
 libc_hidden_def (__send)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    6 ++++++
 sysdeps/mach/hurd/recv.c |    8 ++++++--
 sysdeps/mach/hurd/send.c |    4 ++++
 3 files changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]