2 #include <stdint.h> /* for uint16_t, uint32_t */
6 static uint32_t seed = 0;
10 extern uint16_t rrand()
12 /* Constants as recommended by POSIX.1-2001 (see man page rand(3)). */
13 seed = ((seed * 1103515245) + 12345) % 2147483647;
15 return (seed >> 16); /* Ignore less random least significant 16 bits. */
20 extern void rrand_seed(uint32_t new_seed)