diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-08-26 09:57:27 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-08-26 09:57:27 +0000 |
commit | c250f9145bd37bf468c7116269a752516544384f (patch) | |
tree | 32bc8c7324d4c9f1d1e9c2adbebe57b210cd16f1 | |
parent | 38170b13ea763c0e62f7a5568f07d1f482e69232 (diff) | |
download | newlib-c250f9145bd37bf468c7116269a752516544384f.zip newlib-c250f9145bd37bf468c7116269a752516544384f.tar.gz newlib-c250f9145bd37bf468c7116269a752516544384f.tar.bz2 |
* fhandler.h (fhandler_socket::recvfrom): Fix prototype.
(fhandler_socket::sendto): Ditto.
* fhandler_socket.cc (fhandler_socket::recvfrom): Ditto.
(fhandler_socket::sendto): Ditto.
* include/sys/socket.h (recv): Fix prototype.
(recvfrom): Ditto.
(send): Ditto.
(sendto): Ditto.
* net.cc (cygwin_sendto): Ditto. Improve strace message
(cygwin_recvfrom): Ditto. Ditto.
(cygwin_setsockopt): Improve strace message.
(cygwin_getsockopt): Ditto.
(cygwin_connect): Ditto.
(cygwin_accept): Ditto.
(cygwin_bind): Ditto.
(cygwin_getsockname): Ditto.
(cygwin_getpeername): Ditto.
(cygwin_recv): Fix prototype.
(cygwin_send): Ditto.
(cygwin_recvmsg): Improve strace message.
(cygwin_sendmsg): Ditto.
-rw-r--r-- | winsup/cygwin/ChangeLog | 24 | ||||
-rw-r--r-- | winsup/cygwin/fhandler.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/socket.h | 11 | ||||
-rw-r--r-- | winsup/cygwin/net.cc | 32 |
5 files changed, 51 insertions, 24 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index dcd3f51..1e37ce9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,27 @@ +2002-08-25 Conrad Scott <conrad.scott@dsl.pipex.com> + + * fhandler.h (fhandler_socket::recvfrom): Fix prototype. + (fhandler_socket::sendto): Ditto. + * fhandler_socket.cc (fhandler_socket::recvfrom): Ditto. + (fhandler_socket::sendto): Ditto. + * include/sys/socket.h (recv): Fix prototype. + (recvfrom): Ditto. + (send): Ditto. + (sendto): Ditto. + * net.cc (cygwin_sendto): Ditto. Improve strace message + (cygwin_recvfrom): Ditto. Ditto. + (cygwin_setsockopt): Improve strace message. + (cygwin_getsockopt): Ditto. + (cygwin_connect): Ditto. + (cygwin_accept): Ditto. + (cygwin_bind): Ditto. + (cygwin_getsockname): Ditto. + (cygwin_getpeername): Ditto. + (cygwin_recv): Fix prototype. + (cygwin_send): Ditto. + (cygwin_recvmsg): Improve strace message. + (cygwin_sendmsg): Ditto. + 2002-08-25 Pierre Humblet <Pierre.Humblet@ieee.org> * sec_acl.cc (getacl): Check ace_sid == well_known_world_sid diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 6f9a5cb..ec72091 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -398,12 +398,12 @@ class fhandler_socket: public fhandler_base int getpeername (struct sockaddr *name, int *namelen); int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3))); - int recvfrom (void *ptr, size_t len, unsigned int flags, + int recvfrom (void *ptr, size_t len, int flags, struct sockaddr *from, int *fromlen); int recvmsg (struct msghdr *msg, int flags); int write (const void *ptr, size_t len); - int sendto (const void *ptr, size_t len, unsigned int flags, + int sendto (const void *ptr, size_t len, int flags, const struct sockaddr *to, int tolen); int sendmsg (const struct msghdr *msg, int flags); diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index c938773..ded5935 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -675,7 +675,7 @@ fhandler_socket::read (void *ptr, size_t len) } int -fhandler_socket::recvfrom (void *ptr, size_t len, unsigned int flags, +fhandler_socket::recvfrom (void *ptr, size_t len, int flags, struct sockaddr *from, int *fromlen) { int res = -1; @@ -763,7 +763,7 @@ fhandler_socket::write (const void *ptr, size_t len) } int -fhandler_socket::sendto (const void *ptr, size_t len, unsigned int flags, +fhandler_socket::sendto (const void *ptr, size_t len, int flags, const struct sockaddr *to, int tolen) { int res = -1; diff --git a/winsup/cygwin/include/sys/socket.h b/winsup/cygwin/include/sys/socket.h index 51ed54e..3bda9f9 100644 --- a/winsup/cygwin/include/sys/socket.h +++ b/winsup/cygwin/include/sys/socket.h @@ -32,13 +32,14 @@ extern "C" int getpeername (int, struct sockaddr *__peer, int *); int getsockname (int, struct sockaddr *__addr, int *); int listen (int, int __n); - int recv (int, void *__buff, int __len, unsigned int __flags); - int recvfrom (int, char *__buff, int __len, int __flags, - struct sockaddr *__from, int *__fromlen); + int recv (int, void *__buff, int __len, int __flags); + int recvfrom (int, void *__buff, int __len, int __flags, + struct sockaddr *__from, int *__fromlen); int recvmsg(int s, struct msghdr *msg, int flags); - int send (int, const void *__buff, int __len, unsigned int __flags); + int send (int, const void *__buff, int __len, int __flags); int sendmsg(int s, const struct msghdr *msg, int flags); - int sendto (int, const void *, int, unsigned int, const struct sockaddr *, int); + int sendto (int, const void *, int __len, int __flags, + const struct sockaddr *__to, int __tolen); int setsockopt (int __s, int __level, int __optname, const void *optval, int __optlen); int getsockopt (int __s, int __level, int __optname, void *__optval, int *__optlen); int shutdown (int, int); diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 00fea19..888c34e 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -564,7 +564,7 @@ done: /* exported as sendto: standards? */ extern "C" int -cygwin_sendto (int fd, const void *buf, int len, unsigned int flags, +cygwin_sendto (int fd, const void *buf, int len, int flags, const struct sockaddr *to, int tolen) { int res; @@ -577,15 +577,16 @@ cygwin_sendto (int fd, const void *buf, int len, unsigned int flags, else if ((res = len) != 0) res = fh->sendto (buf, len, flags, to, tolen); - syscall_printf ("%d = sendto (%d, %x, %x, %x)", res, fd, buf, len, flags); + syscall_printf ("%d = sendto (%d, %p, %d, %x, %p, %d)", + res, fd, buf, len, flags, to, tolen); return res; } /* exported as recvfrom: standards? */ extern "C" int -cygwin_recvfrom (int fd, void *buf, int len, int flags, struct sockaddr *from, - int *fromlen) +cygwin_recvfrom (int fd, void *buf, int len, int flags, + struct sockaddr *from, int *fromlen) { int res; fhandler_socket *fh = get (fd); @@ -599,7 +600,8 @@ cygwin_recvfrom (int fd, void *buf, int len, int flags, struct sockaddr *from, else if ((res = len) != 0) res = fh->recvfrom (buf, len, flags, from, fromlen); - syscall_printf ("%d = recvfrom (%d, %x, %x, %x)", res, fd, buf, len, flags); + syscall_printf ("%d = recvfrom (%d, %p, %d, %x, %p, %p)", + res, fd, buf, len, flags, from, fromlen); return res; } @@ -662,7 +664,7 @@ cygwin_setsockopt (int fd, int level, int optname, const void *optval, set_winsock_errno (); } - syscall_printf ("%d = setsockopt (%d, %d, %x (%s), %x, %d)", + syscall_printf ("%d = setsockopt (%d, %d, %x (%s), %p, %d)", res, fd, level, optname, name, optval, optlen); return res; } @@ -730,7 +732,7 @@ cygwin_getsockopt (int fd, int level, int optname, void *optval, int *optlen) set_winsock_errno (); } - syscall_printf ("%d = getsockopt (%d, %d, %x (%s), %x, %d)", + syscall_printf ("%d = getsockopt (%d, %d, %x (%s), %p, %p)", res, fd, level, optname, name, optval, optlen); return res; } @@ -747,7 +749,7 @@ cygwin_connect (int fd, const struct sockaddr *name, int namelen) else res = fh->connect (name, namelen); - syscall_printf ("%d = connect (%d, %x, %x)", res, fd, name, namelen); + syscall_printf ("%d = connect (%d, %p, %d)", res, fd, name, namelen); return res; } @@ -1009,7 +1011,7 @@ cygwin_accept (int fd, struct sockaddr *peer, int *len) else res = fh->accept (peer, len); - syscall_printf ("%d = accept (%d, %x, %x)", res, fd, peer, len); + syscall_printf ("%d = accept (%d, %p, %d)", res, fd, peer, len); return res; } @@ -1025,7 +1027,7 @@ cygwin_bind (int fd, const struct sockaddr *my_addr, int addrlen) else res = fh->bind (my_addr, addrlen); - syscall_printf ("%d = bind (%d, %x, %d)", res, fd, my_addr, addrlen); + syscall_printf ("%d = bind (%d, %p, %d)", res, fd, my_addr, addrlen); return res; } @@ -1043,7 +1045,7 @@ cygwin_getsockname (int fd, struct sockaddr *addr, int *namelen) else res = fh->getsockname (addr, namelen); - syscall_printf ("%d = getsockname (%d, %x, %d)", res, fd, addr, namelen); + syscall_printf ("%d = getsockname (%d, %p, %d)", res, fd, addr, namelen); return res; } @@ -1146,14 +1148,14 @@ cygwin_getpeername (int fd, struct sockaddr *name, int *len) /* exported as recv: standards? */ extern "C" int -cygwin_recv (int fd, void *buf, int len, unsigned int flags) +cygwin_recv (int fd, void *buf, int len, int flags) { return cygwin_recvfrom (fd, buf, len, flags, NULL, NULL); } /* exported as send: standards? */ extern "C" int -cygwin_send (int fd, const void *buf, int len, unsigned int flags) +cygwin_send (int fd, const void *buf, int len, int flags) { return cygwin_sendto (fd, buf, len, flags, NULL, 0); } @@ -2096,7 +2098,7 @@ cygwin_recvmsg (int fd, struct msghdr *msg, int flags) else res = fh->recvmsg (msg, flags); - syscall_printf ("%d = recvmsg (%d, %x, %x)", res, fd, msg, flags); + syscall_printf ("%d = recvmsg (%d, %p, %d)", res, fd, msg, flags); return res; } @@ -2116,6 +2118,6 @@ cygwin_sendmsg (int fd, const struct msghdr *msg, int flags) else res = fh->sendmsg (msg, flags); - syscall_printf ("%d = recvmsg (%d, %x, %x)", res, fd, msg, flags); + syscall_printf ("%d = recvmsg (%d, %p, %d)", res, fd, msg, flags); return res; } |