hash_int(hash, MANIFEST_VERSION);
}
- // clang will emit warnings for unused linker flags, so we shouldn't
- // skip those arguments
+ // clang will emit warnings for unused linker flags, so we shouldn't skip
+ // those arguments.
int is_clang = compiler_is_clang(args);
// First the arguments.
for (int i = 1; i < args->argc; i++) {
- // -L doesn't affect compilation.
+ // -L doesn't affect compilation (except for clang).
if (i < args->argc-1 && str_eq(args->argv[i], "-L") && !is_clang) {
i++;
continue;
continue;
}
- // -Wl,... doesn't affect compilation.
+ // -Wl,... doesn't affect compilation (except for clang).
if (str_startswith(args->argv[i], "-Wl,") && !is_clang) {
- // ...but it affects warnings with clang
continue;
}
bool read_file(const char *path, size_t size_hint, char **data, size_t *size);
char *read_text_file(const char *path, size_t size_hint);
char *subst_env_in_string(const char *str, char **errmsg);
-void set_cloexec_flag (int fd);
+void set_cloexec_flag(int fd);
// ----------------------------------------------------------------------------
// stats.c
// Copyright (C) 2002 Andrew Tridgell
-// Copyright (C) 2009-2016 Joel Rosdahl
+// Copyright (C) 2009-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
logfile = fopen(conf->log_file, "a");
if (logfile) {
#ifndef _WIN32
- int fd = fileno(logfile);
- set_cloexec_flag(fd);
+ set_cloexec_flag(fileno(logfile));
#endif
return true;
} else {
}
void
-set_cloexec_flag (int fd)
+set_cloexec_flag(int fd)
{
#ifndef _WIN32
int flags = fcntl(fd, F_GETFD, 0);
}
#endif
}
-