diff rogue3/mdport.h @ 252:3d4252fa2ed3

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.
author John "Elwin" Edwards
date Sat, 28 Jan 2017 15:49:41 -0500
parents 12e070d1a780
children 5b6855d5d089
line wrap: on
line diff
--- a/rogue3/mdport.h	Sat Jan 28 11:45:36 2017 -0500
+++ b/rogue3/mdport.h	Sat Jan 28 15:49:41 2017 -0500
@@ -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_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 @@
 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);