define Rand() in isaac4 config

Rand() was typically defined to random() or to rand().

gcc seems to provide a random() to link to on linux
when sys/share/random.c is linked in, but other platforms
such as Windows got an undefined refence to random()
when RANDOM wasn't defined.

The only direct use seems to be in get_rnd_txt() these
days, in rumors.c

Under the USE_ISAAC64 config, neither srandom()
nor srand() are being invoked to seed those routines,
and it really should be using isaac64 when USE_ISAAC64
is defined anyway.
This commit is contained in:
nhmall
2019-01-14 20:36:50 -05:00
committed by Patric Mueller
parent 6c114640f5
commit 3f609bf9ad
6 changed files with 33 additions and 8 deletions

View File

@@ -236,12 +236,16 @@
#include <time.h>
#endif
/* the high quality random number routines */
#ifdef USE_ISAAC64
#define Rand() rn2(RAND_MAX)
#else
#ifdef RANDOM
/* Use the high quality random number routines. */
#define Rand() random()
#else
#define Rand() rand()
#endif
#endif
#ifndef TOS
#define FCMASK 0660 /* file creation mask */