every platform provides sys_random_seed() and SYS_RANDOM_SEED goes away

This commit is contained in:
nhmall
2019-01-17 18:30:56 -05:00
committed by Patric Mueller
parent 97b8d0a50b
commit 0a430cab11
11 changed files with 27 additions and 42 deletions

View File

@@ -519,4 +519,15 @@ unsigned setvalue;
return (regs.x.dx);
}
unsigned long
sys_random_seed(VOID_ARGS)
{
unsigned long ourseed = 0UL;
time_t datetime = 0;
(void) time(&datetime);
ourseed = (unsigned long) datetime;
return ourseed;
}
#endif /* MSDOS */

View File

@@ -765,7 +765,6 @@ error:
}
#endif
#ifdef SYS_RANDOM_SEED
unsigned long
sys_random_seed()
{
@@ -790,6 +789,5 @@ sys_random_seed()
#endif
return seed;
}
#endif /* SYS_RANDOM_SEED */
/*unixmain.c*/

View File

@@ -465,7 +465,6 @@ wd_message()
You("are in non-scoring explore/discovery mode.");
}
#ifdef SYS_RANDOM_SEED
unsigned long
sys_random_seed()
{
@@ -481,6 +480,5 @@ sys_random_seed()
}
return seed;
}
#endif
/*vmsmain.c*/

View File

@@ -73,8 +73,8 @@ DEBUGINFO = Y
# PDCurses header (.h) files and PDCURSES_C to the location
# of your PDCurses C files.
#
ADD_CURSES=Y
PDCURSES_TOP=..\..\pdcurses
#ADD_CURSES=Y
#PDCURSES_TOP=..\..\pdcurses
#
#==============================================================================
# This marks the end of the BUILD DECISIONS section.

View File

@@ -681,7 +681,8 @@ char *name;
return;
}
#ifdef SYS_RANDOM_SEED
#include <bcrypt.h> /* Windows Crypto Next Gen (CNG) */
#ifndef STATUS_SUCCESS
#define STATUS_SUCCESS 0
#endif
@@ -692,8 +693,6 @@ char *name;
#define STATUS_UNSUCCESSFUL 0xC0000001
#endif
#include <bcrypt.h> /* Windows Crypto Next Gen (CNG) */
unsigned long
sys_random_seed(VOID_ARGS)
{
@@ -727,7 +726,6 @@ sys_random_seed(VOID_ARGS)
}
return ourseed;
}
#endif /* SYS_RANDOM_SEED */
#endif /* WIN32 */