chiark / gitweb /
[PATCH] added klibc version 0.82 (cvs tree) to the udev tree.
[elogind.git] / klibc / klibc / tests / testrand48.c
1 #include <stdlib.h>
2 #include <stdio.h>
3
4 int main(void)
5 {
6   unsigned short seed1[] = { 0x1234, 0x5678, 0x9abc };
7   unsigned short *oldseed;
8
9   oldseed = seed48(seed1);
10   printf("Initial seed: %#06x %#06x %#06x\n",
11          oldseed[0], oldseed[1], oldseed[2]);
12
13   printf("lrand48() = %ld\n", lrand48());
14
15   seed48(seed1);
16   printf("mrand48() = %ld\n", mrand48());
17
18   return 1;
19 }