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:
@@ -297,7 +297,7 @@
|
||||
#endif
|
||||
|
||||
/* Use the high quality random number routines. */
|
||||
#if defined(BSD) || defined(ULTRIX) || defined(CYGWIN32) || defined(RANDOM) || defined(__APPLE__)
|
||||
#if defined(BSD) || defined(LINUX) || defined(ULTRIX) || defined(CYGWIN32) || defined(RANDOM) || defined(__APPLE__)
|
||||
#define Rand() random()
|
||||
#else
|
||||
#define Rand() lrand48()
|
||||
|
||||
Reference in New Issue
Block a user