diff options
| author | Eli Zaretskii | 2014-01-22 21:38:31 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2014-01-22 21:38:31 +0200 |
| commit | 7a49c9d615d91efc1e65ef1d1367b1a5c076ac96 (patch) | |
| tree | da7083f2c92fc9900bfd4d3485b4704a53a84816 /lib-src | |
| parent | e2a095b16ffb909bf835516098bac8ae6f075992 (diff) | |
| download | emacs-7a49c9d615d91efc1e65ef1d1367b1a5c076ac96.tar.gz emacs-7a49c9d615d91efc1e65ef1d1367b1a5c076ac96.zip | |
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.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 5 | ||||
| -rw-r--r-- | lib-src/update-game-score.c | 6 |
2 files changed, 11 insertions, 0 deletions
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 @@ | |||
| 1 | 2014-01-22 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * update-game-score.c (write_scores) [WINDOWSNT]: Use chmod | ||
| 4 | instead of fchmod. | ||
| 5 | |||
| 1 | 2014-01-22 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2014-01-22 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Fix miscellaneous update-game-score bugs. | 8 | 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, | |||
| 443 | fd = mkostemp (tempfile, 0); | 443 | fd = mkostemp (tempfile, 0); |
| 444 | if (fd < 0) | 444 | if (fd < 0) |
| 445 | return -1; | 445 | return -1; |
| 446 | #ifndef WINDOWSNT | ||
| 446 | if (fchmod (fd, 0644) != 0) | 447 | if (fchmod (fd, 0644) != 0) |
| 447 | return -1; | 448 | return -1; |
| 449 | #endif | ||
| 448 | f = fdopen (fd, "w"); | 450 | f = fdopen (fd, "w"); |
| 449 | if (! f) | 451 | if (! f) |
| 450 | return -1; | 452 | return -1; |
| @@ -457,6 +459,10 @@ write_scores (const char *filename, const struct score_entry *scores, | |||
| 457 | return -1; | 459 | return -1; |
| 458 | if (rename (tempfile, filename) != 0) | 460 | if (rename (tempfile, filename) != 0) |
| 459 | return -1; | 461 | return -1; |
| 462 | #ifdef WINDOWSNT | ||
| 463 | if (chmod (filename, 0644) < 0) | ||
| 464 | return -1; | ||
| 465 | #endif | ||
| 460 | return 0; | 466 | return 0; |
| 461 | } | 467 | } |
| 462 | 468 | ||