mirror of
https://github.com/ziglang/zig.git
synced 2025-12-23 22:53:06 +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
14 lines
207 B
C
Vendored
14 lines
207 B
C
Vendored
#include <stdlib.h>
|
|
#include <errno.h>
|
|
|
|
char *ptsname(int fd)
|
|
{
|
|
static char buf[9 + sizeof(int)*3 + 1];
|
|
int err = __ptsname_r(fd, buf, sizeof buf);
|
|
if (err) {
|
|
errno = err;
|
|
return 0;
|
|
}
|
|
return buf;
|
|
}
|