From: Eli Zaretskii Date: Wed, 22 Jan 2014 19:38:31 +0000 (+0200) Subject: Fix MS-Windows build in lib-src broken by last commit. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~291 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7a49c9d615d91efc1e65ef1d1367b1a5c076ac96;p=emacs.git 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. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 0d06a926bae..6f4f3cd86e3 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2014-01-22 Eli Zaretskii + + * update-game-score.c (write_scores) [WINDOWSNT]: Use chmod + instead of fchmod. + 2014-01-22 Paul Eggert Fix miscellaneous update-game-score bugs. diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index d9218ff67b7..ad591cca87a 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -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; }