mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Replace COSMO define with _COSMO_SOURCE
This change might cause ABI breakages for /opt/cosmos. It's needed to help us better conform to header declaration practices.
This commit is contained in:
parent
a033b65a33
commit
c776a32f75
238 changed files with 858 additions and 1069 deletions
|
@ -104,7 +104,7 @@ TEST(diagnose_syscall, getpid) {
|
|||
// netbsd puts parent pid in edx
|
||||
// xnu seems to just clobber it!
|
||||
ASSERT_STREQ("rax rdx rcx r11", _gc(DiffContexts(&x, &y)));
|
||||
} else if (IsWsl1()) {
|
||||
} else if (__iswsl1()) {
|
||||
// XXX: WSL1 must be emulating SYSCALL instructions.
|
||||
ASSERT_STREQ("rax rcx", _gc(DiffContexts(&x, &y)));
|
||||
} else {
|
||||
|
@ -117,7 +117,7 @@ TEST(diagnose_syscall, testWriteSuccess) {
|
|||
diagnose_syscall(__NR_write, 2, Z, 0, Z, Z, Z, Z, &x, &y);
|
||||
if (IsFreebsd()) {
|
||||
ASSERT_STREQ("rax rcx r8 r9 r10 r11", _gc(DiffContexts(&x, &y)));
|
||||
} else if (IsWsl1()) {
|
||||
} else if (__iswsl1()) {
|
||||
// XXX: WSL1 must be emulating SYSCALL instructions.
|
||||
ASSERT_STREQ("rax rcx", _gc(DiffContexts(&x, &y)));
|
||||
} else {
|
||||
|
@ -132,7 +132,7 @@ TEST(diagnose_syscall, testWriteFailed) {
|
|||
ASSERT_STREQ("rax rcx r8 r9 r10 r11 cf", _gc(DiffContexts(&x, &y)));
|
||||
} else if (IsBsd()) {
|
||||
ASSERT_STREQ("rax rcx r11 cf", _gc(DiffContexts(&x, &y)));
|
||||
} else if (IsWsl1()) {
|
||||
} else if (__iswsl1()) {
|
||||
// XXX: WSL1 must be emulating SYSCALL instructions.
|
||||
ASSERT_STREQ("rax rcx", _gc(DiffContexts(&x, &y)));
|
||||
} else {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "libc/sock/sock.h"
|
||||
#include "libc/sock/struct/sockaddr.h"
|
||||
#include "libc/sock/struct/sockaddr6.h"
|
||||
#include "libc/stdio/internal.h"
|
||||
#include "libc/stdio/lock.internal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/sysv/consts/af.h"
|
||||
|
@ -605,7 +606,7 @@ TEST(pledge_openbsd, bigSyscalls) {
|
|||
|
||||
int LockWorker(void *arg, int tid) {
|
||||
flockfile(stdout);
|
||||
ASSERT_EQ(gettid(), ((pthread_mutex_t *)stdout->lock)->_owner);
|
||||
ASSERT_EQ(gettid(), stdout->lock._owner);
|
||||
funlockfile(stdout);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ TEST(readlinkat, realpathReturnsLongPath) {
|
|||
struct stat st;
|
||||
char buf[PATH_MAX];
|
||||
if (!IsWindows()) return;
|
||||
if (!_startswith(getcwd(buf, PATH_MAX), "/c/")) return;
|
||||
if (!startswith(getcwd(buf, PATH_MAX), "/c/")) return;
|
||||
ASSERT_SYS(0, 0, touch("froot", 0644));
|
||||
ASSERT_STARTSWITH("/c/", realpath("froot", buf));
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ TEST(sigaction, autoZombieSlayer) {
|
|||
ASSERT_NE(-1, (pid = fork()));
|
||||
if (!pid) _Exit(0);
|
||||
// XXX: WSL does the wrong thing here.
|
||||
if (IsWsl1()) usleep(10);
|
||||
if (__iswsl1()) usleep(10);
|
||||
ASSERT_SYS(ECHILD, -1, wait(0));
|
||||
// clean up
|
||||
ASSERT_SYS(0, 0, sigaction(SIGCHLD, &sa, 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue