summaryrefslogtreecommitdiff
path: root/lib-src/ntlib.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-08-05 20:09:28 +0300
committerEli Zaretskii <eliz@gnu.org>2013-08-05 20:09:28 +0300
commit98a428c15ad48f8579b00b68aae6a89b34238b12 (patch)
tree3324c8c97a80d790dd8931114e3e830f41b24001 /lib-src/ntlib.h
parent5c0e57feb7429f367ed402dbe4a0572a6528d0b5 (diff)
downloademacs-98a428c15ad48f8579b00b68aae6a89b34238b12.tar.gz
Fix bugs in update-game-score, on MS-Windows and elsewhere.
lib-src/update-game-score.c (read_score): Try reading a character before probing the stream for EOF. Initialize score->score to zero, before reading and accumulating the score. (read_scores): Fix logic that determines which value to return. Close the input stream when finished reading the scores (avoids failures in overwriting the file with a new one on MS-Windows, since a file that is open cannot be deleted). lib-src/ntlib.h (rename): Don't undefine. lib-src/ntlib.c (sys_rename): New function, needed for update-game-score.
Diffstat (limited to 'lib-src/ntlib.h')
-rw-r--r--lib-src/ntlib.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h
index c30958365ca..ab5f5ea3b89 100644
--- a/lib-src/ntlib.h
+++ b/lib-src/ntlib.h
@@ -69,7 +69,6 @@ int mkostemp (char * template, int flags);
#define pipe _pipe
#undef read
#define read _read
-#undef rename
#undef rmdir
#define rmdir _rmdir
#undef unlink