random numbers on linux
Switch the default Linux build behavior to use random instead of lrand48, since lrand48 exhibits some obviously non-random behavior. random() has been in glibc for a long time. Even if no other changes are made to nethack's random number generator, this will improve the Linux behavior.
This commit is contained in:
@@ -466,7 +466,7 @@ setrandom()
|
||||
#ifdef RANDOM /* srandom() from sys/share/random.c */
|
||||
srandom((unsigned int) time((time_t *)0));
|
||||
#else
|
||||
# if defined(__APPLE__) || defined(BSD) || defined(ULTRIX) || defined(CYGWIN32) /* system srandom() */
|
||||
# if defined(__APPLE__) || defined(BSD) || defined(LINUX) || defined(ULTRIX) || defined(CYGWIN32) /* system srandom() */
|
||||
# ifdef BSD
|
||||
# if defined(SUNOS4)
|
||||
(void)
|
||||
|
||||
Reference in New Issue
Block a user