]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
send returns ssize_t.
authorAndreas Jaeger <aj@suse.de>
Tue, 24 Apr 2001 13:36:50 +0000 (13:36 +0000)
committerAndreas Jaeger <aj@suse.de>
Tue, 24 Apr 2001 13:36:50 +0000 (13:36 +0000)
12 files changed:
include/sys/socket.h
linuxthreads/wrapsyscall.c
socket/sys/socket.h
sysdeps/generic/recvfrom.c
sysdeps/generic/recvmsg.c
sysdeps/generic/send.c
sysdeps/generic/sendmsg.c
sysdeps/generic/sendto.c
sysdeps/mach/hurd/recv.c
sysdeps/mach/hurd/recvfrom.c
sysdeps/mach/hurd/send.c
sysdeps/mach/hurd/sendto.c

index 5e97ddfb535c7e802a5d60724e3fd34b2a6de545..4ae71085090f9cb1bbb40822050cf68e2495a2d2 100644 (file)
@@ -20,7 +20,7 @@ extern int __opensock (void) internal_function;
 extern int __getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__len);
 
 /* Send N bytes of BUF to socket FD.  Returns the number sent or -1.  */
-extern int __send (int __fd, __const void *__buf, size_t __n, int __flags);
+extern ssize_t __send (int __fd, __const void *__buf, size_t __n, int __flags);
 
 /* Open a connection on socket FD to peer at ADDR (which LEN bytes long).
    For connectionless socket types, just set the default address to send to
index 5563eb0e6718c09eff89de7fa95fa3598b697023..74923e14e4828b81feec4c6fd02fff8577b4eada 100644 (file)
@@ -1,5 +1,5 @@
 /* Wrapper arpund system calls to provide cancelation points.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -195,31 +195,31 @@ CANCELABLE_SYSCALL (int, connect, (int fd, __CONST_SOCKADDR_ARG addr,
 strong_alias (connect, __connect)
 
 /* recv(2).  */
