Fold LIBC_RAND into LIBC_STDIO/TINYMATH/INTRIN

This commit is contained in:
Justine Tunney 2022-08-11 12:26:30 -07:00
parent 05b8f82371
commit 8a0a2c0c36
183 changed files with 149 additions and 322 deletions

View file

@ -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 \

View file

@ -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"

View file

@ -56,7 +56,6 @@ EXAMPLES_DIRECTDEPS = \
LIBC_NT_USER32 \
LIBC_NT_WS2_32 \
LIBC_NT_ADVAPI32 \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \

View file

@ -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"

View file

@ -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"
/**

View file

@ -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"

View file

@ -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"

View file

@ -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.

View file

@ -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"

View file

@ -29,7 +29,6 @@ LIBC_DNS_A_DIRECTDEPS = \
LIBC_FMT \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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_ */

View file

@ -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 \

View file

@ -33,7 +33,6 @@ LIBC_MEM_A_DIRECTDEPS = \
LIBC_FMT \
LIBC_INTRIN \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STR \
LIBC_STUBS \

View file

@ -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
View 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)

View file

@ -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"

View file

@ -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) {

View file

@ -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"
/**

View file

@ -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"

View file

@ -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;

View file

@ -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.

View file

@ -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"

View file

@ -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"

View file

@ -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\

View file

@ -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.

0
libc/stdio/rand.mk Executable file
View file

View file

@ -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\

View file

@ -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");

View file

@ -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) {

View file

@ -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"

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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"
/**

View file

@ -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;

View file

@ -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))

View file

@ -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"
/**

View file

@ -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"

View file

@ -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;

View file

@ -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];

View file

@ -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];

View file

@ -101,7 +101,6 @@ LIBC_TESTLIB_A_DIRECTDEPS = \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_NT_KERNEL32 \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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"
/**

View file

@ -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"

View file

@ -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) {

View file

@ -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) {

View file

@ -27,7 +27,6 @@ NET_HTTPS_A_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -25,7 +25,6 @@ TEST_DSP_CORE_DIRECTDEPS = \
LIBC_TINYMATH \
LIBC_LOG \
LIBC_RUNTIME \
LIBC_RAND \
LIBC_TESTLIB \
TOOL_VIZ_LIB \
THIRD_PARTY_BLAS \

View file

@ -27,7 +27,6 @@ TEST_DSP_SCALE_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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 \

View file

@ -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"

View file

@ -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"

View file

@ -28,7 +28,6 @@ TEST_LIBC_ALG_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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) {

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -37,7 +37,6 @@ TEST_LIBC_CALLS_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_STDIO \
LIBC_SYSV_CALLS \
LIBC_RUNTIME \

View file

@ -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"

View file

@ -33,7 +33,6 @@ TEST_LIBC_DNS_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \
LIBC_RAND \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \

View file

@ -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) {

View file

@ -24,7 +24,6 @@ TEST_LIBC_FMT_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -29,7 +29,6 @@ TEST_LIBC_INTRIN_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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"

View file

@ -35,7 +35,6 @@ TEST_LIBC_MEM_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \

View file

@ -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"

View file

@ -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"

View file

@ -32,7 +32,6 @@ TEST_LIBC_NEXGEN32E_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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)

View file

@ -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"

View file

@ -30,7 +30,6 @@ TEST_LIBC_RUNTIME_DIRECTDEPS = \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RAND \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

Some files were not shown because too many files have changed in this diff Show more