return false;
}
- int result = snprintf(tmpfile, sizeof(tmpfile), "%s.tmp", filename);
+ size_t result = snprintf(tmpfile, sizeof(tmpfile), "%s.tmp", filename);
if(result < sizeof(tmpfile)) {
struct stat st = {.st_mode = 0600};
return false;
}
-#ifdef HAVE_MINGW
+#ifdef HAVE_WINDOWS
// We cannot atomically replace files on Windows.
char bakfile[PATH_MAX] = "";
snprintf(bakfile, sizeof(bakfile), "%s.bak", filename);
return false;
}
-#ifdef HAVE_MINGW
+#ifdef HAVE_WINDOWS
unlink(bakfile);
#endif
fprintf(stderr, "Warning: old key(s) found and disabled.\n");
return NULL;
}
-#ifndef HAVE_MINGW
+#ifndef HAVE_WINDOWS
struct stat s;
if(fstat(fileno(fp), &s)) {
char *p;
if(!*config_tree) {
- init_configuration(config_tree);
+ *config_tree = create_configuration();
if(!read_host_config(*config_tree, name, true)) {
return false;
return NULL;
}
-#ifndef HAVE_MINGW
+#ifndef HAVE_WINDOWS
struct stat s;
if(fstat(fileno(fp), &s)) {