diff --git a/Makefile b/Makefile index 95929467e..ebbb2f1a3 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,6 @@ include libc/mem/mem.mk #─┐ include third_party/gdtoa/gdtoa.mk # ├──DYNAMIC RUNTIME include third_party/nsync/mem/mem.mk # │ You can now use stdio include libc/thread/thread.mk # │ You can finally call malloc() -include libc/zipos/zipos.mk # │ include tool/hello/hello.mk # │ include libc/stdio/stdio.mk # │ include libc/time/time.mk # │ @@ -243,7 +242,6 @@ include test/libc/fmt/test.mk include test/libc/dns/test.mk include test/libc/time/test.mk include test/libc/stdio/test.mk -include test/libc/zipos/test.mk include test/libc/release/test.mk include test/libc/test.mk include test/net/http/test.mk @@ -325,7 +323,6 @@ COSMOPOLITAN_OBJECTS = \ THIRD_PARTY_GETOPT \ LIBC_LOG \ LIBC_TIME \ - LIBC_ZIPOS \ THIRD_PARTY_MUSL \ LIBC_STDIO \ THIRD_PARTY_GDTOA \ @@ -383,7 +380,6 @@ COSMOPOLITAN_HEADERS = \ LIBC_TIME \ LIBC_TINYMATH \ LIBC_X \ - LIBC_ZIPOS \ LIBC_VGA \ NET_HTTP \ TOOL_ARGS \ diff --git a/examples/examples.mk b/examples/examples.mk index 9b59ae44c..9e5284b26 100644 --- a/examples/examples.mk +++ b/examples/examples.mk @@ -67,7 +67,6 @@ EXAMPLES_DIRECTDEPS = \ LIBC_TINYMATH \ LIBC_VGA \ LIBC_X \ - LIBC_ZIPOS \ NET_HTTP \ NET_HTTPS \ THIRD_PARTY_AWK \ diff --git a/examples/nesemu1.cc b/examples/nesemu1.cc index 4bbb39fcf..65b2d716c 100644 --- a/examples/nesemu1.cc +++ b/examples/nesemu1.cc @@ -43,7 +43,7 @@ #include "libc/x/xasprintf.h" #include "libc/x/xsigaction.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" #include "third_party/getopt/getopt.internal.h" #include "third_party/libcxx/vector" #include "tool/viz/lib/knobs.h" diff --git a/libc/calls/close.c b/libc/calls/close.c index 541d75348..1f246a3e1 100644 --- a/libc/calls/close.c +++ b/libc/calls/close.c @@ -27,7 +27,7 @@ #include "libc/intrin/weaken.h" #include "libc/sock/syscall_fd.internal.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Closes file descriptor. diff --git a/libc/calls/execve.c b/libc/calls/execve.c index c3b99d83e..478e70590 100644 --- a/libc/calls/execve.c +++ b/libc/calls/execve.c @@ -31,7 +31,7 @@ #include "libc/log/libfatal.internal.h" #include "libc/sysv/consts/o.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Replaces current process with program. diff --git a/libc/calls/faccessat.c b/libc/calls/faccessat.c index 992e38d3e..83ec81eb1 100644 --- a/libc/calls/faccessat.c +++ b/libc/calls/faccessat.c @@ -28,7 +28,7 @@ #include "libc/intrin/weaken.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Checks if effective user can access path in particular ways. diff --git a/libc/calls/fchmodat.c b/libc/calls/fchmodat.c index 1b4de8647..7090a9f11 100644 --- a/libc/calls/fchmodat.c +++ b/libc/calls/fchmodat.c @@ -25,7 +25,7 @@ #include "libc/intrin/strace.internal.h" #include "libc/intrin/weaken.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" int sys_fchmodat_linux(int, const char *, unsigned, int); diff --git a/libc/calls/fchownat.c b/libc/calls/fchownat.c index 681dc61dc..ee9951637 100644 --- a/libc/calls/fchownat.c +++ b/libc/calls/fchownat.c @@ -24,7 +24,7 @@ #include "libc/intrin/strace.internal.h" #include "libc/intrin/weaken.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Changes owner and/or group of path. diff --git a/libc/calls/fcntl.c b/libc/calls/fcntl.c index 45630aefb..9cd24dce1 100644 --- a/libc/calls/fcntl.c +++ b/libc/calls/fcntl.c @@ -29,7 +29,7 @@ #include "libc/intrin/weaken.h" #include "libc/sysv/consts/f.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Does things with file descriptor, e.g. diff --git a/libc/calls/fileexists.c b/libc/calls/fileexists.c index 44e67f730..127e62d73 100644 --- a/libc/calls/fileexists.c +++ b/libc/calls/fileexists.c @@ -30,7 +30,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Returns true if file exists at path. diff --git a/libc/calls/fstat.c b/libc/calls/fstat.c index ed36fa6b9..8597bc896 100644 --- a/libc/calls/fstat.c +++ b/libc/calls/fstat.c @@ -25,7 +25,7 @@ #include "libc/intrin/strace.internal.h" #include "libc/intrin/weaken.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Returns information about file, via open()'d descriptor. diff --git a/libc/calls/fstatat.c b/libc/calls/fstatat.c index be8cb1f03..7e4e20b0c 100644 --- a/libc/calls/fstatat.c +++ b/libc/calls/fstatat.c @@ -32,7 +32,7 @@ #include "libc/str/str.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" static inline const char *__strace_fstatat_flags(char buf[12], int flags) { if (flags == AT_SYMLINK_NOFOLLOW) return "AT_SYMLINK_NOFOLLOW"; diff --git a/libc/calls/isdirectory.c b/libc/calls/isdirectory.c index 150db7a8e..5a38cd4a3 100644 --- a/libc/calls/isdirectory.c +++ b/libc/calls/isdirectory.c @@ -30,7 +30,7 @@ #include "libc/sysv/consts/at.h" #include "libc/sysv/consts/s.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Returns true if file exists and is a directory. diff --git a/libc/calls/isregularfile.c b/libc/calls/isregularfile.c index 1087f8670..679799984 100644 --- a/libc/calls/isregularfile.c +++ b/libc/calls/isregularfile.c @@ -28,7 +28,7 @@ #include "libc/sysv/consts/at.h" #include "libc/sysv/consts/s.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Returns true if file exists and is a regular file. diff --git a/libc/calls/issymlink.c b/libc/calls/issymlink.c index 3d40529fa..5898a033e 100644 --- a/libc/calls/issymlink.c +++ b/libc/calls/issymlink.c @@ -30,7 +30,7 @@ #include "libc/sysv/consts/at.h" #include "libc/sysv/consts/s.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Returns true if file exists and is a symbolic link. diff --git a/libc/calls/linkat.c b/libc/calls/linkat.c index deaa23064..ac463c7f1 100644 --- a/libc/calls/linkat.c +++ b/libc/calls/linkat.c @@ -25,7 +25,7 @@ #include "libc/intrin/strace.internal.h" #include "libc/intrin/weaken.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Creates hard filesystem link. diff --git a/libc/calls/lseek.c b/libc/calls/lseek.c index 098fd3713..fd2f45ef8 100644 --- a/libc/calls/lseek.c +++ b/libc/calls/lseek.c @@ -26,7 +26,7 @@ #include "libc/intrin/weaken.h" #include "libc/log/backtrace.internal.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Changes current position of file descriptor, e.g. diff --git a/libc/calls/mkdirat.c b/libc/calls/mkdirat.c index a09bd608b..4aa837898 100644 --- a/libc/calls/mkdirat.c +++ b/libc/calls/mkdirat.c @@ -26,7 +26,7 @@ #include "libc/intrin/weaken.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Creates directory a.k.a. folder. diff --git a/libc/calls/openat-metal.c b/libc/calls/openat-metal.c index 686f5c597..c375236ca 100644 --- a/libc/calls/openat-metal.c +++ b/libc/calls/openat-metal.c @@ -33,7 +33,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/consts/prot.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" #ifdef __x86_64__ diff --git a/libc/calls/openat.c b/libc/calls/openat.c index 142d561e0..bb6ea6de4 100644 --- a/libc/calls/openat.c +++ b/libc/calls/openat.c @@ -33,7 +33,7 @@ #include "libc/sysv/consts/at.h" #include "libc/sysv/consts/o.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Opens file. diff --git a/libc/calls/pread.c b/libc/calls/pread.c index 2c36ca99d..6776e1f6c 100644 --- a/libc/calls/pread.c +++ b/libc/calls/pread.c @@ -30,7 +30,7 @@ #include "libc/macros.internal.h" #include "libc/runtime/runtime.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Reads from file at offset. diff --git a/libc/calls/preadv.c b/libc/calls/preadv.c index 83e8e57a8..5feed2a7e 100644 --- a/libc/calls/preadv.c +++ b/libc/calls/preadv.c @@ -30,7 +30,7 @@ #include "libc/intrin/strace.internal.h" #include "libc/intrin/weaken.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" static ssize_t Preadv(int fd, struct iovec *iov, int iovlen, int64_t off) { int e, i; diff --git a/libc/calls/pwritev.c b/libc/calls/pwritev.c index 924e93597..6105b8f17 100644 --- a/libc/calls/pwritev.c +++ b/libc/calls/pwritev.c @@ -30,7 +30,7 @@ #include "libc/intrin/strace.internal.h" #include "libc/intrin/weaken.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" static ssize_t Pwritev(int fd, const struct iovec *iov, int iovlen, int64_t off) { diff --git a/libc/calls/read.c b/libc/calls/read.c index 7f758bc57..7beb98342 100644 --- a/libc/calls/read.c +++ b/libc/calls/read.c @@ -29,7 +29,7 @@ #include "libc/sock/internal.h" #include "libc/sock/sock.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Reads data from file descriptor. diff --git a/libc/calls/readlinkat.c b/libc/calls/readlinkat.c index bd8644c32..d8ff7f258 100644 --- a/libc/calls/readlinkat.c +++ b/libc/calls/readlinkat.c @@ -25,7 +25,7 @@ #include "libc/intrin/weaken.h" #include "libc/runtime/runtime.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Reads symbolic link. diff --git a/libc/calls/readv.c b/libc/calls/readv.c index ad4cbd860..479ec157d 100644 --- a/libc/calls/readv.c +++ b/libc/calls/readv.c @@ -31,7 +31,7 @@ #include "libc/intrin/weaken.h" #include "libc/sock/internal.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Reads data to multiple buffers. diff --git a/libc/calls/renameat.c b/libc/calls/renameat.c index 7686368f0..9fbc45705 100644 --- a/libc/calls/renameat.c +++ b/libc/calls/renameat.c @@ -26,7 +26,7 @@ #include "libc/intrin/weaken.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Renames files relative to directories. diff --git a/libc/calls/truncate.c b/libc/calls/truncate.c index bac9defbc..796fafbfc 100644 --- a/libc/calls/truncate.c +++ b/libc/calls/truncate.c @@ -26,7 +26,7 @@ #include "libc/intrin/strace.internal.h" #include "libc/intrin/weaken.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Changes size of file. diff --git a/libc/calls/unlinkat.c b/libc/calls/unlinkat.c index c90f83e83..89c046fa0 100644 --- a/libc/calls/unlinkat.c +++ b/libc/calls/unlinkat.c @@ -28,7 +28,7 @@ #include "libc/intrin/weaken.h" #include "libc/sysv/consts/s.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Deletes inode and maybe the file too. diff --git a/libc/calls/utimens.c b/libc/calls/utimens.c index 7a0524e5c..7f00c8f54 100644 --- a/libc/calls/utimens.c +++ b/libc/calls/utimens.c @@ -30,7 +30,7 @@ #include "libc/intrin/weaken.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" int __utimens(int fd, const char *path, const struct timespec ts[2], int flags) { diff --git a/libc/calls/utimensat-sysv.c b/libc/calls/utimensat-sysv.c index 8b26f5237..859165c43 100644 --- a/libc/calls/utimensat-sysv.c +++ b/libc/calls/utimensat-sysv.c @@ -23,7 +23,7 @@ #include "libc/fmt/conv.h" #include "libc/sysv/consts/at.h" #include "libc/time/time.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" int sys_utimensat(int dirfd, const char *path, const struct timespec ts[2], int flags) { diff --git a/libc/calls/utimensat.c b/libc/calls/utimensat.c index 06f39f06f..b97d3ce6e 100644 --- a/libc/calls/utimensat.c +++ b/libc/calls/utimensat.c @@ -27,7 +27,7 @@ #include "libc/intrin/weaken.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Sets access/modified time on file, the modern way. diff --git a/libc/calls/write.c b/libc/calls/write.c index 6445bb4c4..6bfa493ee 100644 --- a/libc/calls/write.c +++ b/libc/calls/write.c @@ -27,7 +27,7 @@ #include "libc/intrin/weaken.h" #include "libc/sock/sock.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Writes data to file descriptor. diff --git a/libc/calls/writev.c b/libc/calls/writev.c index 177355ca9..fe0ccba9a 100644 --- a/libc/calls/writev.c +++ b/libc/calls/writev.c @@ -30,7 +30,7 @@ #include "libc/intrin/weaken.h" #include "libc/sock/internal.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Writes data from multiple buffers. diff --git a/libc/thread/pthread_mutex_destroy.c b/libc/intrin/pthread_mutex_destroy.c similarity index 100% rename from libc/thread/pthread_mutex_destroy.c rename to libc/intrin/pthread_mutex_destroy.c diff --git a/libc/log/log.mk b/libc/log/log.mk index 176f9a8b8..336ee67ff 100644 --- a/libc/log/log.mk +++ b/libc/log/log.mk @@ -39,7 +39,6 @@ LIBC_LOG_A_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_DLMALLOC \ THIRD_PARTY_GDTOA diff --git a/libc/zipos/.cosmo b/libc/runtime/.cosmo similarity index 100% rename from libc/zipos/.cosmo rename to libc/runtime/.cosmo diff --git a/libc/runtime/ftraceinit.greg.c b/libc/runtime/ftraceinit.greg.c index cc1800824..74717a415 100644 --- a/libc/runtime/ftraceinit.greg.c +++ b/libc/runtime/ftraceinit.greg.c @@ -21,6 +21,8 @@ #include "libc/str/str.h" #include "libc/thread/tls.h" +__static_yoink("zipos"); + /** * Enables plaintext function tracing if `--ftrace` flag is passed. * diff --git a/libc/runtime/getsymboltable.c b/libc/runtime/getsymboltable.c index 7adbe492e..91d307881 100644 --- a/libc/runtime/getsymboltable.c +++ b/libc/runtime/getsymboltable.c @@ -29,7 +29,7 @@ #include "libc/thread/thread.h" #include "libc/x/x.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" #include "third_party/puff/puff.h" __static_yoink("__get_symbol"); diff --git a/libc/runtime/mmap.c b/libc/runtime/mmap.c index 5dc363366..4c7130e85 100644 --- a/libc/runtime/mmap.c +++ b/libc/runtime/mmap.c @@ -43,6 +43,7 @@ #include "libc/runtime/internal.h" #include "libc/runtime/memtrack.internal.h" #include "libc/runtime/runtime.h" +#include "libc/runtime/zipos.internal.h" #include "libc/stdckdint.h" #include "libc/stdio/rand.h" #include "libc/str/str.h" diff --git a/libc/runtime/runtime.mk b/libc/runtime/runtime.mk index 8c7ce0884..69679c437 100644 --- a/libc/runtime/runtime.mk +++ b/libc/runtime/runtime.mk @@ -26,7 +26,8 @@ LIBC_RUNTIME_A_SRCS = \ LIBC_RUNTIME_A_OBJS = \ $(LIBC_RUNTIME_A_SRCS_S:%.S=o/$(MODE)/%.o) \ - $(LIBC_RUNTIME_A_SRCS_C:%.c=o/$(MODE)/%.o) + $(LIBC_RUNTIME_A_SRCS_C:%.c=o/$(MODE)/%.o) \ + o/$(MODE)/libc/runtime/.cosmo.zip.o LIBC_RUNTIME_A_CHECKS = \ $(LIBC_RUNTIME_A).pkg \ @@ -138,6 +139,10 @@ o/$(MODE)/libc/runtime/clone.o: private \ -fno-sanitize=all \ -fpatchable-function-entry=0,0 +o/$(MODE)/libc/runtime/.cosmo.zip.o: private \ + ZIPOBJ_FLAGS += \ + -B + # these assembly files are safe to build on aarch64 o/$(MODE)/libc/runtime/init.o: libc/runtime/init.S @$(COMPILE) -AOBJECTIFY.S $(OBJECTIFY.S) $(OUTPUT_OPTION) -c $< @@ -151,6 +156,8 @@ o/$(MODE)/libc/runtime/ftrace-hook.o: libc/runtime/ftrace-hook.S @$(COMPILE) -AOBJECTIFY.S $(OBJECTIFY.S) $(OUTPUT_OPTION) -c $< o/$(MODE)/libc/runtime/dsohandle.o: libc/runtime/dsohandle.S @$(COMPILE) -AOBJECTIFY.S $(OBJECTIFY.S) $(OUTPUT_OPTION) -c $< +o/$(MODE)/libc/runtime/zipos.o: libc/runtime/zipos.S + @$(COMPILE) -AOBJECTIFY.S $(OBJECTIFY.S) $(OUTPUT_OPTION) -c $< LIBC_RUNTIME_LIBS = $(foreach x,$(LIBC_RUNTIME_ARTIFACTS),$($(x))) LIBC_RUNTIME_SRCS = $(foreach x,$(LIBC_RUNTIME_ARTIFACTS),$($(x)_SRCS)) diff --git a/libc/zipos/access.c b/libc/runtime/zipos-access.c similarity index 98% rename from libc/zipos/access.c rename to libc/runtime/zipos-access.c index 18daf6f39..93c0d898e 100644 --- a/libc/zipos/access.c +++ b/libc/runtime/zipos-access.c @@ -21,7 +21,7 @@ #include "libc/sysv/consts/ok.h" #include "libc/sysv/errfuns.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" // TODO: this should check parent directory components diff --git a/libc/zipos/close.c b/libc/runtime/zipos-close.c similarity index 98% rename from libc/zipos/close.c rename to libc/runtime/zipos-close.c index 7d541d1c1..cd82453c9 100644 --- a/libc/zipos/close.c +++ b/libc/runtime/zipos-close.c @@ -21,7 +21,7 @@ #include "libc/calls/state.internal.h" #include "libc/calls/syscall-sysv.internal.h" #include "libc/dce.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Closes compressed object. diff --git a/libc/zipos/fcntl.c b/libc/runtime/zipos-fcntl.c similarity index 98% rename from libc/zipos/fcntl.c rename to libc/runtime/zipos-fcntl.c index c1d215e4d..b2d3ea833 100644 --- a/libc/zipos/fcntl.c +++ b/libc/runtime/zipos-fcntl.c @@ -22,7 +22,7 @@ #include "libc/sysv/consts/o.h" #include "libc/sysv/errfuns.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" #define ZIPOS __zipos_get() #define HANDLE ((struct ZiposHandle *)(intptr_t)g_fds.p[fd].handle) diff --git a/libc/zipos/find.c b/libc/runtime/zipos-find.c similarity index 98% rename from libc/zipos/find.c rename to libc/runtime/zipos-find.c index 734cf9e0e..0ab8b78db 100644 --- a/libc/zipos/find.c +++ b/libc/runtime/zipos-find.c @@ -21,7 +21,7 @@ #include "libc/runtime/runtime.h" #include "libc/str/str.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" // TODO(jart): improve time complexity here diff --git a/libc/zipos/free.c b/libc/runtime/zipos-free.c similarity index 98% rename from libc/zipos/free.c rename to libc/runtime/zipos-free.c index 2b2c18b3e..4404fdc86 100644 --- a/libc/zipos/free.c +++ b/libc/runtime/zipos-free.c @@ -22,7 +22,7 @@ #include "libc/intrin/cmpxchg.h" #include "libc/str/str.h" #include "libc/thread/thread.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" void __zipos_free(struct Zipos *z, struct ZiposHandle *h) { if (IsAsan()) { diff --git a/libc/zipos/fstat.c b/libc/runtime/zipos-fstat.c similarity index 98% rename from libc/zipos/fstat.c rename to libc/runtime/zipos-fstat.c index fd0a04a91..8b051eb9c 100644 --- a/libc/zipos/fstat.c +++ b/libc/runtime/zipos-fstat.c @@ -19,7 +19,7 @@ #include "libc/assert.h" #include "libc/sysv/errfuns.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Reads file metadata from αcτµαlly pδrταblε εxεcµταblε object store. diff --git a/libc/zipos/get.c b/libc/runtime/zipos-get.c similarity index 99% rename from libc/zipos/get.c rename to libc/runtime/zipos-get.c index a0fc5fbd2..4a232c208 100644 --- a/libc/zipos/get.c +++ b/libc/runtime/zipos-get.c @@ -29,7 +29,7 @@ #include "libc/sysv/consts/prot.h" #include "libc/thread/thread.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" #ifdef __x86_64__ __static_yoink(APE_COM_NAME); diff --git a/libc/zipos/lock.c b/libc/runtime/zipos-lock.c similarity index 98% rename from libc/zipos/lock.c rename to libc/runtime/zipos-lock.c index f26012da9..1d511c184 100644 --- a/libc/zipos/lock.c +++ b/libc/runtime/zipos-lock.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/thread/thread.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" static pthread_mutex_t __zipos_lock_obj; diff --git a/libc/zipos/lseek.c b/libc/runtime/zipos-lseek.c similarity index 98% rename from libc/zipos/lseek.c rename to libc/runtime/zipos-lseek.c index c1db16489..baddee427 100644 --- a/libc/zipos/lseek.c +++ b/libc/runtime/zipos-lseek.c @@ -20,7 +20,7 @@ #include "libc/sysv/errfuns.h" #include "libc/thread/thread.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Changes current position of zip file handle. diff --git a/libc/zipos/mmap.c b/libc/runtime/zipos-mmap.c similarity index 98% rename from libc/zipos/mmap.c rename to libc/runtime/zipos-mmap.c index 5e31a7986..f07db7f84 100644 --- a/libc/zipos/mmap.c +++ b/libc/runtime/zipos-mmap.c @@ -23,10 +23,11 @@ #include "libc/intrin/likely.h" #include "libc/intrin/strace.internal.h" #include "libc/runtime/internal.h" +#include "libc/runtime/runtime.h" +#include "libc/runtime/zipos.internal.h" #include "libc/sysv/consts/map.h" #include "libc/sysv/consts/prot.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" #define IP(X) (intptr_t)(X) #define VIP(X) (void *)IP(X) diff --git a/libc/zipos/notat.c b/libc/runtime/zipos-notat.c similarity index 98% rename from libc/zipos/notat.c rename to libc/runtime/zipos-notat.c index 6b2f90860..a89938bbd 100644 --- a/libc/zipos/notat.c +++ b/libc/runtime/zipos-notat.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/internal.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" int __zipos_notat(int dirfd, const char *path) { struct ZiposUri zipname; diff --git a/libc/zipos/open.c b/libc/runtime/zipos-open.c similarity index 99% rename from libc/zipos/open.c rename to libc/runtime/zipos-open.c index 1ecbea579..0bedca9c4 100644 --- a/libc/zipos/open.c +++ b/libc/runtime/zipos-open.c @@ -42,7 +42,7 @@ #include "libc/sysv/errfuns.h" #include "libc/thread/thread.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" static char *mapend; static size_t maptotal; diff --git a/libc/zipos/parseuri.c b/libc/runtime/zipos-parseuri.c similarity index 98% rename from libc/zipos/parseuri.c rename to libc/runtime/zipos-parseuri.c index b3bfc98cd..4892a9cc4 100644 --- a/libc/zipos/parseuri.c +++ b/libc/runtime/zipos-parseuri.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/str.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Extracts information about ZIP URI if it is one. diff --git a/libc/zipos/read.c b/libc/runtime/zipos-read.c similarity index 98% rename from libc/zipos/read.c rename to libc/runtime/zipos-read.c index 1dd00826a..f2801fa7b 100644 --- a/libc/zipos/read.c +++ b/libc/runtime/zipos-read.c @@ -22,7 +22,7 @@ #include "libc/str/str.h" #include "libc/thread/thread.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" static size_t GetIovSize(const struct iovec *iov, size_t iovlen) { size_t i, r; diff --git a/libc/zipos/stat-impl.c b/libc/runtime/zipos-stat-impl.c similarity index 98% rename from libc/zipos/stat-impl.c rename to libc/runtime/zipos-stat-impl.c index 7ed80385e..a9930de97 100644 --- a/libc/zipos/stat-impl.c +++ b/libc/runtime/zipos-stat-impl.c @@ -22,7 +22,7 @@ #include "libc/sysv/consts/s.h" #include "libc/sysv/errfuns.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" int __zipos_stat_impl(struct Zipos *zipos, size_t cf, struct stat *st) { size_t lf; diff --git a/libc/zipos/stat.c b/libc/runtime/zipos-stat.c similarity index 98% rename from libc/zipos/stat.c rename to libc/runtime/zipos-stat.c index 95ff71f60..77733d91a 100644 --- a/libc/zipos/stat.c +++ b/libc/runtime/zipos-stat.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/stdio/stdio.h" #include "libc/sysv/errfuns.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * Reads file metadata from αcτµαlly pδrταblε εxεcµταblε object store. diff --git a/libc/zipos/zipos.S b/libc/runtime/zipos.S similarity index 100% rename from libc/zipos/zipos.S rename to libc/runtime/zipos.S diff --git a/libc/runtime/zipos.internal.h b/libc/runtime/zipos.internal.h new file mode 100644 index 000000000..77e9eba38 --- /dev/null +++ b/libc/runtime/zipos.internal.h @@ -0,0 +1,66 @@ +#ifndef COSMOPOLITAN_LIBC_ZIPOS_ZIPOS_H_ +#define COSMOPOLITAN_LIBC_ZIPOS_ZIPOS_H_ +#include "libc/intrin/nopl.internal.h" +#include "libc/thread/thread.h" +#include "libc/thread/tls.h" +#if !(__ASSEMBLER__ + __LINKER__ + 0) +COSMOPOLITAN_C_START_ + +struct stat; +struct iovec; + +struct ZiposUri { + const char *path; + size_t len; +}; + +struct ZiposHandle { + struct ZiposHandle *next; + pthread_mutex_t lock; + size_t size; /* byte length of `mem` */ + size_t mapsize; /* total size of this struct */ + size_t pos; /* read/write byte offset state */ + uint32_t cfile; /* central directory entry rva */ + uint8_t *mem; /* points to inflated data or uncompressed image */ + uint8_t data[]; /* uncompressed file memory */ +}; + +struct Zipos { + uint8_t *map; + uint8_t *cdir; + struct ZiposHandle *freelist; +}; + +void __zipos_lock(void); +void __zipos_unlock(void); +int __zipos_close(int); +struct Zipos *__zipos_get(void) pureconst; +void __zipos_free(struct Zipos *, struct ZiposHandle *); +ssize_t __zipos_parseuri(const char *, struct ZiposUri *); +ssize_t __zipos_find(struct Zipos *, const struct ZiposUri *); +int __zipos_open(const struct ZiposUri *, unsigned, int); +int __zipos_access(const struct ZiposUri *, int); +int __zipos_stat(const struct ZiposUri *, struct stat *); +int __zipos_fstat(const struct ZiposHandle *, struct stat *); +int __zipos_stat_impl(struct Zipos *, size_t, struct stat *); +ssize_t __zipos_read(struct ZiposHandle *, const struct iovec *, size_t, + ssize_t); +ssize_t __zipos_write(struct ZiposHandle *, const struct iovec *, size_t, + ssize_t); +int64_t __zipos_lseek(struct ZiposHandle *, int64_t, unsigned); +int __zipos_fcntl(int, int, uintptr_t); +int __zipos_notat(int, const char *); +void *__zipos_Mmap(void *, uint64_t, int32_t, int32_t, struct ZiposHandle *, + int64_t) dontasan; + +#ifdef _NOPL0 +#define __zipos_lock() _NOPL0("__threadcalls", __zipos_lock) +#define __zipos_unlock() _NOPL0("__threadcalls", __zipos_unlock) +#else +#define __zipos_lock() (__threaded ? __zipos_lock() : 0) +#define __zipos_unlock() (__threaded ? __zipos_unlock() : 0) +#endif + +COSMOPOLITAN_C_END_ +#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ +#endif /* COSMOPOLITAN_LIBC_ZIPOS_ZIPOS_H_ */ diff --git a/libc/stdio/dirstream.c b/libc/stdio/dirstream.c index a3d86fa18..22b55723d 100644 --- a/libc/stdio/dirstream.c +++ b/libc/stdio/dirstream.c @@ -39,7 +39,7 @@ #include "libc/sysv/errfuns.h" #include "libc/thread/thread.h" #include "libc/zip.internal.h" -#include "libc/zipos/zipos.internal.h" +#include "libc/runtime/zipos.internal.h" /** * @fileoverview Directory Streams for Linux+Mac+Windows+FreeBSD+OpenBSD. diff --git a/libc/testlib/testlib.mk b/libc/testlib/testlib.mk index 2c35faf6a..6e2b2d8f3 100644 --- a/libc/testlib/testlib.mk +++ b/libc/testlib/testlib.mk @@ -106,7 +106,6 @@ LIBC_TESTLIB_A_DIRECTDEPS = \ LIBC_TIME \ LIBC_TINYMATH \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_DLMALLOC \ THIRD_PARTY_GDTOA \ diff --git a/libc/time/time.mk b/libc/time/time.mk index ee86f5e35..bd7f85270 100644 --- a/libc/time/time.mk +++ b/libc/time/time.mk @@ -38,7 +38,6 @@ LIBC_TIME_A_DIRECTDEPS = \ LIBC_STDIO \ LIBC_STR \ LIBC_SYSV \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT LIBC_TIME_A_DEPS := \ diff --git a/libc/zipos/zipos.internal.h b/libc/zipos/zipos.internal.h old mode 100644 new mode 100755 index 77e9eba38..e69de29bb --- a/libc/zipos/zipos.internal.h +++ b/libc/zipos/zipos.internal.h @@ -1,66 +0,0 @@ -#ifndef COSMOPOLITAN_LIBC_ZIPOS_ZIPOS_H_ -#define COSMOPOLITAN_LIBC_ZIPOS_ZIPOS_H_ -#include "libc/intrin/nopl.internal.h" -#include "libc/thread/thread.h" -#include "libc/thread/tls.h" -#if !(__ASSEMBLER__ + __LINKER__ + 0) -COSMOPOLITAN_C_START_ - -struct stat; -struct iovec; - -struct ZiposUri { - const char *path; - size_t len; -}; - -struct ZiposHandle { - struct ZiposHandle *next; - pthread_mutex_t lock; - size_t size; /* byte length of `mem` */ - size_t mapsize; /* total size of this struct */ - size_t pos; /* read/write byte offset state */ - uint32_t cfile; /* central directory entry rva */ - uint8_t *mem; /* points to inflated data or uncompressed image */ - uint8_t data[]; /* uncompressed file memory */ -}; - -struct Zipos { - uint8_t *map; - uint8_t *cdir; - struct ZiposHandle *freelist; -}; - -void __zipos_lock(void); -void __zipos_unlock(void); -int __zipos_close(int); -struct Zipos *__zipos_get(void) pureconst; -void __zipos_free(struct Zipos *, struct ZiposHandle *); -ssize_t __zipos_parseuri(const char *, struct ZiposUri *); -ssize_t __zipos_find(struct Zipos *, const struct ZiposUri *); -int __zipos_open(const struct ZiposUri *, unsigned, int); -int __zipos_access(const struct ZiposUri *, int); -int __zipos_stat(const struct ZiposUri *, struct stat *); -int __zipos_fstat(const struct ZiposHandle *, struct stat *); -int __zipos_stat_impl(struct Zipos *, size_t, struct stat *); -ssize_t __zipos_read(struct ZiposHandle *, const struct iovec *, size_t, - ssize_t); -ssize_t __zipos_write(struct ZiposHandle *, const struct iovec *, size_t, - ssize_t); -int64_t __zipos_lseek(struct ZiposHandle *, int64_t, unsigned); -int __zipos_fcntl(int, int, uintptr_t); -int __zipos_notat(int, const char *); -void *__zipos_Mmap(void *, uint64_t, int32_t, int32_t, struct ZiposHandle *, - int64_t) dontasan; - -#ifdef _NOPL0 -#define __zipos_lock() _NOPL0("__threadcalls", __zipos_lock) -#define __zipos_unlock() _NOPL0("__threadcalls", __zipos_unlock) -#else -#define __zipos_lock() (__threaded ? __zipos_lock() : 0) -#define __zipos_unlock() (__threaded ? __zipos_unlock() : 0) -#endif - -COSMOPOLITAN_C_END_ -#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_LIBC_ZIPOS_ZIPOS_H_ */ diff --git a/libc/zipos/zipos.mk b/libc/zipos/zipos.mk deleted file mode 100644 index 36e5d1d6d..000000000 --- a/libc/zipos/zipos.mk +++ /dev/null @@ -1,73 +0,0 @@ -#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ -#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘ - -PKGS += LIBC_ZIPOS - -LIBC_ZIPOS_ARTIFACTS += LIBC_ZIPOS_A -LIBC_ZIPOS_A = o/$(MODE)/libc/zipos/zipos.a -LIBC_ZIPOS_A_FILES := $(wildcard libc/zipos/*) -LIBC_ZIPOS_A_HDRS = $(filter %.h,$(LIBC_ZIPOS_A_FILES)) -LIBC_ZIPOS_A_SRCS_S = $(filter %.S,$(LIBC_ZIPOS_A_FILES)) -LIBC_ZIPOS_A_SRCS_C = $(filter %.c,$(LIBC_ZIPOS_A_FILES)) - -LIBC_ZIPOS = \ - $(LIBC_ZIPOS_A_DEPS) \ - $(LIBC_ZIPOS_A) - -LIBC_ZIPOS_A_SRCS = \ - $(LIBC_ZIPOS_A_SRCS_S) \ - $(LIBC_ZIPOS_A_SRCS_C) - -LIBC_ZIPOS_A_OBJS = \ - $(LIBC_ZIPOS_A_SRCS_S:%.S=o/$(MODE)/%.o) \ - $(LIBC_ZIPOS_A_SRCS_C:%.c=o/$(MODE)/%.o) \ - o/$(MODE)/libc/zipos/.cosmo.zip.o - -LIBC_ZIPOS_A_CHECKS = \ - $(LIBC_ZIPOS_A).pkg \ - $(LIBC_ZIPOS_A_HDRS:%=o/$(MODE)/%.ok) - -LIBC_ZIPOS_A_DIRECTDEPS = \ - LIBC_CALLS \ - LIBC_FMT \ - LIBC_INTRIN \ - LIBC_MEM \ - LIBC_NEXGEN32E \ - LIBC_NT_KERNEL32 \ - LIBC_RUNTIME \ - LIBC_STR \ - LIBC_SYSV \ - LIBC_SYSV_CALLS \ - LIBC_THREAD \ - THIRD_PARTY_PUFF - -LIBC_ZIPOS_A_DEPS := \ - $(call uniq,$(foreach zipos,$(LIBC_ZIPOS_A_DIRECTDEPS),$($(zipos)))) - -$(LIBC_ZIPOS_A):libc/zipos/ \ - $(LIBC_ZIPOS_A).pkg \ - $(LIBC_ZIPOS_A_OBJS) - -$(LIBC_ZIPOS_A).pkg: \ - $(LIBC_ZIPOS_A_OBJS) \ - $(foreach zipos,$(LIBC_ZIPOS_A_DIRECTDEPS),$($(zipos)_A).pkg) - -o/$(MODE)/libc/zipos/.cosmo.zip.o: private \ - ZIPOBJ_FLAGS += \ - -B - -# these assembly files are safe to build on aarch64 -o/$(MODE)/libc/zipos/zipos.o: libc/zipos/zipos.S - @$(COMPILE) -AOBJECTIFY.S $(OBJECTIFY.S) $(OUTPUT_OPTION) -c $< - -LIBC_ZIPOS_LIBS = $(foreach zipos,$(LIBC_ZIPOS_ARTIFACTS),$($(zipos))) -LIBC_ZIPOS_SRCS = $(foreach zipos,$(LIBC_ZIPOS_ARTIFACTS),$($(zipos)_SRCS)) -LIBC_ZIPOS_HDRS = $(foreach zipos,$(LIBC_ZIPOS_ARTIFACTS),$($(zipos)_HDRS)) -LIBC_ZIPOS_BINS = $(foreach zipos,$(LIBC_ZIPOS_ARTIFACTS),$($(zipos)_BINS)) -LIBC_ZIPOS_CHECKS = $(foreach zipos,$(LIBC_ZIPOS_ARTIFACTS),$($(zipos)_CHECKS)) -LIBC_ZIPOS_OBJS = $(foreach zipos,$(LIBC_ZIPOS_ARTIFACTS),$($(zipos)_OBJS)) -LIBC_ZIPOS_TESTS = $(foreach zipos,$(LIBC_ZIPOS_ARTIFACTS),$($(zipos)_TESTS)) -$(LIBC_ZIPOS_OBJS): $(BUILD_FILES) libc/zipos/zipos.mk - -.PHONY: o/$(MODE)/libc/zipos -o/$(MODE)/libc/zipos: $(LIBC_ZIPOS_CHECKS) diff --git a/net/https/https.mk b/net/https/https.mk index 7bd9df56e..4c816cc9f 100644 --- a/net/https/https.mk +++ b/net/https/https.mk @@ -33,7 +33,6 @@ NET_HTTPS_A_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TIME \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_MBEDTLS diff --git a/test/libc/calls/test.mk b/test/libc/calls/test.mk index 709ec28c4..538a7fd68 100644 --- a/test/libc/calls/test.mk +++ b/test/libc/calls/test.mk @@ -49,7 +49,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \ LIBC_TIME \ LIBC_TESTLIB \ LIBC_X \ - LIBC_ZIPOS \ TOOL_DECODE_LIB \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_XED diff --git a/test/libc/log/test.mk b/test/libc/log/test.mk index cdb7a0948..2d826a157 100644 --- a/test/libc/log/test.mk +++ b/test/libc/log/test.mk @@ -38,8 +38,7 @@ TEST_LIBC_LOG_DIRECTDEPS = \ LIBC_STR \ LIBC_TESTLIB \ LIBC_SYSV \ - LIBC_LOG \ - LIBC_ZIPOS + LIBC_LOG TEST_LIBC_LOG_DEPS := \ $(call uniq,$(foreach x,$(TEST_LIBC_LOG_DIRECTDEPS),$($(x)))) diff --git a/test/libc/mem/test.mk b/test/libc/mem/test.mk index 32178903d..b608814c5 100644 --- a/test/libc/mem/test.mk +++ b/test/libc/mem/test.mk @@ -44,7 +44,6 @@ TEST_LIBC_MEM_DIRECTDEPS = \ LIBC_TESTLIB \ LIBC_THREAD \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_DLMALLOC \ THIRD_PARTY_LIBCXX diff --git a/test/libc/runtime/test.mk b/test/libc/runtime/test.mk index fa4d9e295..b2ade544c 100644 --- a/test/libc/runtime/test.mk +++ b/test/libc/runtime/test.mk @@ -37,9 +37,9 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \ LIBC_TESTLIB \ LIBC_TINYMATH \ LIBC_X \ - LIBC_ZIPOS \ TOOL_BUILD_LIB \ - THIRD_PARTY_XED + THIRD_PARTY_XED \ + THIRD_PARTY_ZLIB TEST_LIBC_RUNTIME_DEPS := \ $(call uniq,$(foreach x,$(TEST_LIBC_RUNTIME_DIRECTDEPS),$($(x)))) diff --git a/test/libc/zipos/open_test.c b/test/libc/runtime/zipos_test.c similarity index 100% rename from test/libc/zipos/open_test.c rename to test/libc/runtime/zipos_test.c diff --git a/test/libc/stdio/test.mk b/test/libc/stdio/test.mk index 22eb3e939..2dc59f8b2 100644 --- a/test/libc/stdio/test.mk +++ b/test/libc/stdio/test.mk @@ -38,7 +38,6 @@ TEST_LIBC_STDIO_DIRECTDEPS = \ LIBC_TIME \ LIBC_LOG \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_GDTOA \ THIRD_PARTY_MBEDTLS \ THIRD_PARTY_MUSL \ diff --git a/test/libc/str/test.mk b/test/libc/str/test.mk index ca5521d27..b0fca522d 100644 --- a/test/libc/str/test.mk +++ b/test/libc/str/test.mk @@ -45,7 +45,6 @@ TEST_LIBC_STR_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_TESTLIB \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_MBEDTLS \ THIRD_PARTY_REGEX \ diff --git a/test/libc/test.mk b/test/libc/test.mk index 4abd1a1e0..ef908621a 100644 --- a/test/libc/test.mk +++ b/test/libc/test.mk @@ -19,5 +19,4 @@ o/$(MODE)/test/libc: \ o/$(MODE)/test/libc/time \ o/$(MODE)/test/libc/tinymath \ o/$(MODE)/test/libc/x \ - o/$(MODE)/test/libc/zipos \ o/$(MODE)/test/libc/xed diff --git a/test/libc/zipos/test.mk b/test/libc/zipos/test.mk deleted file mode 100644 index a3a29fb7b..000000000 --- a/test/libc/zipos/test.mk +++ /dev/null @@ -1,62 +0,0 @@ -#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ -#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘ - -PKGS += TEST_LIBC_ZIPOS - -TEST_LIBC_ZIPOS_SRCS := $(wildcard test/libc/zipos/*.c) -TEST_LIBC_ZIPOS_SRCS_TEST = $(filter %_test.c,$(TEST_LIBC_ZIPOS_SRCS)) - -TEST_LIBC_ZIPOS_OBJS = \ - $(TEST_LIBC_ZIPOS_SRCS:%.c=o/$(MODE)/%.o) - -TEST_LIBC_ZIPOS_COMS = \ - $(TEST_LIBC_ZIPOS_SRCS:%.c=o/$(MODE)/%.com) - -TEST_LIBC_ZIPOS_BINS = \ - $(TEST_LIBC_ZIPOS_COMS) \ - $(TEST_LIBC_ZIPOS_COMS:%=%.dbg) - -TEST_LIBC_ZIPOS_TESTS = \ - $(TEST_LIBC_ZIPOS_SRCS_TEST:%.c=o/$(MODE)/%.com.ok) - -TEST_LIBC_ZIPOS_CHECKS = \ - $(TEST_LIBC_ZIPOS_SRCS_TEST:%.c=o/$(MODE)/%.com.runs) - -TEST_LIBC_ZIPOS_DIRECTDEPS = \ - LIBC_CALLS \ - LIBC_FMT \ - LIBC_INTRIN \ - LIBC_MEM \ - LIBC_NEXGEN32E \ - LIBC_RUNTIME \ - LIBC_STR \ - LIBC_THREAD \ - LIBC_SYSV \ - LIBC_ZIPOS \ - LIBC_TIME \ - LIBC_TESTLIB \ - THIRD_PARTY_ZLIB - -TEST_LIBC_ZIPOS_DEPS := \ - $(call uniq,$(foreach x,$(TEST_LIBC_ZIPOS_DIRECTDEPS),$($(x)))) - -o/$(MODE)/test/libc/zipos/zipos.pkg: \ - $(TEST_LIBC_ZIPOS_OBJS) \ - $(foreach x,$(TEST_LIBC_ZIPOS_DIRECTDEPS),$($(x)_A).pkg) - -#o/$(MODE)/libc/testlib/hyperion.txt.zip.o: private ZIPOBJ_FLAGS += -0 - -o/$(MODE)/test/libc/zipos/%.com.dbg: \ - $(TEST_LIBC_ZIPOS_DEPS) \ - o/$(MODE)/test/libc/zipos/%.o \ - o/$(MODE)/test/libc/zipos/zipos.pkg \ - o/$(MODE)/libc/testlib/hyperion.txt.zip.o \ - $(LIBC_TESTMAIN) \ - $(CRT) \ - $(APE_NO_MODIFY_SELF) - @$(APELINK) - -.PHONY: o/$(MODE)/test/libc/zipos -o/$(MODE)/test/libc/zipos: \ - $(TEST_LIBC_ZIPOS_BINS) \ - $(TEST_LIBC_ZIPOS_CHECKS) diff --git a/test/tool/args/test.mk b/test/tool/args/test.mk index d0de12885..80b786777 100644 --- a/test/tool/args/test.mk +++ b/test/tool/args/test.mk @@ -40,7 +40,6 @@ TEST_TOOL_ARGS_DIRECTDEPS = \ LIBC_STR \ LIBC_SYSV \ LIBC_TESTLIB \ - LIBC_ZIPOS \ LIBC_X \ THIRD_PARTY_COMPILER_RT \ TOOL_ARGS diff --git a/test/tool/net/test.mk b/test/tool/net/test.mk index 273b40ed1..b1c565f9e 100644 --- a/test/tool/net/test.mk +++ b/test/tool/net/test.mk @@ -43,7 +43,6 @@ TEST_TOOL_NET_DIRECTDEPS = \ LIBC_TESTLIB \ LIBC_THREAD \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_MBEDTLS \ THIRD_PARTY_REGEX \ THIRD_PARTY_SQLITE3 diff --git a/test/tool/plinko/test.mk b/test/tool/plinko/test.mk index 517d153c2..a3036611c 100644 --- a/test/tool/plinko/test.mk +++ b/test/tool/plinko/test.mk @@ -51,7 +51,6 @@ TEST_TOOL_PLINKO_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TESTLIB \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_XED diff --git a/third_party/ggml/ggml.mk b/third_party/ggml/ggml.mk index 47f2bd53b..f1a7e9700 100644 --- a/third_party/ggml/ggml.mk +++ b/third_party/ggml/ggml.mk @@ -136,7 +136,6 @@ THIRD_PARTY_GGML_LLAMA_DIRECTDEPS = \ LIBC_SYSV_CALLS \ LIBC_THREAD \ LIBC_TINYMATH \ - LIBC_ZIPOS \ THIRD_PARTY_GGML \ THIRD_PARTY_LIBCXX diff --git a/third_party/mbedtls/test/test.mk b/third_party/mbedtls/test/test.mk index 4490f72d7..0919c371a 100644 --- a/third_party/mbedtls/test/test.mk +++ b/third_party/mbedtls/test/test.mk @@ -108,7 +108,6 @@ THIRD_PARTY_MBEDTLS_TEST_DIRECTDEPS = \ LIBC_TIME \ LIBC_TESTLIB \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_GDTOA \ THIRD_PARTY_MBEDTLS diff --git a/third_party/python/python.mk b/third_party/python/python.mk index 1c77ad899..c8dcae64c 100644 --- a/third_party/python/python.mk +++ b/third_party/python/python.mk @@ -1179,7 +1179,6 @@ THIRD_PARTY_PYTHON_STAGE2_A_DIRECTDEPS = \ LIBC_TIME \ LIBC_TINYMATH \ LIBC_X \ - LIBC_ZIPOS \ NET_HTTP \ NET_HTTPS \ THIRD_PARTY_BZIP2 \ @@ -2099,7 +2098,6 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_TESTLIB \ LIBC_LOG \ - LIBC_ZIPOS \ LIBC_MEM \ LIBC_INTRIN \ LIBC_X \ @@ -4003,7 +4001,6 @@ THIRD_PARTY_PYTHON_PYTHON_DIRECTDEPS = \ LIBC_LOG \ LIBC_SYSV \ LIBC_X \ - LIBC_ZIPOS \ THIRD_PARTY_GETOPT \ THIRD_PARTY_LINENOISE \ THIRD_PARTY_PYTHON_STAGE1 \ diff --git a/third_party/sqlite3/sqlite3.mk b/third_party/sqlite3/sqlite3.mk index 1ecc4bd0d..f882e9826 100644 --- a/third_party/sqlite3/sqlite3.mk +++ b/third_party/sqlite3/sqlite3.mk @@ -56,7 +56,6 @@ THIRD_PARTY_SQLITE3_A_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TIME \ LIBC_TINYMATH \ - LIBC_ZIPOS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_GDTOA \ THIRD_PARTY_LINENOISE \ diff --git a/third_party/unzip/unzip.mk b/third_party/unzip/unzip.mk index 0730153eb..0c75743d8 100644 --- a/third_party/unzip/unzip.mk +++ b/third_party/unzip/unzip.mk @@ -24,7 +24,6 @@ THIRD_PARTY_UNZIP_A_DIRECTDEPS = \ LIBC_STR \ LIBC_SYSV \ LIBC_TIME \ - LIBC_ZIPOS \ THIRD_PARTY_BZIP2 THIRD_PARTY_UNZIP_A_DEPS := \ diff --git a/tool/ape/ape.mk b/tool/ape/ape.mk index e7b23e39e..2a0203e71 100644 --- a/tool/ape/ape.mk +++ b/tool/ape/ape.mk @@ -27,7 +27,6 @@ TOOL_APE_DIRECTDEPS = \ LIBC_SYSV \ LIBC_TIME \ LIBC_X \ - LIBC_ZIPOS \ NET_HTTP \ NET_HTTPS \ THIRD_PARTY_GETOPT \ diff --git a/tool/args/args.mk b/tool/args/args.mk index e64398df0..c07f16faa 100644 --- a/tool/args/args.mk +++ b/tool/args/args.mk @@ -19,10 +19,10 @@ TOOL_ARGS_A_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_MEM \ LIBC_NEXGEN32E \ + LIBC_RUNTIME \ LIBC_STR \ LIBC_SYSV \ - LIBC_X \ - LIBC_ZIPOS + LIBC_X TOOL_ARGS_A_DEPS := \ $(call uniq,$(foreach x,$(TOOL_ARGS_A_DIRECTDEPS),$($(x)))) diff --git a/tool/build/build.mk b/tool/build/build.mk index d193d97d0..aec2ec77f 100644 --- a/tool/build/build.mk +++ b/tool/build/build.mk @@ -46,7 +46,6 @@ TOOL_BUILD_DIRECTDEPS = \ LIBC_TIME \ LIBC_TINYMATH \ LIBC_X \ - LIBC_ZIPOS \ NET_HTTPS \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_GDTOA \ diff --git a/tool/curl/curl.mk b/tool/curl/curl.mk index 9e681d75b..afde61c4c 100644 --- a/tool/curl/curl.mk +++ b/tool/curl/curl.mk @@ -26,7 +26,6 @@ TOOL_CURL_DIRECTDEPS = \ LIBC_STR \ LIBC_SYSV \ LIBC_TIME \ - LIBC_ZIPOS \ NET_HTTP \ NET_HTTPS \ THIRD_PARTY_GETOPT \ diff --git a/tool/hello/hello.mk b/tool/hello/hello.mk index 2a192cebc..3f676ac8c 100644 --- a/tool/hello/hello.mk +++ b/tool/hello/hello.mk @@ -20,7 +20,6 @@ TOOL_HELLO_COMS = \ TOOL_HELLO_DIRECTDEPS = \ LIBC_CALLS \ LIBC_RUNTIME \ - LIBC_ZIPOS TOOL_HELLO_DEPS := \ $(call uniq,$(foreach x,$(TOOL_HELLO_DIRECTDEPS),$($(x)))) diff --git a/tool/net/net.mk b/tool/net/net.mk index 24a2abeb6..848f6a076 100644 --- a/tool/net/net.mk +++ b/tool/net/net.mk @@ -48,7 +48,6 @@ TOOL_NET_DIRECTDEPS = \ LIBC_THREAD \ LIBC_TINYMATH \ LIBC_X \ - LIBC_ZIPOS \ NET_FINGER \ NET_HTTP \ NET_HTTPS \ diff --git a/tool/plinko/plinko.mk b/tool/plinko/plinko.mk index 8602a7762..131eb18f7 100644 --- a/tool/plinko/plinko.mk +++ b/tool/plinko/plinko.mk @@ -27,7 +27,6 @@ TOOL_PLINKO_DIRECTDEPS = \ LIBC_STDIO \ LIBC_X \ LIBC_NEXGEN32E \ - LIBC_ZIPOS \ TOOL_PLINKO_LIB TOOL_PLINKO_DEPS := \ diff --git a/tool/viz/viz.mk b/tool/viz/viz.mk index 66bd7cf49..842874131 100644 --- a/tool/viz/viz.mk +++ b/tool/viz/viz.mk @@ -40,7 +40,6 @@ TOOL_VIZ_DIRECTDEPS = \ LIBC_TIME \ LIBC_TINYMATH \ LIBC_X \ - LIBC_ZIPOS \ NET_HTTP \ THIRD_PARTY_COMPILER_RT \ THIRD_PARTY_DLMALLOC \