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

@ -44,9 +44,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
#define HAVE_PWD_H 1
@ -145,7 +142,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(void);
int md_killchar(void);
@ -168,5 +164,6 @@ void md_onsignal_autosave(void);
void md_onsignal_exit(void);
void md_onsignal_default(void);
int md_issymlink(char *sp);
unsigned int md_random_seed(void);
extern char *xcrypt(const char *key, const char *setting);