diff options
Diffstat (limited to 'libc-top-half/musl/src/prng/lrand48.c')
-rw-r--r-- | libc-top-half/musl/src/prng/lrand48.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/prng/lrand48.c b/libc-top-half/musl/src/prng/lrand48.c new file mode 100644 index 0000000..07e2b78 --- /dev/null +++ b/libc-top-half/musl/src/prng/lrand48.c @@ -0,0 +1,13 @@ +#include <stdlib.h> +#include <inttypes.h> +#include "rand48.h" + +long nrand48(unsigned short s[3]) +{ + return __rand48_step(s, __seed48+3) >> 17; +} + +long lrand48(void) +{ + return nrand48(__seed48); +} |