]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Reduce the set of included headers
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 19 Jun 2020 17:46:47 +0000 (19:46 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 23 Jun 2020 19:44:45 +0000 (21:44 +0200)
src/AtomicFile.cpp
src/AtomicFile.hpp
src/CacheEntryReader.hpp
src/CacheEntryWriter.hpp
src/CacheFile.hpp
src/File.hpp
src/InodeCache.cpp
src/ProgressBar.cpp
src/stats.cpp

index 0cb6cc215d00d7f0f2cf23d1683a7464c2ce81a1..ca998189169843ff581aff25a176613ae4191e93 100644 (file)
 
 #include "third_party/fmt/core.h"
 
-#include <cassert>
-#include <cerrno>
-#include <unistd.h>
-
 AtomicFile::AtomicFile(const std::string& path, Mode mode) : m_path(path)
 {
   auto fd_and_path = Util::create_temp_fd(path + ".tmp");
index 66d681bca2aeb7c89fa06a375a849db5d523c3a0..c3857307096837d820203d2f4059bc63b2a12d47 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2020 Joel Rosdahl and other contributors
 //
 // See doc/AUTHORS.adoc for a complete list of contributors.
 //
@@ -20,7 +20,6 @@
 
 #include "system.hpp"
 
-#include <cstdio>
 #include <string>
 #include <vector>
 
index 1e3784fe639e916d7ba162f912de9a230aaeb501..8ee73023235d81aeb4ac8834b48d3ca2e87d8629 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2020 Joel Rosdahl and other contributors
 //
 // See doc/AUTHORS.adoc for a complete list of contributors.
 //
@@ -24,7 +24,6 @@
 #include "Decompressor.hpp"
 #include "Util.hpp"
 
-#include <cstdio>
 #include <memory>
 
 // This class knows how to read a cache entry with a common header and a
index 711035810c118cf6f810fea773db2f05af368af5..14c0d19e6e63e73059c6889eb88a2aec0c1e2c56 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2020 Joel Rosdahl and other contributors
 //
 // See doc/AUTHORS.adoc for a complete list of contributors.
 //
@@ -24,7 +24,6 @@
 #include "Compressor.hpp"
 #include "Util.hpp"
 
-#include <cstdio>
 #include <memory>
 
 // This class knows how to write a cache entry with a common header and a
index 6af0a9ee60cfb9b9ab4132e0eaa9ce21b20bbcce..59c180bea9698d180f41dea9dec3e843a45c73d9 100644 (file)
 
 #include "third_party/nonstd/optional.hpp"
 
-#include <cerrno>
-#include <cstring>
 #include <string>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 class CacheFile
 {
index 9f37f3fbee83d1877d2c783091eb6b46d6ac8a6e..bfe229ef9c8ec174821b4be1f69ebef2a86cbd4c 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "NonCopyable.hpp"
 
-#include <cstdio>
 #include <string>
 
 class File : public NonCopyable
index fd5282bd076942382d7d6f2fd6e6a698f56ee551..2b1d992992a0d759093b42bc3c777c62999d85ec 100644 (file)
 #  include "logging.hpp"
 
 #  include <atomic>
-#  include <errno.h>
-#  include <fcntl.h>
 #  include <libgen.h>
-#  include <stdio.h>
-#  include <stdlib.h>
-#  include <string.h>
 #  include <sys/mman.h>
-#  include <sys/stat.h>
-#  include <sys/types.h>
-#  include <time.h>
 #  include <type_traits>
-#  include <unistd.h>
 
 // The inode cache resides on a file that is mapped into shared memory by
 // running processes. It is implemented as a two level structure, where the top
index 63bf25d09620fe79af9696856b50335610f40860..1e01e0aeff22e6831f4292398f6bee9f78b10d19 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2020 Joel Rosdahl and other contributors
 //
 // See doc/AUTHORS.adoc for a complete list of contributors.
 //
@@ -20,9 +20,6 @@
 
 #include "third_party/fmt/core.h"
 
-#include <cstdio>
-#include <unistd.h>
-
 #ifndef _WIN32
 #  include <sys/ioctl.h>
 #endif
index 5fc107e48c95c691cc04cf393daca349fddf4c5f..6ffb0bc39c93309700622b5ce64c0e93bade2c68 100644 (file)
 #include "third_party/fmt/core.h"
 
 #include <cmath>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 #define FLAG_NOZERO 1 // don't zero with the -z option
 #define FLAG_ALWAYS 2 // always show, even if zero