From 3787b37ef2c8a86a1c67ccef6dde3df568ed5ae9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 20 Jan 2009 11:16:59 +0000 Subject: * autoload.cc (WSAIoctl): Reintroduce. (WSASendMsg): Define. * fhandler.h (class fhandler_socket): Change definition of recv_internal and send_internal to take WSAMSG pointer as parameter. * fhandler_socket.cc (WSAID_WSARECVMSG): Define. (LPFN_WSARECVMSG): Define. (WSASendMsg): Declare. (get_ext_funcptr): New function to fetch address of WSARecvMsg. (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter. Change code accordingly. If control information is requested, fetch address of WSARecvMsg and use that instead of WSARecvFrom. (fhandler_socket::recvfrom): Change return type to ssize_t as declared in fhandler.h. Accommodate changes to recv_internal. (fhandler_socket::recvmsg): Ditto. Make sure that control information is only requested if system, address family, and socket type support it. (fhandler_socket::send_internal): Take just a LPWSAMSG parameter and the flags. Change code accordingly. If control information is provided, use WSASendMsg instead of WSASendTo. (fhandler_socket::sendto): Drop useless comment. Accommodate changes to send_internal. (fhandler_socket::sendmsg): Ditto. Make sure that control information is only provided if system, address family, and socket type support it. * wincap.h (wincaps::has_recvmsg): New element. (wincaps::has_sendmsg): New element * wincap.cc: Implement above elements throughout. * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment of type struct cmsghdr. --- winsup/cygwin/wincap.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'winsup/cygwin/wincap.cc') diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 646e3dc80..9fc2b211f 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -51,6 +51,8 @@ wincaps wincap_unknown __attribute__((section (".cygwin_dll_common"), shared)) = has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:false, + has_sendmsg:false, }; wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -84,6 +86,8 @@ wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = { has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:false, + has_sendmsg:false, }; wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -117,6 +121,8 @@ wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) = has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:false, + has_sendmsg:false, }; wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -150,6 +156,8 @@ wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = { has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:false, + has_sendmsg:false, }; wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -183,6 +191,8 @@ wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:false, + has_sendmsg:false, }; wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -216,6 +226,8 @@ wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = { has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:true, + has_sendmsg:false, }; wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -249,6 +261,8 @@ wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = { has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:true, + has_sendmsg:false, }; wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -282,6 +296,8 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = { has_restricted_stack_args:false, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:true, + has_sendmsg:false, }; wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -315,6 +331,8 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = { has_restricted_stack_args:true, has_transactions:false, ts_has_dep_problem:false, + has_recvmsg:true, + has_sendmsg:false, }; wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { @@ -348,6 +366,8 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = { has_restricted_stack_args:false, has_transactions:true, ts_has_dep_problem:false, + has_recvmsg:true, + has_sendmsg:true, }; wincapc wincap __attribute__((section (".cygwin_dll_common"), shared)); -- cgit v1.2.3