Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 251:e7862a021609 | 252:3d4252fa2ed3 |
|---|---|
| 62 #define HAVE_PROCESS_H | 62 #define HAVE_PROCESS_H |
| 63 #define HAVE_ERASECHAR 1 | 63 #define HAVE_ERASECHAR 1 |
| 64 #define HAVE_KILLCHAR 1 | 64 #define HAVE_KILLCHAR 1 |
| 65 #ifndef uid_t | 65 #ifndef uid_t |
| 66 typedef unsigned int uid_t; | 66 typedef unsigned int uid_t; |
| 67 #endif | |
| 68 #ifndef pid_t | |
| 69 typedef unsigned int pid_t; | |
| 70 #endif | 67 #endif |
| 71 | 68 |
| 72 #elif defined(__CYGWIN__) | 69 #elif defined(__CYGWIN__) |
| 73 #define HAVE_SYS_TYPES_H 1 | 70 #define HAVE_SYS_TYPES_H 1 |
| 74 #define HAVE_PWD_H 1 | 71 #define HAVE_PWD_H 1 |
| 161 int md_erasechar(void); | 158 int md_erasechar(void); |
| 162 char * md_gethomedir(void); | 159 char * md_gethomedir(void); |
| 163 char * md_getusername(void); | 160 char * md_getusername(void); |
| 164 uid_t md_getuid(void); | 161 uid_t md_getuid(void); |
| 165 char * md_getpass(char *prompt); | 162 char * md_getpass(char *prompt); |
| 166 pid_t md_getpid(void); | |
| 167 char * md_getrealname(uid_t uid); | 163 char * md_getrealname(uid_t uid); |
| 168 void md_init(int options); | 164 void md_init(int options); |
| 169 int md_killchar(void); | 165 int md_killchar(void); |
| 170 void md_normaluser(void); | 166 void md_normaluser(void); |
| 171 void md_raw_standout(void); | 167 void md_raw_standout(void); |
| 191 void md_stop_checkout_timer(void); | 187 void md_stop_checkout_timer(void); |
| 192 long md_memused(void); | 188 long md_memused(void); |
| 193 int md_ucount(void); | 189 int md_ucount(void); |
| 194 int md_unlockfile(FILE *fp); | 190 int md_unlockfile(FILE *fp); |
| 195 int md_lockfile(FILE *fp); | 191 int md_lockfile(FILE *fp); |
| 192 unsigned int md_random_seed(void); |
