Fix miscellaneous update-game-score bugs.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Jan 2014 19:02:41 +0000 (11:02 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Jan 2014 19:02:41 +0000 (11:02 -0800)
commitdc217d0180ce964d4a4cb9abf505c7654eab658d
treee99c095a7f2079cc64b1608c0516679063b946f8
parentedace89f2670ed235d98c6d33f32d49228f423e3
Fix miscellaneous update-game-score bugs.

* configure.ac (difftime): Remove.
* lib/update-game-score.c (difftime) [!HAVE_DIFFTIME]: Remove.
(read_score) [HAVE_GETDELIM]: Don't access uninitialized storage.
(read_scores, write_scores): Check for fclose failure.
(write_scores): Use fchmod, not chmod, to avoid a race.
(lock_file): Fix test for out-of-date lock file; it was reversed.
Use ordinary subtraction rather than difftime; since we're already
assuming POSIX we don't need to worry about the possibility of
time_t being a magic cookie.
ChangeLog
configure.ac
lib-src/ChangeLog
lib-src/update-game-score.c