mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 09:18:31 +00:00
Make improvements
- More timspec_*() and timeval_*() APIs have been introduced. - The copyfd() function is now simplified thanks to POSIX rules. - More Cosmo-specific APIs have been moved behind the COSMO define. - The setitimer() polyfill for Windows NT is now much higher quality. - Fixed build error for MODE=aarch64 due to -mstringop-strategy=loop. - This change introduces `make MODE=nox87 toolchain` which makes it possible to build programs using your cosmocc toolchain that don't have legacy fpu instructions. This is useful, for example, if you want to have a ~22kb tinier blink virtual machine.
This commit is contained in:
parent
8dc11afcf6
commit
c3440d040c
132 changed files with 539 additions and 587 deletions
|
@ -30,7 +30,6 @@
|
|||
#include "libc/log/log.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/arraylist2.internal.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
|
@ -322,8 +321,8 @@ int main(int argc, char *argv[]) {
|
|||
goto fail;
|
||||
}
|
||||
outsize += (remain = sizes.p[i]);
|
||||
if (_copyfd(fd, outfd, remain) == -1) {
|
||||
reason = "copy_file_range failed";
|
||||
if (copyfd(fd, outfd, remain) == -1) {
|
||||
reason = "copy failed";
|
||||
goto fail;
|
||||
}
|
||||
close(fd);
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "libc/macros.internal.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/alg.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/kcpuids.h"
|
||||
|
@ -769,7 +768,7 @@ bool MovePreservingDestinationInode(const char *from, const char *to) {
|
|||
res = false;
|
||||
break;
|
||||
}
|
||||
res = _copyfd(fdin, fdout, -1) != -1;
|
||||
res = copyfd(fdin, fdout, -1) != -1;
|
||||
break;
|
||||
} else {
|
||||
res = false;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/mem/gc.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
@ -176,7 +175,7 @@ bool MovePreservingDestinationInode(const char *from, const char *to) {
|
|||
close(fdin);
|
||||
return false;
|
||||
}
|
||||
res = _copyfd(fdin, fdout, -1) != -1;
|
||||
res = copyfd(fdin, fdout, -1) != -1;
|
||||
close(fdin);
|
||||
close(fdout);
|
||||
return res;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/fmt/magnumstrs.internal.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/ex.h"
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/mem/copyfd.internal.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/kcpuids.h"
|
||||
|
@ -523,7 +522,7 @@ int Extract(const char *from, const char *to, int mode) {
|
|||
close(fdin);
|
||||
return -1;
|
||||
}
|
||||
if (_copyfd(fdin, fdout, -1) == -1) {
|
||||
if (copyfd(fdin, fdout, -1) == -1) {
|
||||
close(fdout);
|
||||
close(fdin);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue