some system-specific adjustments for RNG routines

move some system-specific seed-related stuff from hacklib.c to
a system-specific source file and #define SYS_RANDOM_SEED to
utilize it during build.

Windows changes for random seed generation using
crypto next gen (CNG) api routines.

Corresponding vms changes due to disentangling of VMS and
unix when the unix seed bits got moved (untested).
This commit is contained in:
nhmall
2019-01-13 20:54:11 -05:00
committed by Patric Mueller
parent f9433b2a87
commit 6c114640f5
11 changed files with 161 additions and 58 deletions

View File

@@ -7,7 +7,9 @@
/* #define SHELL */ /* nt use of pcsys routines caused a hang */
#define RANDOM /* have Berkeley random(3) */
/* #define RANDOM */ /* have Berkeley random(3) */
#define USE_ISAAC64
#define TEXTCOLOR /* Color text */
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
@@ -25,8 +27,7 @@
game */
#define SYSCF /* Use a global configuration */
#define SYSCF_FILE "sysconf" /* Use a file to hold the SYSCF configuration \
*/
#define SYSCF_FILE "sysconf" /* Use a file to hold the SYSCF configuration */
#define DUMPLOG /* Enable dumplog files */
/*#define DUMPLOG_FILE "nethack-%n-%d.log"*/
@@ -35,9 +36,9 @@
#define USER_SOUNDS
/*#define CHANGE_COLOR*/ /* allow palette changes */
#define SELECTSAVED /* Provide menu of saved games to choose from at start \
*/
#define SELECTSAVED /* Provide menu of saved games to choose from at start */
#define SYS_RANDOM_SEED /* Use random seed derived from CNG */
/*
* -----------------------------------------------------------------
* The remaining code shouldn't need modification.
@@ -131,6 +132,7 @@ extern void FDECL(interject, (int));
/* suppress a warning in cppregex.cpp */
#pragma warning(disable : 4101) /* unreferenced local variable */
#endif
#define HAS_STDINT_H /* force include of stdint.h in integer.h */
#endif /* _MSC_VER */
/* The following is needed for prototypes of certain functions */