mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Clean up more WIN32 APIs
This commit is contained in:
parent
44b88d659d
commit
929478c524
60 changed files with 74 additions and 962 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nt/thunk/msabi.h"
|
||||
#include "libc/nt/winsock.h"
|
||||
#include "libc/sock/internal.h"
|
||||
#include "libc/sock/struct/sockaddr.h"
|
||||
|
@ -30,6 +31,8 @@
|
|||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/sock.h"
|
||||
|
||||
__msabi extern typeof(__sys_closesocket_nt) *const __imp_closesocket;
|
||||
|
||||
union AcceptExAddr {
|
||||
struct sockaddr_storage addr;
|
||||
char buf[sizeof(struct sockaddr_storage) + 16];
|
||||
|
@ -70,7 +73,7 @@ textwindows int sys_accept_nt(struct Fd *fd, struct sockaddr_storage *addr,
|
|||
if (__wsablock(fd, &overlapped, &completion_flags, kSigOpRestartable,
|
||||
sockfd->rcvtimeo) == -1) {
|
||||
WSACloseEvent(overlapped.hEvent);
|
||||
__sys_closesocket_nt(handle);
|
||||
__imp_closesocket(handle);
|
||||
free(sockfd2);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue