From 3e01f8d47f8677c4faead6c08fbbfcf42810b1ba Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 5 Jun 2001 15:20:49 +0000 Subject: i need working random suite for ppp with dietlibc --- mdk-stage1/dietlibc/include/stdlib.h | 3 +++ mdk-stage1/dietlibc/lib/random.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mdk-stage1/dietlibc/include/stdlib.h b/mdk-stage1/dietlibc/include/stdlib.h index 1ec15e145..6a13a48ff 100644 --- a/mdk-stage1/dietlibc/include/stdlib.h +++ b/mdk-stage1/dietlibc/include/stdlib.h @@ -61,4 +61,7 @@ char *realpath(const char *path, char *resolved_path) __THROW; int abs(int j) __THROW; +long int random(void) __THROW; +void srandom(unsigned int seed) __THROW; + #endif diff --git a/mdk-stage1/dietlibc/lib/random.c b/mdk-stage1/dietlibc/lib/random.c index 02d1e1004..e7785c455 100644 --- a/mdk-stage1/dietlibc/lib/random.c +++ b/mdk-stage1/dietlibc/lib/random.c @@ -2,7 +2,7 @@ static unsigned int seed=1; -int random() { +long int random() { return ((seed = seed * 1103515245 + 12345) % ((unsigned int)RAND_MAX + 1)); } -- cgit v1.2.1