-CANCELABLE_SYSCALL (int, recv, (int fd, __ptr_t buf, size_t n, int flags),
+CANCELABLE_SYSCALL (ssize_t, recv, (int fd, __ptr_t buf, size_t n, int flags),
                    (fd, buf, n, flags))
 
 /* recvfrom(2).  */
-CANCELABLE_SYSCALL (int, recvfrom, (int fd, __ptr_t buf, size_t n, int flags,
-                                   __SOCKADDR_ARG addr, socklen_t *addr_len),
+CANCELABLE_SYSCALL (ssize_t, recvfrom, (int fd, __ptr_t buf, size_t n, int flags,
+                                       __SOCKADDR_ARG addr, socklen_t *addr_len),
                    (fd, buf, n, flags, addr, addr_len))
 
 /* recvmsg(2).  */
-CANCELABLE_SYSCALL (int, recvmsg, (int fd, struct msghdr *message, int flags),
+CANCELABLE_SYSCALL (ssize_t, recvmsg, (int fd, struct msghdr *message, int flags),
                    (fd, message, flags))
 
 /* send(2).  */
-CANCELABLE_SYSCALL (int, send, (int fd, const __ptr_t buf, size_t n,
-                               int flags),
+CANCELABLE_SYSCALL (ssize_t, send, (ssize_t fd, const __ptr_t buf, size_t n,
+                                   int flags),
                    (fd, buf, n, flags))
 strong_alias (send, __send)
 
 /* sendmsg(2).  */
-CANCELABLE_SYSCALL (int, sendmsg, (int fd, const struct msghdr *message,
-                                  int flags),
+CANCELABLE_SYSCALL (ssize_t, sendmsg, (int fd, const struct msghdr *message,
+                                      int flags),
                    (fd, message, flags))
 
 /* sendto(2).  */
-CANCELABLE_SYSCALL (int, sendto, (int fd, const __ptr_t buf, size_t n,
-                                 int flags, __CONST_SOCKADDR_ARG addr,
-                                 socklen_t addr_len),
+CANCELABLE_SYSCALL (ssize_t, sendto, (ssize_t fd, const __ptr_t buf, size_t n,
+                                     int flags, __CONST_SOCKADDR_ARG addr,
+                                     socklen_t addr_len),
                    (fd, buf, n, flags, addr, addr_len))
index 83f7de7331d28dd84e2b85a0afaf79bea6582330..7ccb7dd8d0b3f31fccdde14698137e401bc18d6b 100644 (file)
@@ -128,37 +128,37 @@ extern int getpeername (int __fd, __SOCKADDR_ARG __addr,
 
 
 /* Send N bytes of BUF to socket FD.  Returns the number sent or -1.  */
-extern int send (int __fd, __const void *__buf, size_t __n, int __flags)
+extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags)
      __THROW;
 
 /* Read N bytes into BUF from socket FD.
    Returns the number read or -1 for errors.  */
-extern int recv (int __fd, void *__buf, size_t __n, int __flags)
+extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags)
      __THROW;
 
 /* Send N bytes of BUF on socket FD to peer at address ADDR (which is
    ADDR_LEN bytes long).  Returns the number sent, or -1 for errors.  */
-extern int sendto (int __fd, __const void *__buf, size_t __n,
-                  int __flags, __CONST_SOCKADDR_ARG __addr,
-                  socklen_t __addr_len) __THROW;
+extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
+                      int __flags, __CONST_SOCKADDR_ARG __addr,
+                      socklen_t __addr_len) __THROW;
 
 /* Read N bytes into BUF through socket FD.
    If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of
    the sender, and store the actual size of the address in *ADDR_LEN.
    Returns the number of bytes read or -1 for errors.  */
-extern int recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
-                    __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
+extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
+                        __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
      __THROW;
 
 
 /* Send a message described MESSAGE on socket FD.
    Returns the number of bytes sent, or -1 for errors.  */
-extern int sendmsg (int __fd, __const struct msghdr *__message, int __flags)
+extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, int __flags)
      __THROW;
 
 /* Receive a message as described by MESSAGE from socket FD.
    Returns the number of bytes read or -1 for errors.  */
-extern int recvmsg (int __fd, struct msghdr *__message, int __flags)
+extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags)
      __THROW;
 
 
index 35b281a2a127095fb029bfbd8a8a2a1b610e545d..acb1e98ef119352559a57821f6628f65066d192c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
 /* Read N bytes into BUF through socket FD from peer
    at address ADDR (which is ADDR_LEN bytes long).
    Returns the number read or -1 for errors.  */
-int
+ssize_t
 recvfrom (fd, buf, n, flags, addr, addr_len)
      int fd;
      void *buf;
index 625e85aae99ac63c48902d23dd9ae5c022619a7d..c4bbd1b2ce3d41b21b0c64fbf3e1e1a3e62a5538 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
 
 /* Receive a message as described by MESSAGE from socket FD.
    Returns the number of bytes read or -1 for errors.  */
-int
+ssize_t
 recvmsg (fd, message, flags)
      int fd;
      struct msghdr *message;
index 0ef82948ea6280a7a9325885bda5edd232d40c4c..35c05baaea792af3297648b759ee7f0139bfeff0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
 #include <sys/socket.h>
 
 /* Send N bytes of BUF to socket FD.  Returns the number sent or -1.  */
-int
+ssize_t
 __send (fd, buf, n, flags)
      int fd;
      __const __ptr_t buf;
index 20d8bd6f67957125d970ea1958e78fdfca97819d..9f771be635961fc8f69ea82af87c9d104178980b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
 
 /* Send a message described MESSAGE on socket FD.
    Returns the number of bytes sent, or -1 for errors.  */
-int
+ssize_t
 sendmsg (fd, message, flags)
      int fd;
      const struct msghdr *message;
index f9b3c87f6874143a0d1b33bd12faebe21befb3d2..54f3e18396346f371bdce877ac59ca1cbe54579f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
 
 /* Send N bytes of BUF on socket FD to peer at address ADDR (which is
    ADDR_LEN bytes long).  Returns the number sent, or -1 for errors.  */
-int
+ssize_t
 sendto (fd, buf, n, flags, addr, addr_len)
      int fd;
      __const __ptr_t buf;
index 6ae3a6ad8b429e5dad0f563cdde2c6991815f05c..0e4ff034c1b53557e853804dce91f6345f691995 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
    Returns the number read or -1 for errors.  */
 
 /* XXX should be __recv ? */
-int
+ssize_t
 recv (fd, buf, n, flags)
      int fd;
      void *buf;
index b39528628c424f98bfae6bb31df95d228f465f91..91417f88f4cae8e26d6ce823f231c1911c20b255 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 1999, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
    If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of
    the sender, and store the actual size of the address in *ADDR_LEN.
    Returns the number of bytes read or -1 for errors.  */
-int
+ssize_t
 recvfrom (fd, buf, n, flags, addrarg, addr_len)
      int fd;
      void *buf;
index 73c53894b4391ba091b981af400d5d8764e4e208..4899bef137dca1940f5f564c3e5b759103f00fb6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
 #include <hurd/fd.h>
 
 /* Send N bytes of BUF to socket FD.  Returns the number sent or -1.  */
-int
+ssize_t
 __send (fd, buf, n, flags)
      int fd;
      const void *buf;
index 4f0ada7141d7e0f193b7ef254ca130c69ace4bcf..6f410683a627617a2bdeb57e448234d8b35e2074 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@
 
 /* Send N bytes of BUF on socket FD to peer at address ADDR (which is
    ADDR_LEN bytes long).  Returns the number sent, or -1 for errors.  */
-int
+ssize_t
 sendto (int fd,
        const void *buf,
        size_t n,