mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Fix breakages in Linux-only build modes
- compile.com now polyfills -march=native which gcc/clang removed - Guarantee zero Windows code is linked into non-Windows binaries - MODE=tinylinux binaries are now back to being as tiny as ~4kb - Improve the runtime's stack allocation / alignment hack - GitHub Actions now tests Linux modes for assurance
This commit is contained in:
parent
0e4c828a8e
commit
3dc86ce154
32 changed files with 283 additions and 104 deletions
|
@ -55,8 +55,10 @@ static errno_t sys_clock_nanosleep(int clock, int flags,
|
|||
rc = sys_clock_nanosleep_xnu(clock, flags, req, rem);
|
||||
} else if (IsOpenbsd()) {
|
||||
rc = sys_clock_nanosleep_openbsd(clock, flags, req, rem);
|
||||
} else {
|
||||
} else if (IsWindows()) {
|
||||
rc = sys_clock_nanosleep_nt(clock, flags, req, rem);
|
||||
} else {
|
||||
rc = enosys();
|
||||
}
|
||||
if (rc == -1) {
|
||||
rc = errno;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "libc/intrin/describeflags.internal.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
/**
|
||||
* Returns nice value of thing.
|
||||
|
@ -72,8 +73,10 @@ int getpriority(int which, unsigned who) {
|
|||
errno = rc;
|
||||
rc = -1;
|
||||
}
|
||||
} else {
|
||||
} else if (IsWindows()) {
|
||||
rc = sys_getpriority_nt(which, who);
|
||||
} else {
|
||||
rc = enosys();
|
||||
}
|
||||
#else
|
||||
rc = sys_getpriority(which, who);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue