From 22f8d864e2293964ed60e7a9b6b46a3a5fc430e9 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 27 Jan 2019 09:34:18 -0500 Subject: [PATCH] ntconf.h ensure Rand is always something order of preference: USE_ISAAC64 RANDOM C routine --- include/ntconf.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/ntconf.h b/include/ntconf.h index 62c68cc47..af41154c0 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -180,13 +180,16 @@ extern void FDECL(interject, (int)); #define USE_STDARG /* Use the high quality random number routines. */ -#ifndef USE_ISAAC64 -# define RANDOM -# ifdef RANDOM -# define Rand() random() -# else -# define Rand() rand() -# endif +#ifdef USE_ISAAC64 +#undef RANDOM +#else +#define RANDOM +#define Rand() random() +#endif + +/* Fall back to C's if nothing else, but this really isn't acceptable */ +#if !defined(USE_ISAAC64) && !defined(RANDOM) +#define Rand() rand() #endif #include