comparison 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
comparison
equal deleted inserted replaced
4716:4502fd5c7698 4717:11c26bfcf8c7
582 582
583 // SocketInterface (ex HPI SocketInterface ) 583 // SocketInterface (ex HPI SocketInterface )
584 static int socket(int domain, int type, int protocol); 584 static int socket(int domain, int type, int protocol);
585 static int socket_close(int fd); 585 static int socket_close(int fd);
586 static int socket_shutdown(int fd, int howto); 586 static int socket_shutdown(int fd, int howto);
587 static int recv(int fd, char *buf, int nBytes, int flags); 587 static int recv(int fd, char* buf, size_t nBytes, uint flags);
588 static int send(int fd, char *buf, int nBytes, int flags); 588 static int send(int fd, char* buf, size_t nBytes, uint flags);
589 static int raw_send(int fd, char *buf, int nBytes, int flags); 589 static int raw_send(int fd, char* buf, size_t nBytes, uint flags);
590 static int timeout(int fd, long timeout); 590 static int timeout(int fd, long timeout);
591 static int listen(int fd, int count); 591 static int listen(int fd, int count);
592 static int connect(int fd, struct sockaddr *him, int len); 592 static int connect(int fd, struct sockaddr* him, socklen_t len);
593 static int bind(int fd, struct sockaddr *him, int len); 593 static int bind(int fd, struct sockaddr* him, socklen_t len);
594 static int accept(int fd, struct sockaddr *him, int *len); 594 static int accept(int fd, struct sockaddr* him, socklen_t* len);
595 static int recvfrom(int fd, char *buf, int nbytes, int flags, 595 static int recvfrom(int fd, char* buf, size_t nbytes, uint flags,
596 struct sockaddr *from, int *fromlen); 596 struct sockaddr* from, socklen_t* fromlen);
597 static int get_sock_name(int fd, struct sockaddr *him, int *len); 597 static int get_sock_name(int fd, struct sockaddr* him, socklen_t* len);
598 static int sendto(int fd, char *buf, int len, int flags, 598 static int sendto(int fd, char* buf, size_t len, uint flags,
599 struct sockaddr *to, int tolen); 599 struct sockaddr* to, socklen_t tolen);
600 static int socket_available(int fd, jint *pbytes); 600 static int socket_available(int fd, jint* pbytes);
601 601
602 static int get_sock_opt(int fd, int level, int optname, 602 static int get_sock_opt(int fd, int level, int optname,
603 char *optval, int* optlen); 603 char* optval, socklen_t* optlen);
604 static int set_sock_opt(int fd, int level, int optname, 604 static int set_sock_opt(int fd, int level, int optname,
605 const char *optval, int optlen); 605 const char* optval, socklen_t optlen);
606 static int get_host_name(char* name, int namelen); 606 static int get_host_name(char* name, int namelen);
607 607
608 static struct hostent* get_host_by_name(char* name); 608 static struct hostent* get_host_by_name(char* name);
609 609
610 // Printing 64 bit integers 610 // Printing 64 bit integers
611 static const char* jlong_format_specifier(); 611 static const char* jlong_format_specifier();
612 static const char* julong_format_specifier(); 612 static const char* julong_format_specifier();
613 613
713 #endif 713 #endif
714 #ifdef TARGET_OS_ARCH_bsd_zero 714 #ifdef TARGET_OS_ARCH_bsd_zero
715 # include "os_bsd_zero.hpp" 715 # include "os_bsd_zero.hpp"
716 #endif 716 #endif
717 717
718
719 // debugging support (mostly used by debug.cpp but also fatal error handler) 718 // debugging support (mostly used by debug.cpp but also fatal error handler)
720 static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address 719 static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address
721 720
722 static bool dont_yield(); // when true, JVM_Yield() is nop 721 static bool dont_yield(); // when true, JVM_Yield() is nop
723 static void print_statistics(); 722 static void print_statistics();