mirror of
https://github.com/ziglang/zig.git
synced 2025-12-14 18:23:12 +00:00
also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging
19 lines
270 B
C
19 lines
270 B
C
#include <unistd.h>
|
|
#include <errno.h>
|
|
#include "syscall.h"
|
|
|
|
static int dummy(int fd)
|
|
{
|
|
return fd;
|
|
}
|
|
|
|
weak_alias(dummy, __aio_close);
|
|
|
|
int close(int fd)
|
|
{
|
|
fd = __aio_close(fd);
|
|
int r = __syscall_cp(SYS_close, fd);
|
|
if (r == -EINTR) r = 0;
|
|
return __syscall_ret(r);
|
|
}
|