Commit 7a49c9d6 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix MS-Windows build in lib-src broken by last commit.

 lib-src/update-game-score.c (write_scores) [WINDOWSNT]: Use chmod
 instead of fchmod.
parent e2a095b1
2014-01-22 Eli Zaretskii <eliz@gnu.org>
* update-game-score.c (write_scores) [WINDOWSNT]: Use chmod
instead of fchmod.
2014-01-22 Paul Eggert <eggert@cs.ucla.edu>
Fix miscellaneous update-game-score bugs.
......
......@@ -443,8 +443,10 @@ write_scores (const char *filename, const struct score_entry *scores,
fd = mkostemp (tempfile, 0);
if (fd < 0)
return -1;
#ifndef WINDOWSNT
if (fchmod (fd, 0644) != 0)
return -1;
#endif
f = fdopen (fd, "w");
if (! f)
return -1;
......@@ -457,6 +459,10 @@ write_scores (const char *filename, const struct score_entry *scores,
return -1;
if (rename (tempfile, filename) != 0)
return -1;
#ifdef WINDOWSNT
if (chmod (filename, 0644) < 0)
return -1;
#endif
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment