From: David Bartley Date: Mon, 12 Jan 2009 03:35:43 +0000 (-0500) Subject: Fix recvmsg; also fix minor cast errors X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=commitdiff_plain;h=8dfb923d2cfbe38d333befdd24e19f39a7c4646e Fix recvmsg; also fix minor cast errors --- diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/Makefile b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/Makefile index e8363a04ff..0f012ca00e 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/Makefile +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/Makefile @@ -31,14 +31,14 @@ sysdep_routines += gethrtime mount umount umount2 systeminfo resolvepath \ idmap_reg idmap_unreg acctctl pcsample settaskid gettaskid getprojid \ utssys zone port sendfilev sendfilev64 sig2str _so_accept _so_bind \ _so_connect _so_getpeername _so_getsockname _so_getsockopt _so_listen \ - _so_send _so_sendmsg _so_sendto _so_setsockopt _so_shutdown _so_socket \ - _so_socketpair _sysconfig rctl atomic door __door_return getexecname \ - is_system_labeled privP modctl acl facl lltostr ulltostr _getauthnam \ - _getauthattr deflt _getprofnam _getprofattr _getusernam _getuserattr \ - _getauuserent _getauusernam _getexecattr vfsent fdwalk closefrom ipsecalg \ - gethostent sigsendset sigsend stack_getbounds thr_sighndlrinfo \ - _getexecprof _fgetuserattr priv_str _sbrk_grow_aligned cftime ascftime \ - inet_ntoa_r + _so_recvmsg _so_send _so_sendmsg _so_sendto _so_setsockopt _so_shutdown \ + _so_socket _so_socketpair _sysconfig rctl atomic door __door_return \ + getexecname is_system_labeled privP modctl acl facl lltostr ulltostr \ + _getauthnam _getauthattr deflt _getprofnam _getprofattr _getusernam \ + _getuserattr _getauuserent _getauusernam _getexecattr vfsent fdwalk \ + closefrom ipsecalg gethostent sigsendset sigsend stack_getbounds \ + thr_sighndlrinfo _getexecprof _fgetuserattr priv_str _sbrk_grow_aligned \ + cftime ascftime inet_ntoa_r sysdep_routines += sys_fdsync sys_brk sys_fcntl sys_utssys sys_lwp_private \ sys_uname sys_getloadavg sys_utimes sys_getpeerucred sys_ucred_get \ sys_privsys sys_putmsg sys_putpmsg sys_meminfo sys_pset_getloadavg \ diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/recvmsg.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/recvmsg.c index e9accc0c9d..a122596688 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/recvmsg.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/recvmsg.c @@ -21,7 +21,7 @@ #include #include -DECLARE_INLINE_SYSCALL (ssize_t, recvmsg, int s, struct msghdr *msg, int flags); +extern ssize_t _so_recvmsg (int s, struct msghdr *msg, int flags); ssize_t __recvmsg (fd, message, flags) @@ -29,7 +29,7 @@ __recvmsg (fd, message, flags) struct msghdr *message; int flags; { - return INLINE_SYSCALL (recvmsg, 3, fd, message, flags | MSG_XPG4_2); + return _so_recvmsg (fd, message, flags | MSG_XPG4_2); } weak_alias (__recvmsg, recvmsg) diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/send.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/send.c index f59506462d..add56e3fa0 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/send.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/send.c @@ -36,7 +36,7 @@ __send (fd, buf, n, flags) if (flags & MSG_NOSIGNAL) SIGPIPE_DISABLE; - int res = _so_send (fd, buf, n, (flags & ~MSG_NOSIGNAL) | MSG_XPG4_2); + ssize_t res = _so_send (fd, buf, n, (flags & ~MSG_NOSIGNAL) | MSG_XPG4_2); if (flags & MSG_NOSIGNAL) SIGPIPE_ENABLE; diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile.c index 141ee52538..aaf093a687 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile.c @@ -31,7 +31,7 @@ sendfile (int out_fd, int in_fd, off_t *offset, size_t count) sfv.sfv_len = count; int xferred = 0; - int res = sendfilev (out_fd, &sfv, 1, &xferred); + ssize_t res = sendfilev (out_fd, &sfv, 1, &xferred); *offset += xferred; return res; } diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile64.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile64.c index b8c3e47358..2ea2f3526b 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile64.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfile64.c @@ -31,7 +31,7 @@ sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count) sfv.sfv_len = count; int xferred = 0; - int res = sendfilev (out_fd, &sfv, 1, &xferred); + ssize_t res = sendfilev (out_fd, &sfv, 1, &xferred); *offset += xferred; return res; } diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev.c index f5337f2739..f42f01e8e4 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev.c @@ -21,14 +21,14 @@ #include #include -DECLARE_INLINE_SYSCALL (size_t, sendfilev, int fildes, +DECLARE_INLINE_SYSCALL (ssize_t, sendfilev, int fildes, const sendfilevec_t *sfv, int count, size_t *xferred); ssize_t sendfilev (int out_fd, const sendfilevec_t *sfv, int count, size_t *xferred) { - int res = INLINE_SYSCALL (sendfilev, 4, out_fd, sfv, 1, xferred); - if (res == -1 && errno == EINTR) + ssize_t res = INLINE_SYSCALL (sendfilev, 4, out_fd, sfv, 1, xferred); + if (res == (ssize_t)-1 && errno == EINTR) return *xferred; else return res; diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev64.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev64.c index ba56e97b0f..a240809725 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev64.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendfilev64.c @@ -21,14 +21,14 @@ #include #include -DECLARE_INLINE_SYSCALL (size_t, sendfilev64, int fildes, +DECLARE_INLINE_SYSCALL (ssize_t, sendfilev64, int fildes, const sendfilevec64_t *sfv, int count, size_t *xferred); ssize_t sendfilev64 (int out_fd, const sendfilevec64_t *sfv, int count, size_t *xferred) { - int res = INLINE_SYSCALL (sendfilev64, 4, out_fd, sfv, 1, xferred); - if (res == -1 && errno == EINTR) + ssize_t res = INLINE_SYSCALL (sendfilev64, 4, out_fd, sfv, 1, xferred); + if (res == (ssize_t)-1 && errno == EINTR) return *xferred; else return res; diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendmsg.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendmsg.c index 364b3dd20b..6906318898 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendmsg.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendmsg.c @@ -33,7 +33,7 @@ __sendmsg (fd, message, flags) if (flags & MSG_NOSIGNAL) SIGPIPE_DISABLE; - int res = _so_sendmsg (fd, message, (flags & ~MSG_NOSIGNAL) | MSG_XPG4_2); + ssize_t res = _so_sendmsg (fd, message, (flags & ~MSG_NOSIGNAL) | MSG_XPG4_2); if (flags & MSG_NOSIGNAL) SIGPIPE_ENABLE; diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendto.c b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendto.c index caab3b45d0..fca973876a 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendto.c +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/sendto.c @@ -37,7 +37,7 @@ __sendto (fd, buf, n, flags, addr, addr_len) if (flags & MSG_NOSIGNAL) SIGPIPE_DISABLE; - int res = _so_sendto (fd, buf, n, (flags & ~MSG_NOSIGNAL) | MSG_XPG4_2, + ssize_t res = _so_sendto (fd, buf, n, (flags & ~MSG_NOSIGNAL) | MSG_XPG4_2, addr, addr_len); if (flags & MSG_NOSIGNAL) diff --git a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/syscalls.list b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/syscalls.list index 9856b04ed3..eb283a8851 100644 --- a/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/syscalls.list +++ b/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/syscalls.list @@ -163,7 +163,7 @@ _so_getsockopt - getsockopt i:iiiBNi _so_getsockopt _so_listen - listen i:iii _so_listen recv - recv RCi:ibni __libc_recv __recv recv _so_recv recvfrom - recvfrom RCi:ibniBN __libc_recvfrom __recvfrom recvfrom _so_recvfrom -recvmsg - recvmsg RCi:ipi __libc_recvmsg __recvmsg recvmsg _so_recvmsg +_so_recvmsg - recvmsg RCi:ipi _so_recvmsg _so_send - send RCi:ibni _so_send _so_sendmsg - sendmsg RCi:ipi _so_sendmsg _so_sendto - sendto RCi:ibnibn _so_sendto