cosmopolitan/libc/nt/ws2_32
Justine Tunney 1d4eb08fa1
Support non-blocking i/o across platforms
This change introduces new tests for `O_NONBLOCK` and `SOCK_NONBLOCK` to
confirm that non-blocking i/o is now working on all supported platforms,
including Windows. For example, you can now say on Windows, MacOS, etc.:

    socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, IPPROTO_TCP);

To create a non-blocking IPv4 TCP socket. Or you can enable non-blocking
i/o on an existing socket / pipe / etc. file descriptor by calling fcntl

    fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);

This functionality is polyfilled on older Linux kernels too, e.g. RHEL5.
Now that fcntl() support is much better the FIOCLEX / FIONCLEX polyfills
for ioctl() have been removed since they're ugly non-POSIX diameond APIs

This change fixes a weakness in kprintf() that was causing Windows trace
tools to frequently crash.
2023-07-23 02:56:47 -07:00
..
accept.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
bind.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
closesocket.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
connect.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
freeaddrinfo.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
FreeAddrInfoExW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
FreeAddrInfoW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
getaddrinfo.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
GetAddrInfoExCancel.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
GetAddrInfoExOverlappedResult.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
GetAddrInfoExW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
GetAddrInfoW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
gethostbyaddr.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
gethostbyname.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
gethostname.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
GetHostNameW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
getnameinfo.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
GetNameInfoW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
getpeername.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
getprotobyname.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
getprotobynumber.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
getservbyname.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
getservbyport.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
getsockname.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
getsockopt.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
ioctlsocket.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
listen.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
recv.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
recvfrom.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
select.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
send.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
sendto.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
SetAddrInfoExW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
setsockopt.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
shutdown.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
socket.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAAccept.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAAddressToStringW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAAsyncGetHostByAddr.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAAsyncGetHostByName.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAAsyncGetProtoByName.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAAsyncGetProtoByNumber.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAAsyncGetServByName.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSAAsyncGetServByPort.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSAAsyncSelect.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSACancelAsyncRequest.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSACancelBlockingCall.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSACleanup.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSACloseEvent.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAConnect.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAConnectByList.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAConnectByNameW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSACreateEvent.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSADuplicateSocketW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAEnumNameSpaceProvidersExW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAEnumNameSpaceProvidersW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAEnumNetworkEvents.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAEnumProtocolsW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAEventSelect.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAGetLastError.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAGetOverlappedResult.S Support non-blocking i/o across platforms 2023-07-23 02:56:47 -07:00
WSAGetQOSByName.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAGetServiceClassInfoW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAGetServiceClassNameByClassIdW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAInstallServiceClassW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAIoctl.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAJoinLeaf.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSALookupServiceBeginW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSALookupServiceEnd.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSALookupServiceNextW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSANSPIoctl.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAPoll.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAProviderCompleteAsyncCall.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSAProviderConfigChange.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSApSetPostRoutine.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSARecv.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSARecvDisconnect.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSARecvFrom.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSARemoveServiceClass.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAResetEvent.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASend.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASendDisconnect.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASendMsg.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASendTo.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASetBlockingHook.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSASetEvent.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASetLastError.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASetServiceW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSASocketW.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAStartup.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSAStringToAddressW.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSAUnadvertiseProvider.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSAUnhookBlockingHook.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSAWaitForMultipleEvents.S Get --ftrace working on aarch64 2023-06-05 23:35:31 -07:00
WSCDeinstallProvider.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCDeinstallProvider32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCDeinstallProviderEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCEnableNSProvider.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCEnableNSProvider32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCEnumNameSpaceProviders32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCEnumNameSpaceProvidersEx32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCEnumProtocols.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCEnumProtocols32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCEnumProtocolsEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCGetApplicationCategory.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCGetApplicationCategoryEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCGetProviderInfo.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCGetProviderInfo32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCGetProviderPath.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCGetProviderPath32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallNameSpace.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallNameSpace32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallNameSpaceEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallNameSpaceEx2.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallNameSpaceEx32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallProvider.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallProvider64_32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallProviderAndChains64_32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCInstallProviderEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCSetApplicationCategory.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCSetApplicationCategoryEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCSetProviderInfo.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCSetProviderInfo32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCUnInstallNameSpace.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCUnInstallNameSpace32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCUnInstallNameSpaceEx2.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCUpdateProvider.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCUpdateProvider32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCUpdateProviderEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCWriteNameSpaceOrder.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCWriteNameSpaceOrder32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCWriteProviderOrder.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCWriteProviderOrder32.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
WSCWriteProviderOrderEx.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00