* All headers should have system.hpp as their first #include.
* Removed unnecessary stdbool.h inclusions.
* Use C++ variants of headers when possible.
12 files changed:
#pragma once
+#include "system.hpp"
+
#include <stdexcept>
class Error : public std::runtime_error
#pragma once
+#include "system.hpp"
+
#include "compression.hpp"
#include "third_party/xxhash.h"
#pragma once
-#include <stddef.h>
+#include "system.hpp"
+
+#include <cstddef>
struct counters
{
#pragma once
+#include "system.hpp"
+
#include "conf.hpp"
#include "hash.hpp"
#pragma once
-#include <stdbool.h>
+#include "system.hpp"
const char* language_for_file(const char* fname);
const char* p_language_for_language(const char* language);
#pragma once
-#include <stdint.h>
+#include "system.hpp"
+
+#include <cstdint>
// A Boyer-Moore-Horspool skip table used for searching for the strings
// "__TIME__" and "__DATE__".
#pragma once
+#include "system.hpp"
+
#include "conf.hpp"
#include "hashutil.hpp"
#pragma once
+#include "system.hpp"
+
#include "conf.hpp"
extern const char RESULT_MAGIC[4];
# include <sys/wait.h>
#endif
-#include <assert.h>
-#include <ctype.h>
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cinttypes>
+#include <climits>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
#include <dirent.h>
-#include <errno.h>
#include <fcntl.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <strings.h>
-#include <time.h>
#include <unistd.h>
#include <utime.h>
#pragma once
+#include "system.hpp"
+
#include "hash.hpp"
int unify_hash(struct hash* hash, const char* fname, bool print);
// this program; if not, write to the Free Software Foundation, Inc., 51
// Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#include "system.hpp"
+
#include <string>
namespace util {
#pragma once
-#include <stdbool.h>
+#include "system.hpp"
bool path_exists(const char* path);
bool is_symlink(const char* path);