#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");
-// 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.
//
#include "system.hpp"
-#include <cstdio>
#include <string>
#include <vector>
-// 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.
//
#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
-// 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.
//
#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
#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
{
#include "NonCopyable.hpp"
-#include <cstdio>
#include <string>
class File : public NonCopyable
# 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
-// 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.
//
#include "third_party/fmt/core.h"
-#include <cstdio>
-#include <unistd.h>
-
#ifndef _WIN32
# include <sys/ioctl.h>
#endif
#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