Add epoll and do more release readiness changes

This change also pays off some of the remaining technical debt with
stdio, file descriptors, and memory managemnt polyfills.
This commit is contained in:
Justine Tunney 2020-11-28 12:01:51 -08:00
parent a9ea949df8
commit 3e4fd4b0ad
271 changed files with 5706 additions and 1365 deletions

View file

@ -20,6 +20,7 @@
#include "libc/assert.h"
#include "libc/calls/internal.h"
#include "libc/sock/internal.h"
#include "libc/sock/yoink.inc"
/**
* Performs recv(), recvfrom(), or readv() on Windows NT.
@ -32,12 +33,12 @@ textwindows ssize_t recvfrom$nt(struct Fd *fd, const struct iovec *iov,
void *opt_out_srcaddr,
uint32_t *opt_inout_srcaddrsize) {
uint32_t got;
struct iovec$nt iovnt[16];
struct NtIovec iovnt[16];
got = 0;
if (WSARecvFrom(fd->handle, iovnt, iovec2nt(iovnt, iov, iovlen), &got, &flags,
opt_out_srcaddr, opt_inout_srcaddrsize, NULL, NULL) != -1) {
return got;
} else {
return winsockerr();
return __winsockerr();
}
}