diff options
Diffstat (limited to 'usr/klibc/lrand48.c')
-rw-r--r-- | usr/klibc/lrand48.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/klibc/lrand48.c b/usr/klibc/lrand48.c new file mode 100644 index 0000000..7dfcf92 --- /dev/null +++ b/usr/klibc/lrand48.c @@ -0,0 +1,13 @@ +/* + * lrand48.c + */ + +#include <stdlib.h> +#include <stdint.h> + +unsigned short __rand48_seed[3]; /* Common with mrand48.c, srand48.c */ + +long lrand48(void) +{ + return (uint32_t) jrand48(__rand48_seed) >> 1; +} |