summaryrefslogtreecommitdiffstats
path: root/usr/klibc/srand48.c
blob: e1c95672f731355a091fb7ee5bc89a5b6917850b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * srand48.c
 */

#include <stdlib.h>
#include <stdint.h>

unsigned short __rand48_seed[3];	/* Common with mrand48.c, lrand48.c */

void srand48(long seedval)
{
	__rand48_seed[0] = 0x330e;
	__rand48_seed[1] = (unsigned short)seedval;
	__rand48_seed[2] = (unsigned short)((uint32_t) seedval >> 16);
}