Use more portable random seed generation.

The new function md_random_seed() has replaced time() + getpid() and
similar methods.  Putting everything in mdport.c slightly reduces the
warnings and workarounds.
This commit is contained in:
John "Elwin" Edwards 2017-01-28 15:49:41 -05:00
parent c194ec3dc9
commit 62047972cc
29 changed files with 123 additions and 81 deletions

View file

@ -65,9 +65,6 @@
#ifndef uid_t
typedef unsigned int uid_t;
#endif
#ifndef pid_t
typedef unsigned int pid_t;
#endif
#elif defined(__CYGWIN__)
#define HAVE_SYS_TYPES_H 1
@ -163,7 +160,6 @@ char * md_gethomedir(void);
char * md_getusername(void);
uid_t md_getuid(void);
char * md_getpass(char *prompt);
pid_t md_getpid(void);
char * md_getrealname(uid_t uid);
void md_init(int options);
int md_killchar(void);
@ -190,6 +186,7 @@ int md_loadav(double *avg);
void md_start_checkout_timer(int time);
void md_stop_checkout_timer(void);
long md_memused(void);
int md_ucount(void);
int md_unlockfile(FILE *fp);
int md_lockfile(FILE *fp);
int md_ucount(void);
int md_unlockfile(FILE *fp);
int md_lockfile(FILE *fp);
unsigned int md_random_seed(void);