Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/os.hpp @ 4717:11c26bfcf8c7
7091417: recvfrom's 6th input should be of type socklen_t
Summary: Revamp class os's socket method formal args to match socket.h, insert casts in appropriate places, and copyin-copyout int*'s that s/b socklen_t*'s in jvm.cpp.
Reviewed-by: coleenp, dholmes
Contributed-by: erik.gahlin@oracle.com, rickard.backman@oracle.com, nils.loodin@oracle.com, markus.gronlund@oracle.com
author | phh |
---|---|
date | Wed, 21 Dec 2011 15:48:16 -0500 |
parents | 436b4a3231bf |
children | 20bfb6d15a94 7ab5f6318694 |
line wrap: on
line diff
--- a/src/share/vm/runtime/os.hpp Mon Dec 19 21:38:51 2011 -0800 +++ b/src/share/vm/runtime/os.hpp Wed Dec 21 15:48:16 2011 -0500 @@ -584,28 +584,28 @@ static int socket(int domain, int type, int protocol); static int socket_close(int fd); static int socket_shutdown(int fd, int howto); - static int recv(int fd, char *buf, int nBytes, int flags); - static int send(int fd, char *buf, int nBytes, int flags); - static int raw_send(int fd, char *buf, int nBytes, int flags); + static int recv(int fd, char* buf, size_t nBytes, uint flags); + static int send(int fd, char* buf, size_t nBytes, uint flags); + static int raw_send(int fd, char* buf, size_t nBytes, uint flags); static int timeout(int fd, long timeout); static int listen(int fd, int count); - static int connect(int fd, struct sockaddr *him, int len); - static int bind(int fd, struct sockaddr *him, int len); - static int accept(int fd, struct sockaddr *him, int *len); - static int recvfrom(int fd, char *buf, int nbytes, int flags, - struct sockaddr *from, int *fromlen); - static int get_sock_name(int fd, struct sockaddr *him, int *len); - static int sendto(int fd, char *buf, int len, int flags, - struct sockaddr *to, int tolen); - static int socket_available(int fd, jint *pbytes); + static int connect(int fd, struct sockaddr* him, socklen_t len); + static int bind(int fd, struct sockaddr* him, socklen_t len); + static int accept(int fd, struct sockaddr* him, socklen_t* len); + static int recvfrom(int fd, char* buf, size_t nbytes, uint flags, + struct sockaddr* from, socklen_t* fromlen); + static int get_sock_name(int fd, struct sockaddr* him, socklen_t* len); + static int sendto(int fd, char* buf, size_t len, uint flags, + struct sockaddr* to, socklen_t tolen); + static int socket_available(int fd, jint* pbytes); static int get_sock_opt(int fd, int level, int optname, - char *optval, int* optlen); + char* optval, socklen_t* optlen); static int set_sock_opt(int fd, int level, int optname, - const char *optval, int optlen); + const char* optval, socklen_t optlen); static int get_host_name(char* name, int namelen); - static struct hostent* get_host_by_name(char* name); + static struct hostent* get_host_by_name(char* name); // Printing 64 bit integers static const char* jlong_format_specifier(); @@ -715,7 +715,6 @@ # include "os_bsd_zero.hpp" #endif - // debugging support (mostly used by debug.cpp but also fatal error handler) static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address