mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Fix Clang support
The amalgamated release is now confirmed to be working with Clang, including its integrated assembler. Fixes #41
This commit is contained in:
parent
e06c90fafc
commit
d7733579d3
103 changed files with 384 additions and 359 deletions
|
@ -22,7 +22,7 @@
|
|||
#include "libc/sysv/consts/s.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
int fstat$metal(int fd, struct stat *st) {
|
||||
int fstat_metal(int fd, struct stat *st) {
|
||||
if (fd < 0) return einval();
|
||||
if (fd < g_fds.n && g_fds.p[fd].kind == kFdSerial) {
|
||||
memset(st, 0, sizeof(*st));
|
||||
|
|
|
@ -35,7 +35,7 @@ int fstat(int fd, struct stat *st) {
|
|||
if (!IsMetal()) {
|
||||
return sys_fstat(fd, st);
|
||||
} else {
|
||||
return fstat$metal(fd, st);
|
||||
return fstat_metal(fd, st);
|
||||
}
|
||||
} else {
|
||||
if (!__isfdkind(fd, kFdFile)) return ebadf();
|
||||
|
|
|
@ -290,14 +290,14 @@ unsigned __wincrash_nt(struct NtExceptionPointers *);
|
|||
│ cosmopolitan § syscalls » metal ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
int fstat$metal(int, struct stat *);
|
||||
int fstat_metal(int, struct stat *);
|
||||
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
│ cosmopolitan § syscalls » drivers ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
ssize_t readv$serial(struct Fd *, const struct iovec *, int) hidden;
|
||||
ssize_t writev$serial(struct Fd *, const struct iovec *, int) hidden;
|
||||
ssize_t readv_serial(struct Fd *, const struct iovec *, int) hidden;
|
||||
ssize_t writev_serial(struct Fd *, const struct iovec *, int) hidden;
|
||||
|
||||
#undef sigset
|
||||
#undef i32
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "libc/sock/internal.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
int ioctl$default(int fd, uint64_t request, void *memory) {
|
||||
int ioctl_default(int fd, uint64_t request, void *memory) {
|
||||
int rc;
|
||||
int64_t handle;
|
||||
if (!IsWindows()) {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "libc/sysv/consts/termios.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
textwindows int ioctl$sys_tcgets_nt(int ignored, struct termios *tio) {
|
||||
textwindows int ioctl_tcgets_nt(int ignored, struct termios *tio) {
|
||||
int64_t in, out;
|
||||
bool32 inok, outok;
|
||||
uint32_t inmode, outmode;
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#include "libc/calls/termios.internal.h"
|
||||
#include "libc/sysv/consts/termios.h"
|
||||
|
||||
int ioctl$sys_tcgets_nt(int, struct termios *);
|
||||
int ioctl_tcgets_nt(int, struct termios *) hidden;
|
||||
|
||||
static int ioctl$sys_tcgets(int fd, struct termios *tio) {
|
||||
static int ioctl_tcgets_sysv(int fd, struct termios *tio) {
|
||||
int rc;
|
||||
union metatermios t;
|
||||
if ((rc = sys_ioctl(fd, TCGETS, &t)) != -1) {
|
||||
|
@ -39,10 +39,10 @@ static int ioctl$sys_tcgets(int fd, struct termios *tio) {
|
|||
* @see ioctl(fd, TCGETS, tio) dispatches here
|
||||
* @see ioctl(fd, TIOCGETA, tio) dispatches here
|
||||
*/
|
||||
int ioctl$tcgets(int fd, struct termios *tio) {
|
||||
int ioctl_tcgets(int fd, struct termios *tio) {
|
||||
if (!IsWindows()) {
|
||||
return ioctl$sys_tcgets(fd, tio);
|
||||
return ioctl_tcgets_sysv(fd, tio);
|
||||
} else {
|
||||
return ioctl$sys_tcgets_nt(fd, tio);
|
||||
return ioctl_tcgets_nt(fd, tio);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "libc/sysv/consts/termios.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
textwindows int ioctl$sys_tcsets_nt(int ignored, uint64_t request,
|
||||
textwindows int ioctl_tcsets_nt(int ignored, uint64_t request,
|
||||
const struct termios *tio) {
|
||||
int64_t in, out;
|
||||
bool32 inok, outok;
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/sysv/consts/termios.h"
|
||||
|
||||
int ioctl$sys_tcsets_nt(int, uint64_t, const struct termios *);
|
||||
int ioctl_tcsets_nt(int, uint64_t, const struct termios *);
|
||||
|
||||
static int ioctl$sys_tcsets(int fd, uint64_t request,
|
||||
static int ioctl_tcsets_sysv(int fd, uint64_t request,
|
||||
const struct termios *tio) {
|
||||
union metatermios t;
|
||||
return sys_ioctl(fd, request, termios2host(&t, tio));
|
||||
|
@ -37,10 +37,10 @@ static int ioctl$sys_tcsets(int fd, uint64_t request,
|
|||
* @see ioctl(fd, TCSETS{,W,F}, tio) dispatches here
|
||||
* @see ioctl(fd, TIOCGETA{,W,F}, tio) dispatches here
|
||||
*/
|
||||
int ioctl$tcsets(int fd, uint64_t request, const struct termios *tio) {
|
||||
int ioctl_tcsets(int fd, uint64_t request, const struct termios *tio) {
|
||||
if (!IsWindows()) {
|
||||
return ioctl$sys_tcsets(fd, request, tio);
|
||||
return ioctl_tcsets_sysv(fd, request, tio);
|
||||
} else {
|
||||
return ioctl$sys_tcsets_nt(fd, request, tio);
|
||||
return ioctl_tcsets_nt(fd, request, tio);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
textwindows int ioctl$sys_tiocgwinsz_nt(int fd, struct winsize *ws) {
|
||||
textwindows int ioctl_tiocgwinsz_nt(int fd, struct winsize *ws) {
|
||||
int i, fds[3];
|
||||
uint32_t mode;
|
||||
struct NtConsoleScreenBufferInfoEx sbinfo;
|
||||
|
|
|
@ -21,17 +21,17 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/sysv/consts/termios.h"
|
||||
|
||||
int ioctl$sys_tiocgwinsz_nt(int, struct winsize *);
|
||||
int ioctl_tiocgwinsz_nt(int, struct winsize *);
|
||||
|
||||
/**
|
||||
* Returns width and height of terminal.
|
||||
*
|
||||
* @see ioctl(fd, TIOCGWINSZ, ws) dispatches here
|
||||
*/
|
||||
int ioctl$tiocgwinsz(int fd, struct winsize *ws) {
|
||||
int ioctl_tiocgwinsz(int fd, struct winsize *ws) {
|
||||
if (!IsWindows()) {
|
||||
return sys_ioctl(fd, TIOCGWINSZ, ws);
|
||||
} else {
|
||||
return ioctl$sys_tiocgwinsz_nt(fd, ws);
|
||||
return ioctl_tiocgwinsz_nt(fd, ws);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
textwindows int ioctl$sys_tiocswinsz_nt(int fd, const struct winsize *ws) {
|
||||
textwindows int ioctl_tiocswinsz_nt(int fd, const struct winsize *ws) {
|
||||
uint32_t mode;
|
||||
struct NtCoord coord;
|
||||
if (!ws) return efault();
|
||||
|
|
|
@ -21,17 +21,17 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/sysv/consts/termios.h"
|
||||
|
||||
int ioctl$sys_tiocswinsz_nt(int, const struct winsize *);
|
||||
int ioctl_tiocswinsz_nt(int, const struct winsize *);
|
||||
|
||||
/**
|
||||
* Returns width and height of terminal.
|
||||
*
|
||||
* @see ioctl(fd, TIOCSWINSZ, ws) dispatches here
|
||||
*/
|
||||
int ioctl$tiocswinsz(int fd, const struct winsize *ws) {
|
||||
int ioctl_tiocswinsz(int fd, const struct winsize *ws) {
|
||||
if (!IsWindows()) {
|
||||
return sys_ioctl(fd, TIOCSWINSZ, ws);
|
||||
} else {
|
||||
return ioctl$sys_tiocswinsz_nt(fd, ws);
|
||||
return ioctl_tiocswinsz_nt(fd, ws);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,5 +29,5 @@
|
|||
*/
|
||||
int(ioctl)(int fd, uint64_t request, void *memory) {
|
||||
__IOCTL_DISPATCH(EQUAL, fd, request, memory);
|
||||
return ioctl$default(fd, request, memory);
|
||||
return ioctl_default(fd, request, memory);
|
||||
}
|
||||
|
|
|
@ -16,31 +16,31 @@ int ioctl(int, uint64_t, void *);
|
|||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
|
||||
#define ioctl(FD, REQUEST, MEMORY) ioctl$dispatch(FD, REQUEST, MEMORY)
|
||||
#define ioctl(FD, REQUEST, MEMORY) ioctl_dispatch(FD, REQUEST, MEMORY)
|
||||
|
||||
#define __IOCTL_DISPATCH(CMP, FD, REQUEST, MEMORY) \
|
||||
do { \
|
||||
if (CMP(request, TIOCGWINSZ)) return ioctl$tiocgwinsz(FD, MEMORY); \
|
||||
if (CMP(request, TIOCSWINSZ)) return ioctl$tiocswinsz(FD, MEMORY); \
|
||||
if (CMP(request, TCGETS)) return ioctl$tcgets(FD, MEMORY); \
|
||||
if (CMP(request, TCSETS)) return ioctl$tcsets(FD, REQUEST, MEMORY); \
|
||||
if (CMP(request, TCSETSW)) return ioctl$tcsets(FD, REQUEST, MEMORY); \
|
||||
if (CMP(request, TCSETSF)) return ioctl$tcsets(FD, REQUEST, MEMORY); \
|
||||
if (CMP(request, TIOCGWINSZ)) return ioctl_tiocgwinsz(FD, MEMORY); \
|
||||
if (CMP(request, TIOCSWINSZ)) return ioctl_tiocswinsz(FD, MEMORY); \
|
||||
if (CMP(request, TCGETS)) return ioctl_tcgets(FD, MEMORY); \
|
||||
if (CMP(request, TCSETS)) return ioctl_tcsets(FD, REQUEST, MEMORY); \
|
||||
if (CMP(request, TCSETSW)) return ioctl_tcsets(FD, REQUEST, MEMORY); \
|
||||
if (CMP(request, TCSETSF)) return ioctl_tcsets(FD, REQUEST, MEMORY); \
|
||||
} while (0)
|
||||
|
||||
int ioctl$tcgets(int, void *);
|
||||
int ioctl$sys_tcgets_nt(int, void *);
|
||||
int ioctl$tcsets(int, uint64_t, void *);
|
||||
int ioctl$sys_tcsets_nt(int, uint64_t, void *);
|
||||
int ioctl$tiocgwinsz(int, void *);
|
||||
int ioctl$sys_tiocgwinsz_nt(int, void *);
|
||||
int ioctl$tiocswinsz(int, void *);
|
||||
int ioctl$sys_tiocswinsz_nt(int, void *);
|
||||
int ioctl$default(int, uint64_t, void *);
|
||||
int ioctl_tcgets(int, void *);
|
||||
int ioctl_tcgets_nt(int, void *);
|
||||
int ioctl_tcsets(int, uint64_t, void *);
|
||||
int ioctl_tcsets_nt(int, uint64_t, void *);
|
||||
int ioctl_tiocgwinsz(int, void *);
|
||||
int ioctl_tiocgwinsz_nt(int, void *);
|
||||
int ioctl_tiocswinsz(int, void *);
|
||||
int ioctl_tiocswinsz_nt(int, void *);
|
||||
int ioctl_default(int, uint64_t, void *);
|
||||
|
||||
forceinline int ioctl$dispatch(int fd, uint64_t request, void *memory) {
|
||||
forceinline int ioctl_dispatch(int fd, uint64_t request, void *memory) {
|
||||
__IOCTL_DISPATCH(EQUIVALENT, fd, request, memory);
|
||||
return ioctl$default(fd, request, memory);
|
||||
return ioctl_default(fd, request, memory);
|
||||
}
|
||||
|
||||
#endif /* GNUC && !ANSI */
|
||||
|
|
|
@ -73,11 +73,11 @@ static long double ConvertTicksToSeconds(uint64_t ticks) {
|
|||
return 1 / 1e9 * ConvertTicksToNanos(ticks);
|
||||
}
|
||||
|
||||
long double nowl$sys(void) {
|
||||
long double nowl_sys(void) {
|
||||
return dtime(CLOCK_REALTIME);
|
||||
}
|
||||
|
||||
long double nowl$art(void) {
|
||||
long double nowl_art(void) {
|
||||
uint64_t ticks;
|
||||
if (!g_now.once) InitTime();
|
||||
ticks = unsignedsubtract(rdtsc(), g_now.k0);
|
||||
|
|
|
@ -29,8 +29,8 @@ nowl: .quad 0
|
|||
.previous
|
||||
|
||||
.init.start 202,_init_nowl
|
||||
ezlea nowl$sys,ax
|
||||
ezlea nowl$art,cx
|
||||
ezlea nowl_sys,ax
|
||||
ezlea nowl_art,cx
|
||||
testb X86_HAVE(INVTSC)+kCpuids(%rip)
|
||||
cmovnz %rcx,%rax
|
||||
stosq
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
static textwindows int64_t sys_open_nt$impl(int dirfd, const char *path,
|
||||
uint32_t flags, int32_t mode) {
|
||||
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;
|
||||
char16_t path16[PATH_MAX];
|
||||
|
@ -76,19 +76,19 @@ static textwindows int64_t sys_open_nt$impl(int dirfd, const char *path,
|
|||
}
|
||||
}
|
||||
|
||||
static textwindows ssize_t sys_open_nt$console(int dirfd,
|
||||
const struct NtMagicPaths *mp,
|
||||
uint32_t flags, int32_t mode,
|
||||
size_t fd) {
|
||||
static textwindows ssize_t sys_open_nt_console(int dirfd,
|
||||
const struct NtMagicPaths *mp,
|
||||
uint32_t flags, int32_t mode,
|
||||
size_t fd) {
|
||||
if (GetFileType(g_fds.p[STDIN_FILENO].handle) == kNtFileTypeChar &&
|
||||
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 = sys_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 =
|
||||
sys_open_nt$impl(dirfd, mp->conout, (flags & ~O_ACCMODE) | O_WRONLY, mode);
|
||||
g_fds.p[fd].extra = 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 sys_open_nt$console(int dirfd,
|
|||
return fd;
|
||||
}
|
||||
|
||||
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 = sys_open_nt$impl(dirfd, file, flags, mode)) != -1) {
|
||||
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 = sys_open_nt_impl(dirfd, file, flags, mode)) != -1) {
|
||||
g_fds.p[fd].kind = kFdFile;
|
||||
g_fds.p[fd].flags = flags;
|
||||
return fd;
|
||||
|
@ -111,14 +111,14 @@ static textwindows ssize_t sys_open_nt$file(int dirfd, const char *file,
|
|||
}
|
||||
|
||||
textwindows ssize_t sys_open_nt(int dirfd, const char *file, uint32_t flags,
|
||||
int32_t mode) {
|
||||
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 = sys_open_nt$console(dirfd, &kNtMagicPaths, flags, mode, fd);
|
||||
rc = sys_open_nt_console(dirfd, &kNtMagicPaths, flags, mode, fd);
|
||||
} else {
|
||||
rc = sys_open_nt$file(dirfd, file, flags, mode, fd);
|
||||
rc = sys_open_nt_file(dirfd, file, flags, mode, fd);
|
||||
}
|
||||
if (rc == -1) {
|
||||
__releasefd(fd);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
static struct OpenAnon { int count; } g_openanon;
|
||||
|
||||
static void openanon$genpath(const char *name, struct OpenAnon *state,
|
||||
static void openanon_genpath(const char *name, struct OpenAnon *state,
|
||||
char pathbuf[hasatleast PATH_MAX]) {
|
||||
char c;
|
||||
size_t i;
|
||||
|
@ -55,11 +55,11 @@ static void openanon$genpath(const char *name, struct OpenAnon *state,
|
|||
assert(p < pe);
|
||||
}
|
||||
|
||||
static int openanon$impl(const char *name, unsigned flags,
|
||||
static int openanon_impl(const char *name, unsigned flags,
|
||||
struct OpenAnon *state,
|
||||
char pathbuf[hasatleast PATH_MAX]) {
|
||||
int fd;
|
||||
openanon$genpath(name, state, pathbuf);
|
||||
openanon_genpath(name, state, pathbuf);
|
||||
flags |= O_RDWR | O_CREAT | O_EXCL | O_TRUNC;
|
||||
if (!IsWindows()) {
|
||||
if ((fd = sys_openat(AT_FDCWD, pathbuf, flags, 0600)) != -1) {
|
||||
|
@ -95,5 +95,5 @@ static int openanon$impl(const char *name, unsigned flags,
|
|||
*/
|
||||
int openanon(char *name, unsigned flags) {
|
||||
char pathbuf[PATH_MAX];
|
||||
return openanon$impl(name, flags, &g_openanon, pathbuf);
|
||||
return openanon_impl(name, flags, &g_openanon, pathbuf);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ static int GetFirstIov(struct iovec *iov, int iovlen) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
ssize_t readv$serial(struct Fd *fd, const struct iovec *iov, int iovlen) {
|
||||
ssize_t readv_serial(struct Fd *fd, const struct iovec *iov, int iovlen) {
|
||||
size_t i, j, got = 0;
|
||||
if ((i = GetFirstIov(iov, iovlen)) != -1) {
|
||||
while (!IsDataAvailable(fd)) asm("pause");
|
||||
|
|
|
@ -37,7 +37,7 @@ ssize_t readv(int fd, const struct iovec *iov, int iovlen) {
|
|||
return weaken(__zipos_read)(
|
||||
(struct ZiposHandle *)(intptr_t)g_fds.p[fd].handle, iov, iovlen, -1);
|
||||
} else if (fd < g_fds.n && g_fds.p[fd].kind == kFdSerial) {
|
||||
return readv$serial(&g_fds.p[fd], iov, iovlen);
|
||||
return readv_serial(&g_fds.p[fd], iov, iovlen);
|
||||
} else if (!IsWindows()) {
|
||||
return sys_readv(fd, iov, iovlen);
|
||||
} else if (fd < g_fds.n &&
|
||||
|
|
|
@ -32,16 +32,16 @@ int posix_openpt(int) nodiscard;
|
|||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
|
||||
#define tcsetattr(FD, OPT, TIO) tcsetattr$dispatch(FD, OPT, TIO)
|
||||
forceinline int tcsetattr$dispatch(int fd, int opt, const struct termios *tio) {
|
||||
#define tcsetattr(FD, OPT, TIO) tcsetattr_dispatch(FD, OPT, TIO)
|
||||
forceinline int tcsetattr_dispatch(int fd, int opt, const struct termios *tio) {
|
||||
if (EQUIVALENT(opt, TCSANOW)) return ioctl(fd, TCSETS, (void *)tio);
|
||||
if (EQUIVALENT(opt, TCSADRAIN)) return ioctl(fd, TCSETSW, (void *)tio);
|
||||
if (EQUIVALENT(opt, TCSAFLUSH)) return ioctl(fd, TCSETSF, (void *)tio);
|
||||
return (tcsetattr)(fd, opt, tio);
|
||||
}
|
||||
|
||||
#define tcgetattr(FD, TIO) tcgetattr$dispatch(FD, TIO)
|
||||
forceinline int tcgetattr$dispatch(int fd, const struct termios *tio) {
|
||||
#define tcgetattr(FD, TIO) tcgetattr_dispatch(FD, TIO)
|
||||
forceinline int tcgetattr_dispatch(int fd, const struct termios *tio) {
|
||||
return ioctl(fd, TCGETS, (void *)tio);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/calls/internal.h"
|
||||
#include "libc/nexgen32e/uart.internal.h"
|
||||
|
||||
ssize_t writev$serial(struct Fd *fd, const struct iovec *iov, int iovlen) {
|
||||
ssize_t writev_serial(struct Fd *fd, const struct iovec *iov, int iovlen) {
|
||||
size_t i, j, wrote = 0;
|
||||
for (i = 0; i < iovlen; ++i) {
|
||||
for (j = 0; j < iov[i].iov_len; ++j) {
|
||||
|
|
|
@ -40,7 +40,7 @@ ssize_t writev(int fd, const struct iovec *iov, int iovlen) {
|
|||
return weaken(__zipos_write)(
|
||||
(struct ZiposHandle *)(intptr_t)g_fds.p[fd].handle, iov, iovlen, -1);
|
||||
} else if (fd < g_fds.n && g_fds.p[fd].kind == kFdSerial) {
|
||||
return writev$serial(&g_fds.p[fd], iov, iovlen);
|
||||
return writev_serial(&g_fds.p[fd], iov, iovlen);
|
||||
} else if (!IsWindows()) {
|
||||
return sys_writev(fd, iov, iovlen);
|
||||
} else if (fd < g_fds.n &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue