--- update-game-score.c-old 2014-01-25 08:31:13.065305429 -0800 +++ update-game-score.c 2014-01-25 08:31:54.337506871 -0800 @@ -443,8 +443,13 @@ fd = mkostemp (tempfile, 0); if (fd < 0) return -1; +#ifdef WINDOWSNT + if (chmod (tempfile, 0644) != 0) + return -1; +#else if (fchmod (fd, 0644) != 0) return -1; +#endif f = fdopen (fd, "w"); if (! f) return -1;