Freeciv-3.3
|
#include "fc_prehdrs.h"
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include "fcintl.h"
#include "log.h"
#include "randseed.h"
Go to the source code of this file.
Return a random 32-bit value to use as game seed, by whatever means the underlying system provides.
Definition at line 192 of file randseed.c.
Referenced by init_game_seed().
Read a 32-bit random value using BCryptGenRandom(), if available. (Windows) Return FALSE on error, otherwise return TRUE and store seed in *ret.
Definition at line 77 of file randseed.c.
Referenced by generate_game_seed().
Generate a 32-bit random-ish value from the current time, using clock_gettime(), if available. (POSIX-compatible systems.) Return FALSE on error, otherwise return TRUE and store seed in *ret.
Definition at line 148 of file randseed.c.
Referenced by generate_game_seed().
Read a 32-bit random value using getentropy(), if available. (Linux, FreeBSD, OpenBSD, macOS) Return FALSE on error, otherwise return TRUE and store seed in *ret.
Definition at line 52 of file randseed.c.
Referenced by generate_game_seed().
Generate a lousy 32-bit random-ish value from the current time. Return TRUE and store seed in *ret.
Definition at line 180 of file randseed.c.
Referenced by generate_game_seed().
Read a 32-bit random value using /dev/urandom, if available. (Most Unix-like systems) Return FALSE on error, otherwise return TRUE and store seed in *ret.
Definition at line 98 of file randseed.c.
Referenced by generate_game_seed().