Mercurial > hg > truffle
comparison src/os/windows/vm/os_windows.cpp @ 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 | 4b18532913c7 |
comparison
equal
deleted
inserted
replaced
4716:4502fd5c7698 | 4717:11c26bfcf8c7 |
---|---|
4849 } | 4849 } |
4850 sock_initialized = TRUE; | 4850 sock_initialized = TRUE; |
4851 ::mutexUnlock(&sockFnTableMutex); | 4851 ::mutexUnlock(&sockFnTableMutex); |
4852 } | 4852 } |
4853 | 4853 |
4854 struct hostent* os::get_host_by_name(char* name) { | 4854 struct hostent* os::get_host_by_name(char* name) { |
4855 if (!sock_initialized) { | 4855 if (!sock_initialized) { |
4856 initSock(); | 4856 initSock(); |
4857 } | 4857 } |
4858 if (!os::WinSock2Dll::WinSock2Available()) { | 4858 if (!os::WinSock2Dll::WinSock2Available()) { |
4859 return NULL; | 4859 return NULL; |
4880 int os::listen(int fd, int count) { | 4880 int os::listen(int fd, int count) { |
4881 ShouldNotReachHere(); | 4881 ShouldNotReachHere(); |
4882 return 0; | 4882 return 0; |
4883 } | 4883 } |
4884 | 4884 |
4885 int os::connect(int fd, struct sockaddr *him, int len) { | 4885 int os::connect(int fd, struct sockaddr* him, socklen_t len) { |
4886 ShouldNotReachHere(); | 4886 ShouldNotReachHere(); |
4887 return 0; | 4887 return 0; |
4888 } | 4888 } |
4889 | 4889 |
4890 int os::accept(int fd, struct sockaddr *him, int *len) { | 4890 int os::accept(int fd, struct sockaddr* him, socklen_t* len) { |
4891 ShouldNotReachHere(); | 4891 ShouldNotReachHere(); |
4892 return 0; | 4892 return 0; |
4893 } | 4893 } |
4894 | 4894 |
4895 int os::sendto(int fd, char *buf, int len, int flags, | 4895 int os::sendto(int fd, char* buf, size_t len, uint flags, |
4896 struct sockaddr *to, int tolen) { | 4896 struct sockaddr* to, socklen_t tolen) { |
4897 ShouldNotReachHere(); | 4897 ShouldNotReachHere(); |
4898 return 0; | 4898 return 0; |
4899 } | 4899 } |
4900 | 4900 |
4901 int os::recvfrom(int fd, char *buf, int nBytes, int flags, | 4901 int os::recvfrom(int fd, char *buf, size_t nBytes, uint flags, |
4902 sockaddr *from, int *fromlen) { | 4902 sockaddr* from, socklen_t* fromlen) { |
4903 ShouldNotReachHere(); | 4903 ShouldNotReachHere(); |
4904 return 0; | 4904 return 0; |
4905 } | 4905 } |
4906 | 4906 |
4907 int os::recv(int fd, char *buf, int nBytes, int flags) { | 4907 int os::recv(int fd, char* buf, size_t nBytes, uint flags) { |
4908 ShouldNotReachHere(); | 4908 ShouldNotReachHere(); |
4909 return 0; | 4909 return 0; |
4910 } | 4910 } |
4911 | 4911 |
4912 int os::send(int fd, char *buf, int nBytes, int flags) { | 4912 int os::send(int fd, char* buf, size_t nBytes, uint flags) { |
4913 ShouldNotReachHere(); | 4913 ShouldNotReachHere(); |
4914 return 0; | 4914 return 0; |
4915 } | 4915 } |
4916 | 4916 |
4917 int os::raw_send(int fd, char *buf, int nBytes, int flags) { | 4917 int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) { |
4918 ShouldNotReachHere(); | 4918 ShouldNotReachHere(); |
4919 return 0; | 4919 return 0; |
4920 } | 4920 } |
4921 | 4921 |
4922 int os::timeout(int fd, long timeout) { | 4922 int os::timeout(int fd, long timeout) { |
4932 int os::socket_shutdown(int fd, int howto) { | 4932 int os::socket_shutdown(int fd, int howto) { |
4933 ShouldNotReachHere(); | 4933 ShouldNotReachHere(); |
4934 return 0; | 4934 return 0; |
4935 } | 4935 } |
4936 | 4936 |
4937 int os::bind(int fd, struct sockaddr *him, int len) { | 4937 int os::bind(int fd, struct sockaddr* him, socklen_t len) { |
4938 ShouldNotReachHere(); | 4938 ShouldNotReachHere(); |
4939 return 0; | 4939 return 0; |
4940 } | 4940 } |
4941 | 4941 |
4942 int os::get_sock_name(int fd, struct sockaddr *him, int *len) { | 4942 int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len) { |
4943 ShouldNotReachHere(); | 4943 ShouldNotReachHere(); |
4944 return 0; | 4944 return 0; |
4945 } | 4945 } |
4946 | 4946 |
4947 int os::get_sock_opt(int fd, int level, int optname, | 4947 int os::get_sock_opt(int fd, int level, int optname, |
4948 char *optval, int* optlen) { | 4948 char* optval, socklen_t* optlen) { |
4949 ShouldNotReachHere(); | 4949 ShouldNotReachHere(); |
4950 return 0; | 4950 return 0; |
4951 } | 4951 } |
4952 | 4952 |
4953 int os::set_sock_opt(int fd, int level, int optname, | 4953 int os::set_sock_opt(int fd, int level, int optname, |
4954 const char *optval, int optlen) { | 4954 const char* optval, socklen_t optlen) { |
4955 ShouldNotReachHere(); | 4955 ShouldNotReachHere(); |
4956 return 0; | 4956 return 0; |
4957 } | 4957 } |
4958 | 4958 |
4959 | 4959 |