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

@ -22,11 +22,11 @@
#include "libc/sysv/errfuns.h"
textwindows int fdatasync$nt(int fd) {
if (!isfdkind(fd, kFdFile)) return ebadf();
if (!__isfdkind(fd, kFdFile)) return ebadf();
/*
* XXX: On Windows NT this might be more analagous to fflush() and
* Microsoft docs say to do manual block i/o for database-ish
* guarantees on disk persistence. Consider: Really good UPS.
*/
return FlushFileBuffers(g_fds.p[fd].handle) ? 0 : winerr();
return FlushFileBuffers(g_fds.p[fd].handle) ? 0 : __winerr();
}