mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Fold LIBC_RAND into LIBC_STDIO/TINYMATH/INTRIN
This commit is contained in:
parent
05b8f82371
commit
8a0a2c0c36
183 changed files with 149 additions and 322 deletions
4
Makefile
4
Makefile
|
@ -119,7 +119,6 @@ include libc/fmt/fmt.mk #─┘
|
||||||
include libc/calls/calls.mk #─┐
|
include libc/calls/calls.mk #─┐
|
||||||
include libc/runtime/runtime.mk # ├──SYSTEMS RUNTIME
|
include libc/runtime/runtime.mk # ├──SYSTEMS RUNTIME
|
||||||
include libc/crt/crt.mk # │ You can issue system calls
|
include libc/crt/crt.mk # │ You can issue system calls
|
||||||
include libc/rand/rand.mk # │
|
|
||||||
include libc/unicode/unicode.mk # │
|
include libc/unicode/unicode.mk # │
|
||||||
include third_party/dlmalloc/dlmalloc.mk #─┘
|
include third_party/dlmalloc/dlmalloc.mk #─┘
|
||||||
include libc/mem/mem.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/xed/test.mk
|
||||||
include test/libc/fmt/test.mk
|
include test/libc/fmt/test.mk
|
||||||
include test/libc/dns/test.mk
|
include test/libc/dns/test.mk
|
||||||
include test/libc/rand/test.mk
|
|
||||||
include test/libc/time/test.mk
|
include test/libc/time/test.mk
|
||||||
include test/libc/stdio/test.mk
|
include test/libc/stdio/test.mk
|
||||||
include test/libc/release/test.mk
|
include test/libc/release/test.mk
|
||||||
|
@ -302,7 +300,6 @@ COSMOPOLITAN_OBJECTS = \
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_ELF \
|
LIBC_ELF \
|
||||||
LIBC_CALLS \
|
LIBC_CALLS \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_SYSV_CALLS \
|
LIBC_SYSV_CALLS \
|
||||||
LIBC_NT_PSAPI \
|
LIBC_NT_PSAPI \
|
||||||
LIBC_NT_POWRPROF \
|
LIBC_NT_POWRPROF \
|
||||||
|
@ -337,7 +334,6 @@ COSMOPOLITAN_HEADERS = \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_NT \
|
LIBC_NT \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_SOCK \
|
LIBC_SOCK \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/log/log.h"
|
#include "libc/log/log.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/gc.h"
|
#include "libc/runtime/gc.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/sock/goodsocket.internal.h"
|
#include "libc/sock/goodsocket.internal.h"
|
||||||
|
|
|
@ -56,7 +56,6 @@ EXAMPLES_DIRECTDEPS = \
|
||||||
LIBC_NT_USER32 \
|
LIBC_NT_USER32 \
|
||||||
LIBC_NT_WS2_32 \
|
LIBC_NT_WS2_32 \
|
||||||
LIBC_NT_ADVAPI32 \
|
LIBC_NT_ADVAPI32 \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_SOCK \
|
LIBC_SOCK \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/log/log.h"
|
#include "libc/log/log.h"
|
||||||
#include "libc/nt/nt/process.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/gc.h"
|
||||||
#include "libc/runtime/memtrack.internal.h"
|
#include "libc/runtime/memtrack.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────*/
|
||||||
#endif
|
#endif
|
||||||
#include "libc/log/gdb.h"
|
#include "libc/log/gdb.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/nt/runtime.h"
|
#include "libc/nt/runtime.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/rand/xorshift.h"
|
#include "libc/stdio/xorshift.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/sysv/consts/ex.h"
|
#include "libc/sysv/consts/ex.h"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
*/
|
*/
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/struct/stat.h"
|
#include "libc/calls/struct/stat.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/intrin/spinlock.h"
|
#include "libc/intrin/spinlock.h"
|
||||||
#include "libc/nexgen32e/threaded.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.
|
* Returns handles of windows pids being tracked.
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "libc/nt/struct/filetime.h"
|
#include "libc/nt/struct/filetime.h"
|
||||||
#include "libc/nt/struct/processmemorycounters.h"
|
#include "libc/nt/struct/processmemorycounters.h"
|
||||||
#include "libc/nt/synchronization.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/ezmap.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -29,7 +29,6 @@ LIBC_DNS_A_DIRECTDEPS = \
|
||||||
LIBC_FMT \
|
LIBC_FMT \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_SOCK \
|
LIBC_SOCK \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "libc/dns/dnsquestion.h"
|
#include "libc/dns/dnsquestion.h"
|
||||||
#include "libc/dns/resolvconf.h"
|
#include "libc/dns/resolvconf.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/sock/internal.h"
|
#include "libc/sock/internal.h"
|
||||||
#include "libc/sock/sock.h"
|
#include "libc/sock/sock.h"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include "libc/dns/dnsquestion.h"
|
#include "libc/dns/dnsquestion.h"
|
||||||
#include "libc/dns/resolvconf.h"
|
#include "libc/dns/resolvconf.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/sock/sock.h"
|
#include "libc/sock/sock.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "libc/alg/alg.h"
|
#include "libc/alg/alg.h"
|
||||||
#include "libc/fmt/conv.h"
|
#include "libc/fmt/conv.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/temp.h"
|
#include "libc/stdio/temp.h"
|
||||||
#include "libc/sysv/consts/exit.h"
|
#include "libc/sysv/consts/exit.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_RANDOM_H_
|
#ifndef COSMOPOLITAN_LIBC_ISYSTEM_SYS_RANDOM_H_
|
||||||
#define 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"
|
#include "libc/sysv/consts/grnd.h"
|
||||||
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_RANDOM_H_ */
|
#endif /* COSMOPOLITAN_LIBC_ISYSTEM_SYS_RANDOM_H_ */
|
||||||
|
|
|
@ -26,7 +26,6 @@ LIBC_LOG_A_CHECKS = \
|
||||||
$(LIBC_LOG_A_HDRS:%=o/$(MODE)/%.ok)
|
$(LIBC_LOG_A_HDRS:%=o/$(MODE)/%.ok)
|
||||||
|
|
||||||
LIBC_LOG_A_DIRECTDEPS = \
|
LIBC_LOG_A_DIRECTDEPS = \
|
||||||
LIBC_ALG \
|
|
||||||
LIBC_CALLS \
|
LIBC_CALLS \
|
||||||
LIBC_ELF \
|
LIBC_ELF \
|
||||||
LIBC_FMT \
|
LIBC_FMT \
|
||||||
|
@ -35,7 +34,6 @@ LIBC_LOG_A_DIRECTDEPS = \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_NT_KERNEL32 \
|
LIBC_NT_KERNEL32 \
|
||||||
LIBC_NT_NTDLL \
|
LIBC_NT_NTDLL \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -33,7 +33,6 @@ LIBC_MEM_A_DIRECTDEPS = \
|
||||||
LIBC_FMT \
|
LIBC_FMT \
|
||||||
LIBC_INTRIN \
|
LIBC_INTRIN \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
LIBC_STUBS \
|
LIBC_STUBS \
|
||||||
|
|
|
@ -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_ */
|
|
60
libc/rand/rand.mk
Normal file → Executable file
60
libc/rand/rand.mk
Normal file → Executable file
|
@ -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)
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include "libc/nt/process.h"
|
#include "libc/nt/process.h"
|
||||||
#include "libc/nt/runtime.h"
|
#include "libc/nt/runtime.h"
|
||||||
#include "libc/nt/struct/processmemorycounters.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/directmap.internal.h"
|
||||||
#include "libc/runtime/internal.h"
|
#include "libc/runtime/internal.h"
|
||||||
#include "libc/runtime/memtrack.internal.h"
|
#include "libc/runtime/memtrack.internal.h"
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/internal.h"
|
#include "libc/stdio/internal.h"
|
||||||
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/sysv/consts/o.h"
|
#include "libc/sysv/consts/o.h"
|
||||||
|
|
||||||
int __fflush_impl(FILE *f) {
|
int __fflush_impl(FILE *f) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/sysv/consts/grnd.h"
|
#include "libc/sysv/consts/grnd.h"
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -16,7 +16,6 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/intrin/bits.h"
|
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/strace.internal.h"
|
#include "libc/calls/strace.internal.h"
|
||||||
#include "libc/calls/struct/sigaction.h"
|
#include "libc/calls/struct/sigaction.h"
|
||||||
|
@ -25,15 +24,16 @@
|
||||||
#include "libc/calls/syscall_support-nt.internal.h"
|
#include "libc/calls/syscall_support-nt.internal.h"
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
|
#include "libc/intrin/bits.h"
|
||||||
#include "libc/nexgen32e/kcpuids.h"
|
#include "libc/nexgen32e/kcpuids.h"
|
||||||
#include "libc/nexgen32e/rdtsc.h"
|
#include "libc/nexgen32e/rdtsc.h"
|
||||||
#include "libc/nexgen32e/vendor.internal.h"
|
#include "libc/nexgen32e/vendor.internal.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/nexgen32e/x86info.h"
|
#include "libc/nexgen32e/x86info.h"
|
||||||
#include "libc/nt/runtime.h"
|
#include "libc/nt/runtime.h"
|
||||||
#include "libc/rand/rand.h"
|
|
||||||
#include "libc/rand/xorshift.h"
|
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
|
#include "libc/stdio/rand.h"
|
||||||
|
#include "libc/stdio/xorshift.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/sysv/consts/at.h"
|
#include "libc/sysv/consts/at.h"
|
||||||
#include "libc/sysv/consts/auxv.h"
|
#include "libc/sysv/consts/auxv.h"
|
|
@ -11,6 +11,8 @@ extern char g_stdinbuf[BUFSIZ];
|
||||||
extern char g_stdoutbuf[BUFSIZ];
|
extern char g_stdoutbuf[BUFSIZ];
|
||||||
extern char g_stderrbuf[BUFSIZ];
|
extern char g_stderrbuf[BUFSIZ];
|
||||||
|
|
||||||
|
hidden extern uint64_t g_rando;
|
||||||
|
|
||||||
int __fflush_impl(FILE *) hidden;
|
int __fflush_impl(FILE *) hidden;
|
||||||
int __fflush_register(FILE *) hidden;
|
int __fflush_register(FILE *) hidden;
|
||||||
void __fflush_unregister(FILE *) hidden;
|
void __fflush_unregister(FILE *) hidden;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns linear congruential deterministic pseudorandom data, e.g.
|
* Returns linear congruential deterministic pseudorandom data, e.g.
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/stdio/temp.h"
|
#include "libc/stdio/temp.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/sysv/errfuns.h"
|
#include "libc/sysv/errfuns.h"
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/strace.internal.h"
|
#include "libc/calls/strace.internal.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/rand/lcg.internal.h"
|
#include "libc/stdio/lcg.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/temp.h"
|
#include "libc/stdio/temp.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/intrin/likely.h"
|
#include "libc/intrin/likely.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
asm(".ident\t\"\\n\\n\
|
asm(".ident\t\"\\n\\n\
|
||||||
mt19937 (BSD-3)\\n\
|
mt19937 (BSD-3)\\n\
|
|
@ -16,9 +16,9 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/internal.h"
|
#include "libc/stdio/internal.h"
|
||||||
#include "libc/rand/lcg.internal.h"
|
#include "libc/stdio/lcg.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns 31-bit linear congruential pseudorandom number, e.g.
|
* Returns 31-bit linear congruential pseudorandom number, e.g.
|
0
libc/stdio/rand.mk
Executable file
0
libc/stdio/rand.mk
Executable file
|
@ -25,7 +25,7 @@
|
||||||
│ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │
|
│ 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\
|
asm(".ident\t\"\\n\\n\
|
||||||
Musl libc (MIT License)\\n\
|
Musl libc (MIT License)\\n\
|
|
@ -19,7 +19,7 @@
|
||||||
#include "libc/intrin/asmflag.h"
|
#include "libc/intrin/asmflag.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/sysv/consts/grnd.h"
|
#include "libc/sysv/consts/grnd.h"
|
||||||
|
|
||||||
STATIC_YOINK("rdrand_init");
|
STATIC_YOINK("rdrand_init");
|
|
@ -20,7 +20,7 @@
|
||||||
#include "libc/nexgen32e/vendor.internal.h"
|
#include "libc/nexgen32e/vendor.internal.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/nexgen32e/x86info.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,
|
textstartup void rdrand_init(int argc, char **argv, char **envp,
|
||||||
intptr_t *auxv) {
|
intptr_t *auxv) {
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/intrin/asmflag.h"
|
#include "libc/intrin/asmflag.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/sysv/consts/grnd.h"
|
#include "libc/sysv/consts/grnd.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates number on [0,1]-real-interval, e.g.
|
* Generates number on [0,1]-real-interval, e.g.
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates number on [0,1)-real-interval, e.g.
|
* Generates number on [0,1)-real-interval, e.g.
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates number on (0,1)-real-interval, e.g.
|
* Generates number on (0,1)-real-interval, e.g.
|
|
@ -19,7 +19,7 @@
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/intrin/asan.internal.h"
|
#include "libc/intrin/asan.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
extern uint64_t g_rando;
|
extern uint64_t g_rando;
|
||||||
|
|
|
@ -29,8 +29,8 @@ LIBC_STDIO_A_DIRECTDEPS = \
|
||||||
LIBC_INTRIN \
|
LIBC_INTRIN \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
|
LIBC_NT_ADVAPI32 \
|
||||||
LIBC_NT_KERNEL32 \
|
LIBC_NT_KERNEL32 \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
LIBC_STUBS \
|
LIBC_STUBS \
|
||||||
|
@ -57,6 +57,10 @@ o//libc/stdio/appendw.o: private \
|
||||||
OVERRIDE_CFLAGS += \
|
OVERRIDE_CFLAGS += \
|
||||||
-Os
|
-Os
|
||||||
|
|
||||||
|
o/$(MODE)/libc/stdio/mt19937.o: private \
|
||||||
|
OVERRIDE_CFLAGS += \
|
||||||
|
-ffunction-sections
|
||||||
|
|
||||||
LIBC_STDIO_LIBS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)))
|
LIBC_STDIO_LIBS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)))
|
||||||
LIBC_STDIO_SRCS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)_SRCS))
|
LIBC_STDIO_SRCS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)_SRCS))
|
||||||
LIBC_STDIO_HDRS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)_HDRS))
|
LIBC_STDIO_HDRS = $(foreach x,$(LIBC_STDIO_ARTIFACTS),$($(x)_HDRS))
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/alg/shuffle.internal.h"
|
#include "libc/alg/shuffle.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/temp.h"
|
#include "libc/stdio/temp.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
|
|
||||||
static uint64_t g_vigna;
|
static uint64_t g_vigna;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/xorshift.h"
|
#include "libc/stdio/xorshift.h"
|
||||||
|
|
||||||
uint32_t MarsagliaXorshift32(uint32_t state[hasatleast 1]) {
|
uint32_t MarsagliaXorshift32(uint32_t state[hasatleast 1]) {
|
||||||
uint32_t x = state[0];
|
uint32_t x = state[0];
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/xorshift.h"
|
#include "libc/stdio/xorshift.h"
|
||||||
|
|
||||||
uint64_t MarsagliaXorshift64(uint64_t state[hasatleast 1]) {
|
uint64_t MarsagliaXorshift64(uint64_t state[hasatleast 1]) {
|
||||||
uint64_t x = state[0];
|
uint64_t x = state[0];
|
|
@ -101,7 +101,6 @@ LIBC_TESTLIB_A_DIRECTDEPS = \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_NT_KERNEL32 \
|
LIBC_NT_KERNEL32 \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/math.h"
|
#include "libc/math.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "net/https/https.h"
|
#include "net/https/https.h"
|
||||||
#include "third_party/mbedtls/bignum.h"
|
#include "third_party/mbedtls/bignum.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "net/https/https.h"
|
#include "net/https/https.h"
|
||||||
|
|
||||||
int GenerateHardRandom(void *ctx, unsigned char *p, size_t n) {
|
int GenerateHardRandom(void *ctx, unsigned char *p, size_t n) {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "net/https/https.h"
|
#include "net/https/https.h"
|
||||||
|
|
||||||
int GetEntropy(void *c, unsigned char *p, size_t n) {
|
int GetEntropy(void *c, unsigned char *p, size_t n) {
|
||||||
|
|
|
@ -27,7 +27,6 @@ NET_HTTPS_A_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "net/https/https.h"
|
#include "net/https/https.h"
|
||||||
#include "third_party/mbedtls/ctr_drbg.h"
|
#include "third_party/mbedtls/ctr_drbg.h"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "libc/assert.h"
|
#include "libc/assert.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/math.h"
|
#include "libc/math.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "libc/limits.h"
|
#include "libc/limits.h"
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/buffer.h"
|
#include "libc/runtime/buffer.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/buffer.h"
|
#include "libc/runtime/buffer.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
|
@ -25,7 +25,6 @@ TEST_DSP_CORE_DIRECTDEPS = \
|
||||||
LIBC_TINYMATH \
|
LIBC_TINYMATH \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_TESTLIB \
|
LIBC_TESTLIB \
|
||||||
TOOL_VIZ_LIB \
|
TOOL_VIZ_LIB \
|
||||||
THIRD_PARTY_BLAS \
|
THIRD_PARTY_BLAS \
|
||||||
|
|
|
@ -27,7 +27,6 @@ TEST_DSP_SCALE_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -25,8 +25,8 @@ TEST_DSP_TTY_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
LIBC_STUBS \
|
LIBC_STUBS \
|
||||||
LIBC_TINYMATH \
|
LIBC_TINYMATH \
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "dsp/tty/tty.h"
|
#include "dsp/tty/tty.h"
|
||||||
#include "libc/intrin/bits.h"
|
#include "libc/intrin/bits.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/nexgen32e/nexgen32e.h"
|
#include "libc/nexgen32e/nexgen32e.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/gc.internal.h"
|
#include "libc/runtime/gc.internal.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@ TEST_LIBC_ALG_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/calls/struct/timespec.h"
|
#include "libc/calls/struct/timespec.h"
|
||||||
#include "libc/intrin/kprintf.h"
|
#include "libc/intrin/kprintf.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
||||||
TEST(_timespec_gte, test) {
|
TEST(_timespec_gte, test) {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "libc/intrin/wait0.internal.h"
|
#include "libc/intrin/wait0.internal.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/nexgen32e/threaded.h"
|
#include "libc/nexgen32e/threaded.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/internal.h"
|
#include "libc/runtime/internal.h"
|
||||||
#include "libc/runtime/stack.h"
|
#include "libc/runtime/stack.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/math.h"
|
#include "libc/math.h"
|
||||||
#include "libc/mem/mem.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/directmap.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/fmt/fmt.h"
|
#include "libc/fmt/fmt.h"
|
||||||
#include "libc/fmt/itoa.h"
|
#include "libc/fmt/itoa.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/sysv/consts/at.h"
|
#include "libc/sysv/consts/at.h"
|
||||||
#include "libc/sysv/consts/s.h"
|
#include "libc/sysv/consts/s.h"
|
||||||
|
|
|
@ -37,7 +37,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_SYSV_CALLS \
|
LIBC_SYSV_CALLS \
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "libc/dns/dns.h"
|
#include "libc/dns/dns.h"
|
||||||
#include "libc/dns/dnsheader.h"
|
#include "libc/dns/dnsheader.h"
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -33,7 +33,6 @@ TEST_LIBC_DNS_DIRECTDEPS = \
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_SOCK \
|
LIBC_SOCK \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
LIBC_STUBS \
|
LIBC_STUBS \
|
||||||
LIBC_SYSV \
|
LIBC_SYSV \
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/fmt/fmt.h"
|
#include "libc/fmt/fmt.h"
|
||||||
#include "libc/fmt/nf32.h"
|
#include "libc/fmt/nf32.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
||||||
TEST(EncodeNf32, test) {
|
TEST(EncodeNf32, test) {
|
||||||
|
|
|
@ -24,7 +24,6 @@ TEST_LIBC_FMT_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -102,8 +102,8 @@
|
||||||
#include "libc/limits.h"
|
#include "libc/limits.h"
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/nexgen32e/kcpuids.h"
|
#include "libc/nexgen32e/kcpuids.h"
|
||||||
#include "libc/rand/lcg.internal.h"
|
#include "libc/stdio/lcg.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/gc.internal.h"
|
#include "libc/runtime/gc.internal.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "libc/limits.h"
|
#include "libc/limits.h"
|
||||||
#include "libc/log/libfatal.internal.h"
|
#include "libc/log/libfatal.internal.h"
|
||||||
#include "libc/macros.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/memtrack.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/runtime/symbols.internal.h"
|
#include "libc/runtime/symbols.internal.h"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/nexgen32e/nexgen32e.h"
|
#include "libc/nexgen32e/nexgen32e.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/gc.internal.h"
|
#include "libc/runtime/gc.internal.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/intrin/asan.internal.h"
|
#include "libc/intrin/asan.internal.h"
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/intrin/palignr.h"
|
#include "libc/intrin/palignr.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "libc/intrin/pshufd.h"
|
#include "libc/intrin/pshufd.h"
|
||||||
#include "libc/intrin/pshufhw.h"
|
#include "libc/intrin/pshufhw.h"
|
||||||
#include "libc/intrin/pshuflw.h"
|
#include "libc/intrin/pshuflw.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/nexgen32e/threaded.h"
|
#include "libc/nexgen32e/threaded.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/internal.h"
|
#include "libc/runtime/internal.h"
|
||||||
#include "libc/runtime/stack.h"
|
#include "libc/runtime/stack.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
|
@ -20,7 +20,7 @@
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/nexgen32e/bsr.h"
|
#include "libc/nexgen32e/bsr.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
|
|
|
@ -29,7 +29,6 @@ TEST_LIBC_INTRIN_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "libc/intrin/kprintf.h"
|
#include "libc/intrin/kprintf.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/runtime/memtrack.internal.h"
|
#include "libc/runtime/memtrack.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
|
|
|
@ -35,7 +35,6 @@ TEST_LIBC_MEM_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_SOCK \
|
LIBC_SOCK \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "libc/intrin/bits.h"
|
#include "libc/intrin/bits.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/mem/mem.h"
|
#include "libc/mem/mem.h"
|
||||||
#include "libc/nexgen32e/nexgen32e.h"
|
#include "libc/nexgen32e/nexgen32e.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/gc.internal.h"
|
#include "libc/runtime/gc.internal.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/testlib/ezbench.h"
|
#include "libc/testlib/ezbench.h"
|
||||||
|
|
|
@ -32,7 +32,6 @@ TEST_LIBC_NEXGEN32E_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -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)
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "libc/linux/munmap.h"
|
#include "libc/linux/munmap.h"
|
||||||
#include "libc/log/log.h"
|
#include "libc/log/log.h"
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/runtime/memtrack.internal.h"
|
#include "libc/runtime/memtrack.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
|
|
|
@ -30,7 +30,6 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \
|
||||||
LIBC_LOG \
|
LIBC_LOG \
|
||||||
LIBC_MEM \
|
LIBC_MEM \
|
||||||
LIBC_NEXGEN32E \
|
LIBC_NEXGEN32E \
|
||||||
LIBC_RAND \
|
|
||||||
LIBC_RUNTIME \
|
LIBC_RUNTIME \
|
||||||
LIBC_STDIO \
|
LIBC_STDIO \
|
||||||
LIBC_STR \
|
LIBC_STR \
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
|
@ -20,7 +20,7 @@
|
||||||
#include "libc/calls/struct/dirent.h"
|
#include "libc/calls/struct/dirent.h"
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/gc.internal.h"
|
#include "libc/runtime/gc.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "libc/dce.h"
|
#include "libc/dce.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/math.h"
|
#include "libc/math.h"
|
||||||
#include "libc/nexgen32e/x86feature.h"
|
#include "libc/nexgen32e/x86feature.h"
|
||||||
#include "libc/rand/lcg.internal.h"
|
#include "libc/stdio/lcg.internal.h"
|
||||||
#include "libc/rand/rand.h"
|
#include "libc/stdio/rand.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/sysv/consts/grnd.h"
|
#include "libc/sysv/consts/grnd.h"
|
|
@ -21,7 +21,7 @@
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
#include "libc/mem/mem.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/gc.internal.h"
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue