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

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

extern unsigned short __rand48_seed[3];


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