diff --git a/Makefile b/Makefile index b30a1cefd..10ae1e1f0 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,6 @@ include libc/fmt/fmt.mk #─┘ include libc/calls/calls.mk #─┐ include libc/runtime/runtime.mk # ├──SYSTEMS RUNTIME include libc/crt/crt.mk # │ You can issue system calls -include libc/rand/rand.mk # │ include libc/unicode/unicode.mk # │ include third_party/dlmalloc/dlmalloc.mk #─┘ include libc/mem/mem.mk #─┐ @@ -208,7 +207,6 @@ include test/libc/x/test.mk include test/libc/xed/test.mk include test/libc/fmt/test.mk include test/libc/dns/test.mk -include test/libc/rand/test.mk include test/libc/time/test.mk include test/libc/stdio/test.mk include test/libc/release/test.mk @@ -302,7 +300,6 @@ COSMOPOLITAN_OBJECTS = \ LIBC_RUNTIME \ LIBC_ELF \ LIBC_CALLS \ - LIBC_RAND \ LIBC_SYSV_CALLS \ LIBC_NT_PSAPI \ LIBC_NT_POWRPROF \ @@ -337,7 +334,6 @@ COSMOPOLITAN_HEADERS = \ LIBC_MEM \ LIBC_NEXGEN32E \ LIBC_NT \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/examples/curl.c b/examples/curl.c index b8e7a1550..7c17861fb 100644 --- a/examples/curl.c +++ b/examples/curl.c @@ -18,7 +18,7 @@ #include "libc/log/check.h" #include "libc/log/log.h" #include "libc/macros.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.h" #include "libc/runtime/runtime.h" #include "libc/sock/goodsocket.internal.h" diff --git a/examples/examples.mk b/examples/examples.mk index b861d456a..5fd3e899b 100644 --- a/examples/examples.mk +++ b/examples/examples.mk @@ -56,7 +56,6 @@ EXAMPLES_DIRECTDEPS = \ LIBC_NT_USER32 \ LIBC_NT_WS2_32 \ LIBC_NT_ADVAPI32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/examples/forkrand.c b/examples/forkrand.c index ea6417d50..3365eee35 100644 --- a/examples/forkrand.c +++ b/examples/forkrand.c @@ -12,7 +12,7 @@ #include "libc/log/check.h" #include "libc/log/log.h" #include "libc/nt/nt/process.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.h" #include "libc/runtime/memtrack.internal.h" #include "libc/runtime/runtime.h" diff --git a/examples/generalized-automatic-datastructure-printing.c b/examples/generalized-automatic-datastructure-printing.c index d7f8edbcd..a828bca6c 100644 --- a/examples/generalized-automatic-datastructure-printing.c +++ b/examples/generalized-automatic-datastructure-printing.c @@ -8,7 +8,7 @@ ╚─────────────────────────────────────────────────────────────────*/ #endif #include "libc/log/gdb.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" /** diff --git a/examples/getrandom.c b/examples/getrandom.c index a5c109e83..a0dd600c8 100644 --- a/examples/getrandom.c +++ b/examples/getrandom.c @@ -18,8 +18,8 @@ #include "libc/mem/mem.h" #include "libc/nexgen32e/x86feature.h" #include "libc/nt/runtime.h" -#include "libc/rand/rand.h" -#include "libc/rand/xorshift.h" +#include "libc/stdio/rand.h" +#include "libc/stdio/xorshift.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/sysv/consts/ex.h" diff --git a/examples/hangman.c b/examples/hangman.c index f580aa476..83f20bd96 100644 --- a/examples/hangman.c +++ b/examples/hangman.c @@ -38,7 +38,7 @@ */ #include "libc/calls/calls.h" #include "libc/calls/struct/stat.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/libc/calls/samplepids.c b/libc/calls/samplepids.c index 99b0f9a06..97ef48258 100644 --- a/libc/calls/samplepids.c +++ b/libc/calls/samplepids.c @@ -21,7 +21,7 @@ #include "libc/dce.h" #include "libc/intrin/spinlock.h" #include "libc/nexgen32e/threaded.h" -#include "libc/rand/lcg.internal.h" +#include "libc/stdio/lcg.internal.h" /** * Returns handles of windows pids being tracked. diff --git a/libc/calls/wait4-nt.c b/libc/calls/wait4-nt.c index f7c4edaeb..044dbc127 100644 --- a/libc/calls/wait4-nt.c +++ b/libc/calls/wait4-nt.c @@ -38,7 +38,7 @@ #include "libc/nt/struct/filetime.h" #include "libc/nt/struct/processmemorycounters.h" #include "libc/nt/synchronization.h" -#include "libc/rand/lcg.internal.h" +#include "libc/stdio/lcg.internal.h" #include "libc/runtime/ezmap.internal.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" diff --git a/libc/dns/dns.mk b/libc/dns/dns.mk index f0f8e032b..7f2e1e94a 100644 --- a/libc/dns/dns.mk +++ b/libc/dns/dns.mk @@ -29,7 +29,6 @@ LIBC_DNS_A_DIRECTDEPS = \ LIBC_FMT \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/libc/dns/resolvedns.c b/libc/dns/resolvedns.c index fd88d3160..6791ac78c 100644 --- a/libc/dns/resolvedns.c +++ b/libc/dns/resolvedns.c @@ -24,7 +24,7 @@ #include "libc/dns/dnsquestion.h" #include "libc/dns/resolvconf.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/sock/internal.h" #include "libc/sock/sock.h" diff --git a/libc/dns/resolvednsreverse.c b/libc/dns/resolvednsreverse.c index 8bedc774e..4f8b08f8c 100644 --- a/libc/dns/resolvednsreverse.c +++ b/libc/dns/resolvednsreverse.c @@ -32,7 +32,7 @@ #include "libc/dns/dnsquestion.h" #include "libc/dns/resolvconf.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/sock/sock.h" #include "libc/str/str.h" diff --git a/libc/calls/_getauxval.c b/libc/intrin/_getauxval.c similarity index 100% rename from libc/calls/_getauxval.c rename to libc/intrin/_getauxval.c diff --git a/libc/rand/rand64.c b/libc/intrin/rand64.c similarity index 100% rename from libc/rand/rand64.c rename to libc/intrin/rand64.c diff --git a/libc/isystem/stdlib.h b/libc/isystem/stdlib.h index 96aa83a43..82ff1fa1c 100644 --- a/libc/isystem/stdlib.h +++ b/libc/isystem/stdlib.h @@ -3,7 +3,7 @@ #include "libc/alg/alg.h" #include "libc/fmt/conv.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/temp.h" #include "libc/sysv/consts/exit.h" diff --git a/libc/isystem/sys/random.h b/libc/isystem/sys/random.h index 724a9cf25..f03bbe59a 100644 --- a/libc/isystem/sys/random.h +++ b/libc/isystem/sys/random.h @@ -1,5 +1,5 @@ #ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_RANDOM_H_ #define COSMOPOLITAN_LIBC_ISYSTEM_SYS_RANDOM_H_ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/sysv/consts/grnd.h" #endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_RANDOM_H_ */ diff --git a/libc/log/log.mk b/libc/log/log.mk index 05b98dc27..9d38c6641 100644 --- a/libc/log/log.mk +++ b/libc/log/log.mk @@ -26,7 +26,6 @@ LIBC_LOG_A_CHECKS = \ $(LIBC_LOG_A_HDRS:%=o/$(MODE)/%.ok) LIBC_LOG_A_DIRECTDEPS = \ - LIBC_ALG \ LIBC_CALLS \ LIBC_ELF \ LIBC_FMT \ @@ -35,7 +34,6 @@ LIBC_LOG_A_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_NT_KERNEL32 \ LIBC_NT_NTDLL \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/libc/mem/mem.mk b/libc/mem/mem.mk index 86a2ef8a9..39dc4327b 100644 --- a/libc/mem/mem.mk +++ b/libc/mem/mem.mk @@ -33,7 +33,6 @@ LIBC_MEM_A_DIRECTDEPS = \ LIBC_FMT \ LIBC_INTRIN \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STR \ LIBC_STUBS \ diff --git a/libc/rand/internal.h b/libc/rand/internal.h deleted file mode 100644 index e2b4cf1e7..000000000 --- a/libc/rand/internal.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef COSMOPOLITAN_LIBC_RAND_INTERNAL_H_ -#define COSMOPOLITAN_LIBC_RAND_INTERNAL_H_ -#if !(__ASSEMBLER__ + __LINKER__ + 0) -COSMOPOLITAN_C_START_ - -hidden extern uint64_t g_rando; - -COSMOPOLITAN_C_END_ -#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* COSMOPOLITAN_LIBC_RAND_INTERNAL_H_ */ diff --git a/libc/rand/rand.mk b/libc/rand/rand.mk old mode 100644 new mode 100755 index 64fd1425a..e69de29bb --- a/libc/rand/rand.mk +++ b/libc/rand/rand.mk @@ -1,60 +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_RAND - -LIBC_RAND_ARTIFACTS += LIBC_RAND_A -LIBC_RAND = $(LIBC_RAND_A_DEPS) $(LIBC_RAND_A) -LIBC_RAND_A = o/$(MODE)/libc/rand/rand.a -LIBC_RAND_A_FILES := $(wildcard libc/rand/*) -LIBC_RAND_A_HDRS = $(filter %.h,$(LIBC_RAND_A_FILES)) -LIBC_RAND_A_SRCS_S = $(filter %.S,$(LIBC_RAND_A_FILES)) -LIBC_RAND_A_SRCS_C = $(filter %.c,$(LIBC_RAND_A_FILES)) - -LIBC_RAND_A_SRCS = \ - $(LIBC_RAND_A_SRCS_S) \ - $(LIBC_RAND_A_SRCS_C) - -LIBC_RAND_A_OBJS = \ - $(LIBC_RAND_A_SRCS_S:%.S=o/$(MODE)/%.o) \ - $(LIBC_RAND_A_SRCS_C:%.c=o/$(MODE)/%.o) - -LIBC_RAND_A_CHECKS = \ - $(LIBC_RAND_A).pkg \ - $(LIBC_RAND_A_HDRS:%=o/$(MODE)/%.ok) - -LIBC_RAND_A_DIRECTDEPS = \ - LIBC_CALLS \ - LIBC_INTRIN \ - LIBC_NEXGEN32E \ - LIBC_NT_ADVAPI32 \ - LIBC_STR \ - LIBC_STUBS \ - LIBC_SYSV \ - LIBC_SYSV_CALLS \ - LIBC_TINYMATH - -LIBC_RAND_A_DEPS := \ - $(call uniq,$(foreach x,$(LIBC_RAND_A_DIRECTDEPS),$($(x)))) - -$(LIBC_RAND_A): libc/rand/ \ - $(LIBC_RAND_A).pkg \ - $(LIBC_RAND_A_OBJS) - -$(LIBC_RAND_A).pkg: \ - $(LIBC_RAND_A_OBJS) \ - $(foreach x,$(LIBC_RAND_A_DIRECTDEPS),$($(x)_A).pkg) - -o/$(MODE)/libc/rand/mt19937-64.o: private \ - OVERRIDE_CFLAGS += \ - -ffunction-sections - -LIBC_RAND_LIBS = $(foreach x,$(LIBC_RAND_ARTIFACTS),$($(x))) -LIBC_RAND_SRCS = $(foreach x,$(LIBC_RAND_ARTIFACTS),$($(x)_SRCS)) -LIBC_RAND_HDRS = $(foreach x,$(LIBC_RAND_ARTIFACTS),$($(x)_HDRS)) -LIBC_RAND_CHECKS = $(foreach x,$(LIBC_RAND_ARTIFACTS),$($(x)_CHECKS)) -LIBC_RAND_OBJS = $(foreach x,$(LIBC_RAND_ARTIFACTS),$($(x)_OBJS)) -$(LIBC_RAND_OBJS): $(BUILD_FILES) libc/rand/rand.mk - -.PHONY: o/$(MODE)/libc/rand -o/$(MODE)/libc/rand: $(LIBC_RAND_CHECKS) diff --git a/libc/runtime/mmap.c b/libc/runtime/mmap.c index e1936e9a8..1e07db63d 100644 --- a/libc/runtime/mmap.c +++ b/libc/runtime/mmap.c @@ -41,7 +41,7 @@ #include "libc/nt/process.h" #include "libc/nt/runtime.h" #include "libc/nt/struct/processmemorycounters.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/directmap.internal.h" #include "libc/runtime/internal.h" #include "libc/runtime/memtrack.internal.h" diff --git a/libc/stdio/fflushimpl.c b/libc/stdio/fflushimpl.c index 8805b9a76..a3a75cbf4 100644 --- a/libc/stdio/fflushimpl.c +++ b/libc/stdio/fflushimpl.c @@ -20,6 +20,7 @@ #include "libc/errno.h" #include "libc/runtime/runtime.h" #include "libc/stdio/internal.h" +#include "libc/stdio/stdio.h" #include "libc/sysv/consts/o.h" int __fflush_impl(FILE *f) { diff --git a/libc/rand/g_rando.S b/libc/stdio/g_rando.S similarity index 100% rename from libc/rand/g_rando.S rename to libc/stdio/g_rando.S diff --git a/libc/rand/getentropy.c b/libc/stdio/getentropy.c similarity index 98% rename from libc/rand/getentropy.c rename to libc/stdio/getentropy.c index f3d262661..816189b85 100644 --- a/libc/rand/getentropy.c +++ b/libc/stdio/getentropy.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/sysv/consts/grnd.h" /** diff --git a/libc/rand/getrandom.c b/libc/stdio/getrandom.c similarity index 98% rename from libc/rand/getrandom.c rename to libc/stdio/getrandom.c index 2836d9281..68cd2c683 100644 --- a/libc/rand/getrandom.c +++ b/libc/stdio/getrandom.c @@ -16,7 +16,6 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/intrin/bits.h" #include "libc/calls/calls.h" #include "libc/calls/strace.internal.h" #include "libc/calls/struct/sigaction.h" @@ -25,15 +24,16 @@ #include "libc/calls/syscall_support-nt.internal.h" #include "libc/dce.h" #include "libc/errno.h" +#include "libc/intrin/bits.h" #include "libc/nexgen32e/kcpuids.h" #include "libc/nexgen32e/rdtsc.h" #include "libc/nexgen32e/vendor.internal.h" #include "libc/nexgen32e/x86feature.h" #include "libc/nexgen32e/x86info.h" #include "libc/nt/runtime.h" -#include "libc/rand/rand.h" -#include "libc/rand/xorshift.h" #include "libc/runtime/runtime.h" +#include "libc/stdio/rand.h" +#include "libc/stdio/xorshift.h" #include "libc/str/str.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/consts/auxv.h" diff --git a/libc/stdio/internal.h b/libc/stdio/internal.h index bcf750149..f4320b40a 100644 --- a/libc/stdio/internal.h +++ b/libc/stdio/internal.h @@ -11,6 +11,8 @@ extern char g_stdinbuf[BUFSIZ]; extern char g_stdoutbuf[BUFSIZ]; extern char g_stderrbuf[BUFSIZ]; +hidden extern uint64_t g_rando; + int __fflush_impl(FILE *) hidden; int __fflush_register(FILE *) hidden; void __fflush_unregister(FILE *) hidden; diff --git a/libc/rand/lcg.internal.h b/libc/stdio/lcg.internal.h similarity index 100% rename from libc/rand/lcg.internal.h rename to libc/stdio/lcg.internal.h diff --git a/libc/rand/lemur64.c b/libc/stdio/lemur64.c similarity index 98% rename from libc/rand/lemur64.c rename to libc/stdio/lemur64.c index a21c9cb40..a28536475 100644 --- a/libc/rand/lemur64.c +++ b/libc/stdio/lemur64.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" /** * Returns linear congruential deterministic pseudorandom data, e.g. diff --git a/libc/stdio/mkdtemp.c b/libc/stdio/mkdtemp.c index 98f00c39b..1a62f15e6 100644 --- a/libc/stdio/mkdtemp.c +++ b/libc/stdio/mkdtemp.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/calls.h" #include "libc/errno.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/temp.h" #include "libc/str/str.h" #include "libc/sysv/errfuns.h" diff --git a/libc/stdio/mkostempsm.c b/libc/stdio/mkostempsm.c index 5d887b4d7..64f6e17f7 100644 --- a/libc/stdio/mkostempsm.c +++ b/libc/stdio/mkostempsm.c @@ -20,8 +20,8 @@ #include "libc/calls/calls.h" #include "libc/calls/strace.internal.h" #include "libc/errno.h" -#include "libc/rand/lcg.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/lcg.internal.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/temp.h" #include "libc/str/str.h" diff --git a/libc/rand/mt19937.c b/libc/stdio/mt19937.c similarity index 99% rename from libc/rand/mt19937.c rename to libc/stdio/mt19937.c index 90f2b5a57..72d9c41f6 100644 --- a/libc/rand/mt19937.c +++ b/libc/stdio/mt19937.c @@ -36,7 +36,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/likely.h" #include "libc/macros.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" asm(".ident\t\"\\n\\n\ mt19937 (BSD-3)\\n\ diff --git a/libc/rand/rand.c b/libc/stdio/rand.c similarity index 96% rename from libc/rand/rand.c rename to libc/stdio/rand.c index bb799b097..edbad3b26 100644 --- a/libc/rand/rand.c +++ b/libc/stdio/rand.c @@ -16,9 +16,9 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/internal.h" -#include "libc/rand/lcg.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/internal.h" +#include "libc/stdio/lcg.internal.h" +#include "libc/stdio/rand.h" /** * Returns 31-bit linear congruential pseudorandom number, e.g. diff --git a/libc/rand/rand.h b/libc/stdio/rand.h similarity index 100% rename from libc/rand/rand.h rename to libc/stdio/rand.h diff --git a/libc/stdio/rand.mk b/libc/stdio/rand.mk new file mode 100755 index 000000000..e69de29bb diff --git a/libc/rand/random.c b/libc/stdio/random.c similarity index 99% rename from libc/rand/random.c rename to libc/stdio/random.c index bfae5347a..4ac97c894 100644 --- a/libc/rand/random.c +++ b/libc/stdio/random.c @@ -25,7 +25,7 @@ │ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ │ │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" asm(".ident\t\"\\n\\n\ Musl libc (MIT License)\\n\ diff --git a/libc/rand/rdrand.c b/libc/stdio/rdrand.c similarity index 99% rename from libc/rand/rdrand.c rename to libc/stdio/rdrand.c index 6c55da016..7b588cd74 100644 --- a/libc/rand/rdrand.c +++ b/libc/stdio/rdrand.c @@ -19,7 +19,7 @@ #include "libc/intrin/asmflag.h" #include "libc/errno.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/sysv/consts/grnd.h" STATIC_YOINK("rdrand_init"); diff --git a/libc/rand/rdrand_init.c b/libc/stdio/rdrand_init.c similarity index 98% rename from libc/rand/rdrand_init.c rename to libc/stdio/rdrand_init.c index 0d2ad25ce..3fec0846b 100644 --- a/libc/rand/rdrand_init.c +++ b/libc/stdio/rdrand_init.c @@ -20,7 +20,7 @@ #include "libc/nexgen32e/vendor.internal.h" #include "libc/nexgen32e/x86feature.h" #include "libc/nexgen32e/x86info.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" textstartup void rdrand_init(int argc, char **argv, char **envp, intptr_t *auxv) { diff --git a/libc/rand/rdseed.c b/libc/stdio/rdseed.c similarity index 99% rename from libc/rand/rdseed.c rename to libc/stdio/rdseed.c index a3711d90a..3ffe033ec 100644 --- a/libc/rand/rdseed.c +++ b/libc/stdio/rdseed.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/asmflag.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/sysv/consts/grnd.h" diff --git a/libc/rand/real1.c b/libc/stdio/real1.c similarity index 98% rename from libc/rand/real1.c rename to libc/stdio/real1.c index d73469c38..f9f3337e6 100644 --- a/libc/rand/real1.c +++ b/libc/stdio/real1.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" /** * Generates number on [0,1]-real-interval, e.g. diff --git a/libc/rand/real2.c b/libc/stdio/real2.c similarity index 98% rename from libc/rand/real2.c rename to libc/stdio/real2.c index b722b3b34..b6398a343 100644 --- a/libc/rand/real2.c +++ b/libc/stdio/real2.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" /** * Generates number on [0,1)-real-interval, e.g. diff --git a/libc/rand/real3.c b/libc/stdio/real3.c similarity index 98% rename from libc/rand/real3.c rename to libc/stdio/real3.c index ac0cadb3a..4412afca2 100644 --- a/libc/rand/real3.c +++ b/libc/stdio/real3.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" /** * Generates number on (0,1)-real-interval, e.g. diff --git a/libc/rand/rngset.c b/libc/stdio/rngset.c similarity index 99% rename from libc/rand/rngset.c rename to libc/stdio/rngset.c index 2e399e06a..b9317d20f 100644 --- a/libc/rand/rngset.c +++ b/libc/stdio/rngset.c @@ -19,7 +19,7 @@ #include "libc/calls/calls.h" #include "libc/dce.h" #include "libc/intrin/asan.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" /** diff --git a/libc/rand/srand.c b/libc/stdio/srand.c similarity index 98% rename from libc/rand/srand.c rename to libc/stdio/srand.c index 62cc380eb..53c06e3f3 100644 --- a/libc/rand/srand.c +++ b/libc/stdio/srand.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" extern uint64_t g_rando; diff --git a/libc/stdio/stdio.mk b/libc/stdio/stdio.mk index 0e98d486f..94b395fde 100644 --- a/libc/stdio/stdio.mk +++ b/libc/stdio/stdio.mk @@ -29,8 +29,8 @@ LIBC_STDIO_A_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_MEM \ LIBC_NEXGEN32E \ + LIBC_NT_ADVAPI32 \ LIBC_NT_KERNEL32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STR \ LIBC_STUBS \ @@ -57,6 +57,10 @@ o//libc/stdio/appendw.o: private \ OVERRIDE_CFLAGS += \ -Os +o/$(MODE)/libc/stdio/mt19937.o: private \ + OVERRIDE_CFLAGS += \ + -ffunction-sections + LIBC_STDIO_LIBS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x))) LIBC_STDIO_SRCS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)_SRCS)) LIBC_STDIO_HDRS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)_HDRS)) diff --git a/libc/rand/strfry.c b/libc/stdio/strfry.c similarity index 98% rename from libc/rand/strfry.c rename to libc/stdio/strfry.c index bcae53090..a91b30df2 100644 --- a/libc/rand/strfry.c +++ b/libc/stdio/strfry.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/alg/shuffle.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" /** diff --git a/libc/stdio/tmpfile.c b/libc/stdio/tmpfile.c index 7da29c4a0..566196b2f 100644 --- a/libc/stdio/tmpfile.c +++ b/libc/stdio/tmpfile.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/calls.h" #include "libc/errno.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/temp.h" #include "libc/str/str.h" diff --git a/libc/rand/vigna.c b/libc/stdio/vigna.c similarity index 99% rename from libc/rand/vigna.c rename to libc/stdio/vigna.c index 36443295c..5aeb30253 100644 --- a/libc/rand/vigna.c +++ b/libc/stdio/vigna.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" static uint64_t g_vigna; diff --git a/libc/rand/xorshift.h b/libc/stdio/xorshift.h similarity index 100% rename from libc/rand/xorshift.h rename to libc/stdio/xorshift.h diff --git a/libc/rand/xorshift32.c b/libc/stdio/xorshift32.c similarity index 98% rename from libc/rand/xorshift32.c rename to libc/stdio/xorshift32.c index c40cf68a9..613f84b0b 100644 --- a/libc/rand/xorshift32.c +++ b/libc/stdio/xorshift32.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/xorshift.h" +#include "libc/stdio/xorshift.h" uint32_t MarsagliaXorshift32(uint32_t state[hasatleast 1]) { uint32_t x = state[0]; diff --git a/libc/rand/xorshift64.c b/libc/stdio/xorshift64.c similarity index 98% rename from libc/rand/xorshift64.c rename to libc/stdio/xorshift64.c index 2bf6263d1..862a56188 100644 --- a/libc/rand/xorshift64.c +++ b/libc/stdio/xorshift64.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/xorshift.h" +#include "libc/stdio/xorshift.h" uint64_t MarsagliaXorshift64(uint64_t state[hasatleast 1]) { uint64_t x = state[0]; diff --git a/libc/testlib/testlib.mk b/libc/testlib/testlib.mk index 6c3e40ff0..81c19747d 100644 --- a/libc/testlib/testlib.mk +++ b/libc/testlib/testlib.mk @@ -101,7 +101,6 @@ LIBC_TESTLIB_A_DIRECTDEPS = \ LIBC_MEM \ LIBC_NEXGEN32E \ LIBC_NT_KERNEL32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/libc/rand/measureentropy.c b/libc/tinymath/measureentropy.c similarity index 98% rename from libc/rand/measureentropy.c rename to libc/tinymath/measureentropy.c index 3b5e6ab5a..35caf1d51 100644 --- a/libc/rand/measureentropy.c +++ b/libc/tinymath/measureentropy.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" /** diff --git a/libc/rand/poz.c b/libc/tinymath/poz.c similarity index 100% rename from libc/rand/poz.c rename to libc/tinymath/poz.c diff --git a/libc/rand/randtest.c b/libc/tinymath/randtest.c similarity index 100% rename from libc/rand/randtest.c rename to libc/tinymath/randtest.c diff --git a/net/https/generatecertificateserial.c b/net/https/generatecertificateserial.c index ebdf6c0b0..deb7283bc 100644 --- a/net/https/generatecertificateserial.c +++ b/net/https/generatecertificateserial.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "net/https/https.h" #include "third_party/mbedtls/bignum.h" diff --git a/net/https/generatehardrandom.c b/net/https/generatehardrandom.c index 98ca7cbc4..e3e5682dd 100644 --- a/net/https/generatehardrandom.c +++ b/net/https/generatehardrandom.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "net/https/https.h" int GenerateHardRandom(void *ctx, unsigned char *p, size_t n) { diff --git a/net/https/getentropy.c b/net/https/getentropy.c index a29494b9b..c461808ac 100644 --- a/net/https/getentropy.c +++ b/net/https/getentropy.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/log/check.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "net/https/https.h" int GetEntropy(void *c, unsigned char *p, size_t n) { diff --git a/net/https/https.mk b/net/https/https.mk index 0d4b1d743..ce45d668e 100644 --- a/net/https/https.mk +++ b/net/https/https.mk @@ -27,7 +27,6 @@ NET_HTTPS_A_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/net/https/initializerng.c b/net/https/initializerng.c index 737af255a..c37d002d6 100644 --- a/net/https/initializerng.c +++ b/net/https/initializerng.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/log/check.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "net/https/https.h" #include "third_party/mbedtls/ctr_drbg.h" diff --git a/test/dsp/core/mulaw_test.c b/test/dsp/core/mulaw_test.c index f1c9ddb47..67cdf9176 100644 --- a/test/dsp/core/mulaw_test.c +++ b/test/dsp/core/mulaw_test.c @@ -21,7 +21,7 @@ #include "libc/assert.h" #include "libc/macros.internal.h" #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/dsp/core/sad16x8n_test.c b/test/dsp/core/sad16x8n_test.c index e4ae0de00..3a07dfe5f 100644 --- a/test/dsp/core/sad16x8n_test.c +++ b/test/dsp/core/sad16x8n_test.c @@ -21,7 +21,7 @@ #include "libc/limits.h" #include "libc/log/check.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/buffer.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/dsp/core/scalevolume_test.c b/test/dsp/core/scalevolume_test.c index 5edeafb0a..82d4330e5 100644 --- a/test/dsp/core/scalevolume_test.c +++ b/test/dsp/core/scalevolume_test.c @@ -22,7 +22,7 @@ #include "libc/log/check.h" #include "libc/macros.internal.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/buffer.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/dsp/core/test.mk b/test/dsp/core/test.mk index 60dbc21e8..055e6c2c8 100644 --- a/test/dsp/core/test.mk +++ b/test/dsp/core/test.mk @@ -25,7 +25,6 @@ TEST_DSP_CORE_DIRECTDEPS = \ LIBC_TINYMATH \ LIBC_LOG \ LIBC_RUNTIME \ - LIBC_RAND \ LIBC_TESTLIB \ TOOL_VIZ_LIB \ THIRD_PARTY_BLAS \ diff --git a/test/dsp/scale/test.mk b/test/dsp/scale/test.mk index 87698b94b..e638a64e8 100644 --- a/test/dsp/scale/test.mk +++ b/test/dsp/scale/test.mk @@ -27,7 +27,6 @@ TEST_DSP_SCALE_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/test/dsp/tty/test.mk b/test/dsp/tty/test.mk index c8dd85733..e53ccc4ef 100644 --- a/test/dsp/tty/test.mk +++ b/test/dsp/tty/test.mk @@ -25,8 +25,8 @@ TEST_DSP_TTY_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ + LIBC_STDIO \ LIBC_STR \ LIBC_STUBS \ LIBC_TINYMATH \ diff --git a/test/dsp/tty/ttymove_test.c b/test/dsp/tty/ttymove_test.c index d829c9dde..a52b435b3 100644 --- a/test/dsp/tty/ttymove_test.c +++ b/test/dsp/tty/ttymove_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "dsp/tty/tty.h" #include "libc/intrin/bits.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/alg/djbsort_test.c b/test/libc/alg/djbsort_test.c index 5b46429c6..d7255420b 100644 --- a/test/libc/alg/djbsort_test.c +++ b/test/libc/alg/djbsort_test.c @@ -23,7 +23,7 @@ #include "libc/mem/mem.h" #include "libc/nexgen32e/nexgen32e.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/test/libc/alg/test.mk b/test/libc/alg/test.mk index e8b91cb20..12574fff2 100644 --- a/test/libc/alg/test.mk +++ b/test/libc/alg/test.mk @@ -28,7 +28,6 @@ TEST_LIBC_ALG_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/test/libc/calls/_timespec_test.c b/test/libc/calls/_timespec_test.c index 61b967beb..0a0b43dde 100644 --- a/test/libc/calls/_timespec_test.c +++ b/test/libc/calls/_timespec_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/struct/timespec.h" #include "libc/intrin/kprintf.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/testlib/testlib.h" TEST(_timespec_gte, test) { diff --git a/test/libc/calls/reservefd_test.c b/test/libc/calls/reservefd_test.c index c54d69df2..5d0b920d6 100644 --- a/test/libc/calls/reservefd_test.c +++ b/test/libc/calls/reservefd_test.c @@ -28,7 +28,7 @@ #include "libc/intrin/wait0.internal.h" #include "libc/macros.internal.h" #include "libc/nexgen32e/threaded.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/internal.h" #include "libc/runtime/stack.h" #include "libc/str/str.h" diff --git a/test/libc/calls/setrlimit_test.c b/test/libc/calls/setrlimit_test.c index 777a79d74..c07fb1b79 100644 --- a/test/libc/calls/setrlimit_test.c +++ b/test/libc/calls/setrlimit_test.c @@ -27,7 +27,7 @@ #include "libc/log/check.h" #include "libc/math.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/directmap.internal.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" diff --git a/test/libc/calls/symlinkat_test.c b/test/libc/calls/symlinkat_test.c index 97dab52b8..7d30ffd5b 100644 --- a/test/libc/calls/symlinkat_test.c +++ b/test/libc/calls/symlinkat_test.c @@ -21,7 +21,7 @@ #include "libc/errno.h" #include "libc/fmt/fmt.h" #include "libc/fmt/itoa.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/sysv/consts/at.h" #include "libc/sysv/consts/s.h" diff --git a/test/libc/calls/test.mk b/test/libc/calls/test.mk index a038f6796..dc25f85c7 100644 --- a/test/libc/calls/test.mk +++ b/test/libc/calls/test.mk @@ -37,7 +37,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_STDIO \ LIBC_SYSV_CALLS \ LIBC_RUNTIME \ diff --git a/test/libc/dns/dnsheader_test.c b/test/libc/dns/dnsheader_test.c index d8617cd8d..b91699674 100644 --- a/test/libc/dns/dnsheader_test.c +++ b/test/libc/dns/dnsheader_test.c @@ -19,7 +19,7 @@ #include "libc/dns/dns.h" #include "libc/dns/dnsheader.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/test/libc/dns/test.mk b/test/libc/dns/test.mk index c29aab197..658b4b2ac 100644 --- a/test/libc/dns/test.mk +++ b/test/libc/dns/test.mk @@ -33,7 +33,6 @@ TEST_LIBC_DNS_DIRECTDEPS = \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ - LIBC_RAND \ LIBC_STR \ LIBC_STUBS \ LIBC_SYSV \ diff --git a/test/libc/fmt/encodenf32_test.c b/test/libc/fmt/encodenf32_test.c index f244f40e1..d5b4e4d4b 100644 --- a/test/libc/fmt/encodenf32_test.c +++ b/test/libc/fmt/encodenf32_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/fmt/fmt.h" #include "libc/fmt/nf32.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/testlib/testlib.h" TEST(EncodeNf32, test) { diff --git a/test/libc/fmt/test.mk b/test/libc/fmt/test.mk index 8210441ad..528d29508 100644 --- a/test/libc/fmt/test.mk +++ b/test/libc/fmt/test.mk @@ -24,7 +24,6 @@ TEST_LIBC_FMT_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/test/libc/intrin/intrin_test.c b/test/libc/intrin/intrin_test.c index 9ef375a2a..9ccae1dbd 100644 --- a/test/libc/intrin/intrin_test.c +++ b/test/libc/intrin/intrin_test.c @@ -102,8 +102,8 @@ #include "libc/limits.h" #include "libc/log/check.h" #include "libc/nexgen32e/kcpuids.h" -#include "libc/rand/lcg.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/lcg.internal.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/test/libc/intrin/kprintf_test.c b/test/libc/intrin/kprintf_test.c index 5d61fbb4d..c1153d73a 100644 --- a/test/libc/intrin/kprintf_test.c +++ b/test/libc/intrin/kprintf_test.c @@ -25,7 +25,7 @@ #include "libc/limits.h" #include "libc/log/libfatal.internal.h" #include "libc/macros.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/memtrack.internal.h" #include "libc/runtime/runtime.h" #include "libc/runtime/symbols.internal.h" diff --git a/test/libc/intrin/memcmp_test.c b/test/libc/intrin/memcmp_test.c index a36273942..e819c6735 100644 --- a/test/libc/intrin/memcmp_test.c +++ b/test/libc/intrin/memcmp_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/test/libc/intrin/memmove_test.c b/test/libc/intrin/memmove_test.c index 90a5d61b9..203327807 100644 --- a/test/libc/intrin/memmove_test.c +++ b/test/libc/intrin/memmove_test.c @@ -19,7 +19,7 @@ #include "libc/macros.internal.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/nexgen32e.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/test/libc/intrin/memset_test.c b/test/libc/intrin/memset_test.c index c5adfabe4..fcc03b456 100644 --- a/test/libc/intrin/memset_test.c +++ b/test/libc/intrin/memset_test.c @@ -19,7 +19,7 @@ #include "libc/dce.h" #include "libc/intrin/asan.internal.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/intrin/palignr_test.c b/test/libc/intrin/palignr_test.c index 7907f9c6a..b7ddce936 100644 --- a/test/libc/intrin/palignr_test.c +++ b/test/libc/intrin/palignr_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/palignr.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/intrin/pshuf_test.c b/test/libc/intrin/pshuf_test.c index aa844a54f..de707e056 100644 --- a/test/libc/intrin/pshuf_test.c +++ b/test/libc/intrin/pshuf_test.c @@ -19,7 +19,7 @@ #include "libc/intrin/pshufd.h" #include "libc/intrin/pshufhw.h" #include "libc/intrin/pshuflw.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/rand/rand64_test.c b/test/libc/intrin/rand64_test.c similarity index 99% rename from test/libc/rand/rand64_test.c rename to test/libc/intrin/rand64_test.c index 18a63883e..83ace3f87 100644 --- a/test/libc/rand/rand64_test.c +++ b/test/libc/intrin/rand64_test.c @@ -28,7 +28,7 @@ #include "libc/macros.internal.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/threaded.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/internal.h" #include "libc/runtime/stack.h" #include "libc/str/str.h" diff --git a/test/libc/intrin/strlen_test.c b/test/libc/intrin/strlen_test.c index 6a5736317..bfbd3bc3c 100644 --- a/test/libc/intrin/strlen_test.c +++ b/test/libc/intrin/strlen_test.c @@ -20,7 +20,7 @@ #include "libc/macros.internal.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/bsr.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/intrin/test.mk b/test/libc/intrin/test.mk index d1db7cdd9..075025548 100644 --- a/test/libc/intrin/test.mk +++ b/test/libc/intrin/test.mk @@ -29,7 +29,6 @@ TEST_LIBC_INTRIN_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/test/libc/mem/malloc_test.c b/test/libc/mem/malloc_test.c index b8fbfcadd..4f78b72dd 100644 --- a/test/libc/mem/malloc_test.c +++ b/test/libc/mem/malloc_test.c @@ -25,7 +25,7 @@ #include "libc/intrin/kprintf.h" #include "libc/macros.internal.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/memtrack.internal.h" #include "libc/runtime/runtime.h" diff --git a/test/libc/mem/test.mk b/test/libc/mem/test.mk index abc921284..389bc918f 100644 --- a/test/libc/mem/test.mk +++ b/test/libc/mem/test.mk @@ -35,7 +35,6 @@ TEST_LIBC_MEM_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/test/libc/nexgen32e/memmove_test.c b/test/libc/nexgen32e/memmove_test.c index 6c43e46f6..9fdb0434a 100644 --- a/test/libc/nexgen32e/memmove_test.c +++ b/test/libc/nexgen32e/memmove_test.c @@ -19,7 +19,7 @@ #include "libc/intrin/bits.h" #include "libc/macros.internal.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/nexgen32e/strcaseconv_test.c b/test/libc/nexgen32e/strcaseconv_test.c index 06dc6d5dc..52a636142 100644 --- a/test/libc/nexgen32e/strcaseconv_test.c +++ b/test/libc/nexgen32e/strcaseconv_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/mem/mem.h" #include "libc/nexgen32e/nexgen32e.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/nexgen32e/test.mk b/test/libc/nexgen32e/test.mk index e30a19eb3..20915076a 100644 --- a/test/libc/nexgen32e/test.mk +++ b/test/libc/nexgen32e/test.mk @@ -32,7 +32,6 @@ TEST_LIBC_NEXGEN32E_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/test/libc/rand/test.mk b/test/libc/rand/test.mk deleted file mode 100644 index 8c00959e8..000000000 --- a/test/libc/rand/test.mk +++ /dev/null @@ -1,67 +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_RAND - -TEST_LIBC_RAND_SRCS := $(wildcard test/libc/rand/*.c) -TEST_LIBC_RAND_SRCS_TEST = $(filter %_test.c,$(TEST_LIBC_RAND_SRCS)) -TEST_LIBC_RAND_BINS = $(TEST_LIBC_RAND_COMS) $(TEST_LIBC_RAND_COMS:%=%.dbg) - -TEST_LIBC_RAND_OBJS = \ - $(TEST_LIBC_RAND_SRCS:%.c=o/$(MODE)/%.o) - -TEST_LIBC_RAND_COMS = \ - $(TEST_LIBC_RAND_SRCS:%.c=o/$(MODE)/%.com) - -TEST_LIBC_RAND_TESTS = $(TEST_LIBC_RAND_SRCS_TEST:%.c=o/$(MODE)/%.com.ok) - -TEST_LIBC_RAND_CHECKS = \ - $(TEST_LIBC_RAND_SRCS_TEST:%.c=o/$(MODE)/%.com.runs) - -TEST_LIBC_RAND_DIRECTDEPS = \ - LIBC_FMT \ - LIBC_INTRIN \ - LIBC_TINYMATH \ - LIBC_MEM \ - LIBC_NEXGEN32E \ - LIBC_RAND \ - LIBC_RUNTIME \ - LIBC_STDIO \ - LIBC_STR \ - LIBC_STUBS \ - LIBC_CALLS \ - LIBC_THREAD \ - LIBC_LOG \ - LIBC_SYSV \ - LIBC_TESTLIB \ - LIBC_UNICODE \ - LIBC_X \ - THIRD_PARTY_GDTOA \ - THIRD_PARTY_MBEDTLS - -TEST_LIBC_RAND_DEPS := \ - $(call uniq,$(foreach x,$(TEST_LIBC_RAND_DIRECTDEPS),$($(x)))) - -o/$(MODE)/test/libc/rand/rand.pkg: \ - $(TEST_LIBC_RAND_OBJS) \ - $(foreach x,$(TEST_LIBC_RAND_DIRECTDEPS),$($(x)_A).pkg) - -o/$(MODE)/test/libc/rand/%.com.dbg: \ - $(TEST_LIBC_RAND_DEPS) \ - o/$(MODE)/test/libc/rand/%.o \ - o/$(MODE)/test/libc/rand/rand.pkg \ - $(LIBC_TESTMAIN) \ - $(CRT) \ - $(APE_NO_MODIFY_SELF) - @$(APELINK) - -$(TEST_LIBC_RAND_OBJS): test/libc/rand/test.mk - -$(TEST_LIBC_RAND_OBJS): private \ - DEFAULT_CCFLAGS += \ - -fno-builtin - -.PHONY: o/$(MODE)/test/libc/rand -o/$(MODE)/test/libc/rand: \ - $(TEST_LIBC_RAND_BINS) \ - $(TEST_LIBC_RAND_CHECKS) diff --git a/test/libc/runtime/mmap_test.c b/test/libc/runtime/mmap_test.c index e3ed3d042..f8ecbcdce 100644 --- a/test/libc/runtime/mmap_test.c +++ b/test/libc/runtime/mmap_test.c @@ -29,7 +29,7 @@ #include "libc/linux/munmap.h" #include "libc/log/log.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/memtrack.internal.h" #include "libc/runtime/runtime.h" diff --git a/test/libc/runtime/test.mk b/test/libc/runtime/test.mk index 3c0d22553..8a612ec4a 100644 --- a/test/libc/runtime/test.mk +++ b/test/libc/runtime/test.mk @@ -30,7 +30,6 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/test/libc/rand/devrand_test.c b/test/libc/stdio/devrand_test.c similarity index 98% rename from test/libc/rand/devrand_test.c rename to test/libc/stdio/devrand_test.c index a416c5cb1..bcc2b1e80 100644 --- a/test/libc/rand/devrand_test.c +++ b/test/libc/stdio/devrand_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/dce.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/stdio/dirstream_test.c b/test/libc/stdio/dirstream_test.c index 5f2ce3641..80ee0b000 100644 --- a/test/libc/stdio/dirstream_test.c +++ b/test/libc/stdio/dirstream_test.c @@ -20,7 +20,7 @@ #include "libc/calls/struct/dirent.h" #include "libc/dce.h" #include "libc/errno.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" diff --git a/test/libc/stdio/fwrite_test.c b/test/libc/stdio/fwrite_test.c index f86afc015..db284b10d 100644 --- a/test/libc/stdio/fwrite_test.c +++ b/test/libc/stdio/fwrite_test.c @@ -21,7 +21,7 @@ #include "libc/dce.h" #include "libc/errno.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" diff --git a/test/libc/rand/getrandom_test.c b/test/libc/stdio/getrandom_test.c similarity index 99% rename from test/libc/rand/getrandom_test.c rename to test/libc/stdio/getrandom_test.c index 89368afbc..231754861 100644 --- a/test/libc/rand/getrandom_test.c +++ b/test/libc/stdio/getrandom_test.c @@ -20,8 +20,8 @@ #include "libc/log/check.h" #include "libc/math.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/lcg.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/lcg.internal.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/sysv/consts/grnd.h" diff --git a/test/libc/rand/mt19937_test.c b/test/libc/stdio/mt19937_test.c similarity index 99% rename from test/libc/rand/mt19937_test.c rename to test/libc/stdio/mt19937_test.c index 0274db013..53cbd1179 100644 --- a/test/libc/rand/mt19937_test.c +++ b/test/libc/stdio/mt19937_test.c @@ -21,7 +21,7 @@ #include "libc/log/check.h" #include "libc/macros.internal.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" diff --git a/test/libc/rand/rand_test.c b/test/libc/stdio/rand_test.c similarity index 98% rename from test/libc/rand/rand_test.c rename to test/libc/stdio/rand_test.c index 2982b9369..9af0ac52a 100644 --- a/test/libc/rand/rand_test.c +++ b/test/libc/stdio/rand_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/bits.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" #include "libc/testlib/hyperion.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/rand/rngset_test.c b/test/libc/stdio/rngset_test.c similarity index 99% rename from test/libc/rand/rngset_test.c rename to test/libc/stdio/rngset_test.c index 957817e81..7f9f80cc6 100644 --- a/test/libc/rand/rngset_test.c +++ b/test/libc/stdio/rngset_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/bits.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/testlib/testlib.h" uint64_t counter(void) { diff --git a/test/libc/stdio/test.mk b/test/libc/stdio/test.mk index c5e59f05c..2f5191e97 100644 --- a/test/libc/stdio/test.mk +++ b/test/libc/stdio/test.mk @@ -28,7 +28,6 @@ TEST_LIBC_STDIO_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ @@ -43,6 +42,7 @@ TEST_LIBC_STDIO_DIRECTDEPS = \ LIBC_X \ LIBC_ZIPOS \ THIRD_PARTY_GDTOA \ + THIRD_PARTY_MBEDTLS \ THIRD_PARTY_MUSL \ THIRD_PARTY_ZLIB \ THIRD_PARTY_ZLIB_GZ diff --git a/test/libc/str/blake2_test.c b/test/libc/str/blake2_test.c index 22381049b..cee7d1f22 100644 --- a/test/libc/str/blake2_test.c +++ b/test/libc/str/blake2_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/assert.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/blake2.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/str/bzero_test.c b/test/libc/str/bzero_test.c index 6f0ced315..c2f23efcb 100644 --- a/test/libc/str/bzero_test.c +++ b/test/libc/str/bzero_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/test/libc/str/highwayhash64_test.c b/test/libc/str/highwayhash64_test.c index b791d3e28..681d4d853 100644 --- a/test/libc/str/highwayhash64_test.c +++ b/test/libc/str/highwayhash64_test.c @@ -17,7 +17,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/inttypes.h" #include "libc/nexgen32e/crc32.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/highwayhash64.h" #include "libc/str/str.h" diff --git a/test/libc/str/longsort_test.c b/test/libc/str/longsort_test.c index 6487d6f2f..bdc007e8c 100644 --- a/test/libc/str/longsort_test.c +++ b/test/libc/str/longsort_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/alg/alg.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" diff --git a/test/libc/str/memccpy_test.c b/test/libc/str/memccpy_test.c index 3579352a7..76bb68493 100644 --- a/test/libc/str/memccpy_test.c +++ b/test/libc/str/memccpy_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/str/memcpy_test.c b/test/libc/str/memcpy_test.c index ee6452817..aae1f1301 100644 --- a/test/libc/str/memcpy_test.c +++ b/test/libc/str/memcpy_test.c @@ -19,7 +19,7 @@ #include "libc/intrin/bits.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/nexgen32e.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/str/memmem_test.c b/test/libc/str/memmem_test.c index eb9c28a8e..2134a8ab3 100644 --- a/test/libc/str/memmem_test.c +++ b/test/libc/str/memmem_test.c @@ -20,7 +20,7 @@ #include "libc/intrin/bits.h" #include "libc/intrin/likely.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/internal.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/str/memrchr_test.c b/test/libc/str/memrchr_test.c index c6e2f331f..ae3e2137f 100644 --- a/test/libc/str/memrchr_test.c +++ b/test/libc/str/memrchr_test.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/hyperion.h" diff --git a/test/libc/str/qsort_test.c b/test/libc/str/qsort_test.c index 17fdad838..63bfb2d1f 100644 --- a/test/libc/str/qsort_test.c +++ b/test/libc/str/qsort_test.c @@ -21,7 +21,7 @@ #include "libc/macros.internal.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/bsr.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/str/strchr_test.c b/test/libc/str/strchr_test.c index b297131c4..37d85e7e9 100644 --- a/test/libc/str/strchr_test.c +++ b/test/libc/str/strchr_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/intrin/bits.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/hyperion.h" diff --git a/test/libc/str/strcmp_test.c b/test/libc/str/strcmp_test.c index ff2ebeb80..a45e953e7 100644 --- a/test/libc/str/strcmp_test.c +++ b/test/libc/str/strcmp_test.c @@ -23,7 +23,7 @@ #include "libc/mem/mem.h" #include "libc/nexgen32e/cachesize.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/test/libc/str/test.mk b/test/libc/str/test.mk index 4d1cef43b..e786f7095 100644 --- a/test/libc/str/test.mk +++ b/test/libc/str/test.mk @@ -39,7 +39,6 @@ TEST_LIBC_STR_DIRECTDEPS = \ LIBC_TINYMATH \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/test/libc/str/tpenc_test.c b/test/libc/str/tpenc_test.c index 7d262e518..9fa94d563 100644 --- a/test/libc/str/tpenc_test.c +++ b/test/libc/str/tpenc_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/limits.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/str/tpenc.h" diff --git a/test/libc/tinymath/acos_test.c b/test/libc/tinymath/acos_test.c index 0a8b22a71..90a97e836 100644 --- a/test/libc/tinymath/acos_test.c +++ b/test/libc/tinymath/acos_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/tinymath/asin_test.c b/test/libc/tinymath/asin_test.c index 778d8afef..ac714c3a2 100644 --- a/test/libc/tinymath/asin_test.c +++ b/test/libc/tinymath/asin_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/tinymath/fmod_test.c b/test/libc/tinymath/fmod_test.c index ea9a3463f..0bcfad25d 100644 --- a/test/libc/tinymath/fmod_test.c +++ b/test/libc/tinymath/fmod_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/libc/tinymath/ldexp_test.c b/test/libc/tinymath/ldexp_test.c index eb291d559..e8c482702 100644 --- a/test/libc/tinymath/ldexp_test.c +++ b/test/libc/tinymath/ldexp_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/testlib/ezbench.h" diff --git a/test/libc/rand/measureentropy_test.c b/test/libc/tinymath/measureentropy_test.c similarity index 99% rename from test/libc/rand/measureentropy_test.c rename to test/libc/tinymath/measureentropy_test.c index feeaf3f93..1f8ca09bd 100644 --- a/test/libc/rand/measureentropy_test.c +++ b/test/libc/tinymath/measureentropy_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/hyperion.h" diff --git a/test/libc/tinymath/powl_test.c b/test/libc/tinymath/powl_test.c index 64a1ab0bb..c00bc8aa1 100644 --- a/test/libc/tinymath/powl_test.c +++ b/test/libc/tinymath/powl_test.c @@ -23,7 +23,7 @@ #include "libc/fmt/fmt.h" #include "libc/macros.internal.h" #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/pc.internal.h" #include "libc/stdio/stdio.h" diff --git a/test/libc/tinymath/test.mk b/test/libc/tinymath/test.mk index 86133b3ed..5df1991ce 100644 --- a/test/libc/tinymath/test.mk +++ b/test/libc/tinymath/test.mk @@ -28,7 +28,6 @@ TEST_LIBC_TINYMATH_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_STDIO \ LIBC_RUNTIME \ LIBC_STR \ diff --git a/test/libc/x/filecmp_test.c b/test/libc/x/filecmp_test.c index 578d262d9..0d989a707 100644 --- a/test/libc/x/filecmp_test.c +++ b/test/libc/x/filecmp_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/sysv/consts/madv.h" diff --git a/test/libc/x/test.mk b/test/libc/x/test.mk index ef812823c..06f3aaa4b 100644 --- a/test/libc/x/test.mk +++ b/test/libc/x/test.mk @@ -31,7 +31,6 @@ TEST_LIBC_X_DIRECTDEPS = \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ - LIBC_RAND \ LIBC_SOCK \ LIBC_STUBS \ LIBC_SYSV \ diff --git a/test/net/finger/describesyn_test.c b/test/net/finger/describesyn_test.c index 563df88f9..a977098a6 100644 --- a/test/net/finger/describesyn_test.c +++ b/test/net/finger/describesyn_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/log/check.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/str/str.h" #include "libc/testlib/testlib.h" #include "net/finger/finger.h" diff --git a/test/net/http/encodebase64_test.c b/test/net/http/encodebase64_test.c index 14639b878..7b8df1382 100644 --- a/test/net/http/encodebase64_test.c +++ b/test/net/http/encodebase64_test.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/net/http/parseurl_test.c b/test/net/http/parseurl_test.c index 7c7b333dc..a67326ce2 100644 --- a/test/net/http/parseurl_test.c +++ b/test/net/http/parseurl_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/limits.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/net/https/mbedtls_test.c b/test/net/https/mbedtls_test.c index dc3d67a17..c6095b4b0 100644 --- a/test/net/https/mbedtls_test.c +++ b/test/net/https/mbedtls_test.c @@ -23,7 +23,7 @@ #include "libc/nexgen32e/nexgen32e.h" #include "libc/nexgen32e/x86feature.h" #include "libc/nt/typedef/imagetlscallback.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/str/blake2.h" diff --git a/test/tool/build/lib/disinst_test.c b/test/tool/build/lib/disinst_test.c index e34dd58e0..7cc355b05 100644 --- a/test/tool/build/lib/disinst_test.c +++ b/test/tool/build/lib/disinst_test.c @@ -16,8 +16,8 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/lcg.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/lcg.internal.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" diff --git a/test/tool/net/test.mk b/test/tool/net/test.mk index 9027f77c8..7e9e669ba 100644 --- a/test/tool/net/test.mk +++ b/test/tool/net/test.mk @@ -35,7 +35,6 @@ TEST_TOOL_NET_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/test/tool/viz/lib/bilinearscale_test.c b/test/tool/viz/lib/bilinearscale_test.c index 1fa2f1d00..3726536e4 100644 --- a/test/tool/viz/lib/bilinearscale_test.c +++ b/test/tool/viz/lib/bilinearscale_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/log/log.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/testlib/ezbench.h" #include "libc/testlib/testlib.h" #include "libc/x/x.h" diff --git a/test/tool/viz/lib/fun_test.c b/test/tool/viz/lib/fun_test.c index 3ea04447a..392279562 100644 --- a/test/tool/viz/lib/fun_test.c +++ b/test/tool/viz/lib/fun_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/log/check.h" #include "libc/macros.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/test/tool/viz/lib/test.mk b/test/tool/viz/lib/test.mk index ca85dda17..491d3d36c 100644 --- a/test/tool/viz/lib/test.mk +++ b/test/tool/viz/lib/test.mk @@ -30,7 +30,6 @@ TEST_TOOL_VIZ_LIB_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STUBS \ diff --git a/test/tool/viz/lib/ycbcr2rgb2_test.c b/test/tool/viz/lib/ycbcr2rgb2_test.c index ac63a5b33..e07ffa9e5 100644 --- a/test/tool/viz/lib/ycbcr2rgb2_test.c +++ b/test/tool/viz/lib/ycbcr2rgb2_test.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "dsp/mpeg/mpeg.h" #include "libc/macros.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/third_party/bzip2/bzip2.mk b/third_party/bzip2/bzip2.mk index e25627698..cd4427bfe 100644 --- a/third_party/bzip2/bzip2.mk +++ b/third_party/bzip2/bzip2.mk @@ -28,7 +28,6 @@ THIRD_PARTY_BZIP2_A_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/third_party/bzip2/spewG.c b/third_party/bzip2/spewG.c index 2d65b8d60..4af0a5cfa 100644 --- a/third_party/bzip2/spewG.c +++ b/third_party/bzip2/spewG.c @@ -1,4 +1,4 @@ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" /* clang-format off */ diff --git a/third_party/dlmalloc/dlmalloc.c b/third_party/dlmalloc/dlmalloc.c index c5210effe..ee7eece36 100644 --- a/third_party/dlmalloc/dlmalloc.c +++ b/third_party/dlmalloc/dlmalloc.c @@ -9,7 +9,7 @@ #include "libc/mem/mem.h" #include "libc/nexgen32e/bsr.h" #include "libc/nexgen32e/rdtsc.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/runtime/sysconf.h" #include "libc/stdio/stdio.h" diff --git a/third_party/dlmalloc/dlmalloc.mk b/third_party/dlmalloc/dlmalloc.mk index ce95c5843..a4e1c34fd 100644 --- a/third_party/dlmalloc/dlmalloc.mk +++ b/third_party/dlmalloc/dlmalloc.mk @@ -31,7 +31,6 @@ THIRD_PARTY_DLMALLOC_A_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_RUNTIME \ LIBC_STR \ - LIBC_RAND \ LIBC_STUBS \ LIBC_SYSV \ LIBC_SYSV_CALLS \ diff --git a/third_party/double-conversion/double-conversion.mk b/third_party/double-conversion/double-conversion.mk index 60ad6113b..eb68607ae 100644 --- a/third_party/double-conversion/double-conversion.mk +++ b/third_party/double-conversion/double-conversion.mk @@ -68,7 +68,6 @@ THIRD_PARTY_DOUBLECONVERSION_A_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_MEM \ LIBC_RUNTIME \ - LIBC_RAND \ LIBC_STDIO \ LIBC_FMT \ LIBC_SYSV \ diff --git a/third_party/libcxx/libcxx.mk b/third_party/libcxx/libcxx.mk index 924734a25..040c1fd73 100644 --- a/third_party/libcxx/libcxx.mk +++ b/third_party/libcxx/libcxx.mk @@ -156,7 +156,6 @@ THIRD_PARTY_LIBCXX_A_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/third_party/libcxx/random.cc b/third_party/libcxx/random.cc index de7591190..c9711339f 100644 --- a/third_party/libcxx/random.cc +++ b/third_party/libcxx/random.cc @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "third_party/libcxx/__config" #include "third_party/libcxx/random" #include "third_party/libcxx/system_error" diff --git a/third_party/mbedtls/mbedtls.mk b/third_party/mbedtls/mbedtls.mk index 90f35ab9f..afab323c1 100644 --- a/third_party/mbedtls/mbedtls.mk +++ b/third_party/mbedtls/mbedtls.mk @@ -22,7 +22,6 @@ THIRD_PARTY_MBEDTLS_A_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_LOG \ diff --git a/third_party/mbedtls/rando.c b/third_party/mbedtls/rando.c index 77f5b07bd..79911352b 100644 --- a/third_party/mbedtls/rando.c +++ b/third_party/mbedtls/rando.c @@ -17,7 +17,7 @@ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/sysv/consts/grnd.h" #include "third_party/mbedtls/entropy_poll.h" diff --git a/third_party/mbedtls/rsa.c b/third_party/mbedtls/rsa.c index e2aa45dc5..d80e88dd2 100644 --- a/third_party/mbedtls/rsa.c +++ b/third_party/mbedtls/rsa.c @@ -17,7 +17,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/strace.internal.h" #include "libc/intrin/kprintf.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "third_party/mbedtls/common.h" #include "third_party/mbedtls/error.h" diff --git a/third_party/mbedtls/test/everest_test.c b/third_party/mbedtls/test/everest_test.c index c9abc7825..79d5c486b 100644 --- a/third_party/mbedtls/test/everest_test.c +++ b/third_party/mbedtls/test/everest_test.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/third_party/mbedtls/test/lib.c b/third_party/mbedtls/test/lib.c index ba39d5f1b..df0ba548e 100644 --- a/third_party/mbedtls/test/lib.c +++ b/third_party/mbedtls/test/lib.c @@ -29,7 +29,7 @@ #include "libc/mem/mem.h" #include "libc/nexgen32e/vendor.internal.h" #include "libc/nt/runtime.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/internal.h" #include "libc/runtime/runtime.h" #include "libc/runtime/symbols.internal.h" diff --git a/third_party/mbedtls/test/secp384r1_test.c b/third_party/mbedtls/test/secp384r1_test.c index 8525ccce3..2c78465ba 100644 --- a/third_party/mbedtls/test/secp384r1_test.c +++ b/third_party/mbedtls/test/secp384r1_test.c @@ -16,7 +16,7 @@ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "libc/testlib/ezbench.h" diff --git a/third_party/mbedtls/test/test.mk b/third_party/mbedtls/test/test.mk index 13e386432..1b6b20fa2 100644 --- a/third_party/mbedtls/test/test.mk +++ b/third_party/mbedtls/test/test.mk @@ -101,7 +101,6 @@ THIRD_PARTY_MBEDTLS_TEST_DIRECTDEPS = \ LIBC_MEM \ LIBC_NEXGEN32E \ LIBC_NT_KERNEL32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/third_party/mbedtls/test/test_suite_ssl.c b/third_party/mbedtls/test/test_suite_ssl.c index 093cc3d8b..7927c3b5c 100644 --- a/third_party/mbedtls/test/test_suite_ssl.c +++ b/third_party/mbedtls/test/test_suite_ssl.c @@ -19,7 +19,7 @@ #include "third_party/mbedtls/ssl_invasive.h" #include "libc/testlib/testlib.h" #include "libc/log/log.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/intrin/safemacros.internal.h" #include "third_party/mbedtls/test/test.inc" /* diff --git a/third_party/musl/crypt_sha256.c b/third_party/musl/crypt_sha256.c index ec2e38a7d..9e3b35f19 100644 --- a/third_party/musl/crypt_sha256.c +++ b/third_party/musl/crypt_sha256.c @@ -33,7 +33,7 @@ #include "libc/literal.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/nexgen32e.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/stdio/temp.h" diff --git a/third_party/musl/crypt_sha512.c b/third_party/musl/crypt_sha512.c index 48a4d1b12..82e95194f 100644 --- a/third_party/musl/crypt_sha512.c +++ b/third_party/musl/crypt_sha512.c @@ -33,7 +33,7 @@ #include "libc/literal.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/nexgen32e.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/stdio/temp.h" diff --git a/third_party/musl/encrypt.c b/third_party/musl/encrypt.c index 5e25ed62c..e20a8342e 100644 --- a/third_party/musl/encrypt.c +++ b/third_party/musl/encrypt.c @@ -32,7 +32,7 @@ #include "libc/limits.h" #include "libc/literal.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/temp.h" #include "libc/sysv/consts/exit.h" diff --git a/third_party/python/Modules/_randommodule.c b/third_party/python/Modules/_randommodule.c index e543efd90..f1d52d203 100644 --- a/third_party/python/Modules/_randommodule.c +++ b/third_party/python/Modules/_randommodule.c @@ -7,7 +7,7 @@ #include "libc/intrin/bits.h" #include "libc/calls/calls.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/sysv/consts/grnd.h" #include "third_party/python/Include/floatobject.h" diff --git a/third_party/python/Modules/expat/xmlparse.c b/third_party/python/Modules/expat/xmlparse.c index c5a16dbff..0c4594fba 100644 --- a/third_party/python/Modules/expat/xmlparse.c +++ b/third_party/python/Modules/expat/xmlparse.c @@ -6,7 +6,7 @@ #include "libc/mem/mem.h" #include "libc/nexgen32e/rdtsc.h" #include "libc/nexgen32e/x86feature.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/third_party/python/Python/random.c b/third_party/python/Python/random.c index ea905e280..1de52b6a1 100644 --- a/third_party/python/Python/random.c +++ b/third_party/python/Python/random.c @@ -11,7 +11,7 @@ #include "libc/fmt/conv.h" #include "libc/macros.internal.h" #include "libc/nexgen32e/rdtsc.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" #include "libc/sysv/consts/auxv.h" diff --git a/third_party/python/python.mk b/third_party/python/python.mk index 6e2e97b4f..f87b0b2f3 100644 --- a/third_party/python/python.mk +++ b/third_party/python/python.mk @@ -449,7 +449,6 @@ THIRD_PARTY_PYTHON_STAGE1_A_DIRECTDEPS = \ LIBC_MEM \ LIBC_NEXGEN32E \ LIBC_NT_KERNEL32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ @@ -1130,7 +1129,6 @@ THIRD_PARTY_PYTHON_STAGE2_A_DIRECTDEPS = \ LIBC_MEM \ LIBC_NEXGEN32E \ LIBC_NT_KERNEL32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/third_party/sqlite3/os_unix.c b/third_party/sqlite3/os_unix.c index 9529293cd..a194f2539 100644 --- a/third_party/sqlite3/os_unix.c +++ b/third_party/sqlite3/os_unix.c @@ -44,7 +44,7 @@ ** * Definitions of sqlite3_vfs objects for all locking methods ** plus implementations of sqlite3_os_init() and sqlite3_os_end(). */ -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/sysv/consts/lock.h" #include "libc/calls/struct/stat.h" #include "libc/sysv/consts/s.h" diff --git a/third_party/sqlite3/sqlite3.mk b/third_party/sqlite3/sqlite3.mk index 542b3dfbe..9076f84a4 100644 --- a/third_party/sqlite3/sqlite3.mk +++ b/third_party/sqlite3/sqlite3.mk @@ -56,7 +56,6 @@ THIRD_PARTY_SQLITE3_A_DIRECTDEPS = \ LIBC_SYSV \ LIBC_SYSV_CALLS \ LIBC_TIME \ - LIBC_RAND \ LIBC_TINYMATH \ LIBC_UNICODE \ THIRD_PARTY_GDTOA \ diff --git a/third_party/zip/crypt.c b/third_party/zip/crypt.c index 5e0155f9b..18a0ea12b 100644 --- a/third_party/zip/crypt.c +++ b/third_party/zip/crypt.c @@ -3,7 +3,7 @@ #include "third_party/zip/zip.h" #include "third_party/zip/crypt.h" #include "third_party/zip/ttyio.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" /* Copyright (c) 1990-2008 Info-ZIP. All rights reserved. diff --git a/third_party/zip/zip.mk b/third_party/zip/zip.mk index 493e369af..a74f6c782 100644 --- a/third_party/zip/zip.mk +++ b/third_party/zip/zip.mk @@ -85,7 +85,6 @@ THIRD_PARTY_ZIP_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ diff --git a/tool/build/blinkenlights.c b/tool/build/blinkenlights.c index 8826bb40b..af867a057 100644 --- a/tool/build/blinkenlights.c +++ b/tool/build/blinkenlights.c @@ -46,7 +46,7 @@ #include "libc/macros.internal.h" #include "libc/math.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/sock/sock.h" diff --git a/tool/build/build.mk b/tool/build/build.mk index c15f79586..2a23b4c97 100644 --- a/tool/build/build.mk +++ b/tool/build/build.mk @@ -49,7 +49,6 @@ TOOL_BUILD_DIRECTDEPS = \ LIBC_NT_KERNEL32 \ LIBC_NT_USER32 \ LIBC_NT_WS2_32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/tool/build/calculator.c b/tool/build/calculator.c index aabc49ce3..fa94ad025 100644 --- a/tool/build/calculator.c +++ b/tool/build/calculator.c @@ -25,7 +25,7 @@ #include "libc/macros.internal.h" #include "libc/math.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/tool/build/lib/buildlib.mk b/tool/build/lib/buildlib.mk index 496292617..88d759202 100644 --- a/tool/build/lib/buildlib.mk +++ b/tool/build/lib/buildlib.mk @@ -40,7 +40,6 @@ TOOL_BUILD_LIB_A_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/tool/build/lib/elfwriter_zip.c b/tool/build/lib/elfwriter_zip.c index 93c5ccce6..b89dd5bcf 100644 --- a/tool/build/lib/elfwriter_zip.c +++ b/tool/build/lib/elfwriter_zip.c @@ -26,7 +26,7 @@ #include "libc/log/check.h" #include "libc/nexgen32e/crc32.h" #include "libc/nt/enum/fileflagandattributes.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/sysv/consts/s.h" #include "libc/time/struct/tm.h" diff --git a/tool/build/lib/eztls.c b/tool/build/lib/eztls.c index 18093329a..e52d745be 100644 --- a/tool/build/lib/eztls.c +++ b/tool/build/lib/eztls.c @@ -21,7 +21,7 @@ #include "libc/errno.h" #include "libc/log/check.h" #include "libc/log/log.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/sock/sock.h" #include "libc/sysv/consts/sig.h" #include "libc/x/x.h" diff --git a/tool/build/lib/machine.c b/tool/build/lib/machine.c index 0cf9a0d01..110832c41 100644 --- a/tool/build/lib/machine.c +++ b/tool/build/lib/machine.c @@ -18,7 +18,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/log/check.h" #include "libc/macros.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" #include "tool/build/lib/abp.h" diff --git a/tool/decode/decode.mk b/tool/decode/decode.mk index 997b22a79..bfa304d2a 100644 --- a/tool/decode/decode.mk +++ b/tool/decode/decode.mk @@ -28,8 +28,6 @@ TOOL_DECODE_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ - LIBC_RUNTIME \ LIBC_RUNTIME \ LIBC_STDIO \ LIBC_STR \ @@ -37,6 +35,7 @@ TOOL_DECODE_DIRECTDEPS = \ LIBC_SYSV \ LIBC_SYSV_CALLS \ LIBC_TIME \ + LIBC_TINYMATH \ LIBC_UNICODE \ LIBC_X \ THIRD_PARTY_GDTOA \ diff --git a/tool/decode/ent.c b/tool/decode/ent.c index e4b9fab11..a49723dda 100644 --- a/tool/decode/ent.c +++ b/tool/decode/ent.c @@ -27,7 +27,7 @@ #include "libc/calls/calls.h" #include "libc/math.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" #include "third_party/getopt/getopt.h" diff --git a/tool/lambda/lib/lib.mk b/tool/lambda/lib/lib.mk index 765161006..03b042637 100644 --- a/tool/lambda/lib/lib.mk +++ b/tool/lambda/lib/lib.mk @@ -28,7 +28,6 @@ TOOL_LAMBDA_LIB_A_DIRECTDEPS = \ LIBC_INTRIN \ LIBC_LOG \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_UNICODE \ LIBC_MEM \ diff --git a/tool/net/echo.c b/tool/net/echo.c index 3748dcf90..237ab28c0 100644 --- a/tool/net/echo.c +++ b/tool/net/echo.c @@ -20,7 +20,7 @@ #include "libc/fmt/conv.h" #include "libc/intrin/kprintf.h" #include "libc/log/check.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/sock/sock.h" #include "libc/sock/struct/sockaddr.h" diff --git a/tool/net/lfuncs.c b/tool/net/lfuncs.c index 36d52afac..51efeecf6 100644 --- a/tool/net/lfuncs.c +++ b/tool/net/lfuncs.c @@ -38,7 +38,7 @@ #include "libc/nexgen32e/crc32.h" #include "libc/nexgen32e/rdtsc.h" #include "libc/nexgen32e/rdtscp.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/runtime/sysconf.h" diff --git a/tool/net/net.mk b/tool/net/net.mk index e95f9c556..0a0b9bd9c 100644 --- a/tool/net/net.mk +++ b/tool/net/net.mk @@ -39,7 +39,6 @@ TOOL_NET_DIRECTDEPS = \ LIBC_NEXGEN32E \ LIBC_NT_IPHLPAPI \ LIBC_NT_KERNEL32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/tool/net/redbean.c b/tool/net/redbean.c index 7ef129757..f269d1f9f 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -54,7 +54,7 @@ #include "libc/nexgen32e/x86feature.h" #include "libc/nt/enum/fileflagandattributes.h" #include "libc/nt/thread.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/clktck.h" #include "libc/runtime/gc.h" #include "libc/runtime/gc.internal.h" diff --git a/tool/net/wb.c b/tool/net/wb.c index 62979fe68..da66f3e5e 100644 --- a/tool/net/wb.c +++ b/tool/net/wb.c @@ -26,7 +26,7 @@ #include "libc/macros.internal.h" #include "libc/math.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/sock/goodsocket.internal.h" #include "libc/sock/sock.h" diff --git a/tool/plinko/lib/lib.mk b/tool/plinko/lib/lib.mk index 1f3b6de8d..b07702961 100644 --- a/tool/plinko/lib/lib.mk +++ b/tool/plinko/lib/lib.mk @@ -30,7 +30,6 @@ TOOL_PLINKO_LIB_A_DIRECTDEPS = \ LIBC_LOG \ LIBC_MEM \ LIBC_NEXGEN32E \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \ diff --git a/tool/viz/generatematrix.c b/tool/viz/generatematrix.c index 2a2493b34..cad8944eb 100644 --- a/tool/viz/generatematrix.c +++ b/tool/viz/generatematrix.c @@ -25,8 +25,8 @@ #include "libc/macros.internal.h" #include "libc/math.h" #include "libc/mem/mem.h" -#include "libc/rand/lcg.internal.h" -#include "libc/rand/rand.h" +#include "libc/stdio/lcg.internal.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" #include "libc/stdio/stdio.h" diff --git a/tool/viz/life.c b/tool/viz/life.c index fcfba8df2..f03ab6e78 100644 --- a/tool/viz/life.c +++ b/tool/viz/life.c @@ -66,7 +66,7 @@ #include "libc/nt/struct/windowplacement.h" #include "libc/nt/struct/wndclass.h" #include "libc/nt/windows.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/runtime.h" #include "libc/sock/sock.h" #include "libc/sock/struct/pollfd.h" diff --git a/tool/viz/magikarp.c b/tool/viz/magikarp.c index 920490d10..7e52a701c 100644 --- a/tool/viz/magikarp.c +++ b/tool/viz/magikarp.c @@ -30,7 +30,7 @@ #include "libc/math.h" #include "libc/mem/mem.h" #include "libc/nexgen32e/bsr.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/tool/viz/printansi.c b/tool/viz/printansi.c index e754587aa..2a8c4bb16 100644 --- a/tool/viz/printansi.c +++ b/tool/viz/printansi.c @@ -36,7 +36,7 @@ #include "libc/macros.internal.h" #include "libc/math.h" #include "libc/mem/mem.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/gc.internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/tool/viz/printvideo.c b/tool/viz/printvideo.c index 546062391..a1a6a540c 100644 --- a/tool/viz/printvideo.c +++ b/tool/viz/printvideo.c @@ -55,7 +55,7 @@ #include "libc/nexgen32e/x86feature.h" #include "libc/nt/console.h" #include "libc/nt/runtime.h" -#include "libc/rand/rand.h" +#include "libc/stdio/rand.h" #include "libc/runtime/buffer.h" #include "libc/runtime/gc.internal.h" #include "libc/runtime/runtime.h" diff --git a/tool/viz/viz.mk b/tool/viz/viz.mk index 2c7a98e06..1e7a8b993 100644 --- a/tool/viz/viz.mk +++ b/tool/viz/viz.mk @@ -31,7 +31,6 @@ TOOL_VIZ_DIRECTDEPS = \ LIBC_NT_GDI32 \ LIBC_NT_KERNEL32 \ LIBC_NT_USER32 \ - LIBC_RAND \ LIBC_RUNTIME \ LIBC_SOCK \ LIBC_STDIO \