Remove dollars from system call support symbols

This commit is contained in:
Justine Tunney 2021-02-03 19:35:29 -08:00
parent a8d7195777
commit a37960a3af
743 changed files with 1380 additions and 2016 deletions

View file

@ -35,7 +35,7 @@
#include "libc/sysv/consts/o.h"
#include "libc/sysv/errfuns.h"
static textwindows int64_t open$nt$impl(int dirfd, const char *path,
static textwindows int64_t sys_open_nt$impl(int dirfd, const char *path,
uint32_t flags, int32_t mode) {
uint32_t br;
int64_t handle;
@ -76,7 +76,7 @@ static textwindows int64_t open$nt$impl(int dirfd, const char *path,
}
}
static textwindows ssize_t open$nt$console(int dirfd,
static textwindows ssize_t sys_open_nt$console(int dirfd,
const struct NtMagicPaths *mp,
uint32_t flags, int32_t mode,
size_t fd) {
@ -84,11 +84,11 @@ static textwindows ssize_t open$nt$console(int dirfd,
GetFileType(g_fds.p[STDOUT_FILENO].handle) == kNtFileTypeChar) {
g_fds.p[fd].handle = g_fds.p[STDIN_FILENO].handle;
g_fds.p[fd].extra = g_fds.p[STDOUT_FILENO].handle;
} else if ((g_fds.p[fd].handle = open$nt$impl(
} else if ((g_fds.p[fd].handle = sys_open_nt$impl(
dirfd, mp->conin, (flags & ~O_ACCMODE) | O_RDONLY, mode)) !=
-1) {
g_fds.p[fd].extra =
open$nt$impl(dirfd, mp->conout, (flags & ~O_ACCMODE) | O_WRONLY, mode);
sys_open_nt$impl(dirfd, mp->conout, (flags & ~O_ACCMODE) | O_WRONLY, mode);
assert(g_fds.p[fd].extra != -1);
} else {
return -1;
@ -98,10 +98,10 @@ static textwindows ssize_t open$nt$console(int dirfd,
return fd;
}
static textwindows ssize_t open$nt$file(int dirfd, const char *file,
static textwindows ssize_t sys_open_nt$file(int dirfd, const char *file,
uint32_t flags, int32_t mode,
size_t fd) {
if ((g_fds.p[fd].handle = open$nt$impl(dirfd, file, flags, mode)) != -1) {
if ((g_fds.p[fd].handle = sys_open_nt$impl(dirfd, file, flags, mode)) != -1) {
g_fds.p[fd].kind = kFdFile;
g_fds.p[fd].flags = flags;
return fd;
@ -110,15 +110,15 @@ static textwindows ssize_t open$nt$file(int dirfd, const char *file,
}
}
textwindows ssize_t open$nt(int dirfd, const char *file, uint32_t flags,
textwindows ssize_t sys_open_nt(int dirfd, const char *file, uint32_t flags,
int32_t mode) {
int fd;
ssize_t rc;
if ((fd = __reservefd()) == -1) return -1;
if ((flags & O_ACCMODE) == O_RDWR && !strcmp(file, kNtMagicPaths.devtty)) {
rc = open$nt$console(dirfd, &kNtMagicPaths, flags, mode, fd);
rc = sys_open_nt$console(dirfd, &kNtMagicPaths, flags, mode, fd);
} else {
rc = open$nt$file(dirfd, file, flags, mode, fd);
rc = sys_open_nt$file(dirfd, file, flags, mode, fd);
}
if (rc == -1) {
__releasefd(fd);