Skip to content

Commit a04ce1b

Browse files
vdyeGit for Windows Build Agent
authored andcommitted
Merge pull request #3492 from dscho/ns/batched-fsync
Switch to batched fsync by default
2 parents 92fb8a5 + 3318419 commit a04ce1b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

compat/mingw.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,8 +1239,11 @@ char *mingw_mktemp(char *template)
12391239
int offset = 0;
12401240

12411241
/* we need to return the path, thus no long paths here! */
1242-
if (xutftowcs_path(wtemplate, template) < 0)
1242+
if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1243+
if (errno == ERANGE)
1244+
errno = ENAMETOOLONG;
12431245
return NULL;
1246+
}
12441247

12451248
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
12461249
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
@@ -3754,7 +3757,7 @@ int wmain(int argc, const wchar_t **wargv)
37543757

37553758
maybe_redirect_std_handles();
37563759
adjust_symlink_flags();
3757-
fsync_object_files = 1;
3760+
fsync_object_files = FSYNC_OBJECT_FILES_ON;
37583761

37593762
/* determine size of argv and environ conversion buffer */
37603763
maxlen = wcslen(wargv[0]);

0 commit comments

Comments
 (0)