Mercurial > hg > early-roguelike
comparison rogue4/mach_dep.c @ 284:6376b514a30b
Fix more header-related warnings.
This fixes all current default warnings with GCC7 on Linux. That does
not mean the code is anywhere close to clean.
author | John "Elwin" Edwards |
---|---|
date | Fri, 22 Sep 2017 16:24:40 -0400 |
parents | d3968e9cb98d |
children |
comparison
equal
deleted
inserted
replaced
283:d71e5e1f49cf | 284:6376b514a30b |
---|---|
36 #include <signal.h> | 36 #include <signal.h> |
37 #include <sys/stat.h> | 37 #include <sys/stat.h> |
38 #include <fcntl.h> | 38 #include <fcntl.h> |
39 #include <string.h> | 39 #include <string.h> |
40 #include <errno.h> | 40 #include <errno.h> |
41 | |
42 #ifdef CHECKTIME | |
43 #include <unistd.h> | |
44 #endif | |
45 | |
41 #include "rogue.h" | 46 #include "rogue.h" |
42 | 47 |
43 int num_checks; /* times we've gone over in checkout() */ | 48 int num_checks; /* times we've gone over in checkout() */ |
44 | 49 |
45 #ifdef SCOREFILE | 50 #ifdef SCOREFILE |
264 else if (num_checks++ == 3) | 269 else if (num_checks++ == 3) |
265 fatal("Sorry. You took to long. You are dead\n"); | 270 fatal("Sorry. You took to long. You are dead\n"); |
266 | 271 |
267 #ifdef CHECKTIME | 272 #ifdef CHECKTIME |
268 checktime = (CHECKTIME * 60) / num_checks; | 273 checktime = (CHECKTIME * 60) / num_checks; |
269 #endif | |
270 #ifdef SIGALRM | 274 #ifdef SIGALRM |
271 alarm(checktime); | 275 alarm(checktime); |
276 #endif | |
272 #endif | 277 #endif |
273 | 278 |
274 chmsg(msgs[num_checks - 1], ((double) checktime / 60.0)); | 279 chmsg(msgs[num_checks - 1], ((double) checktime / 60.0)); |
275 } | 280 } |
276 else | 281 else |