about summary refs log tree commit diff
path: root/third_party/nix/src/libutil
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-27T20·56+0100
committerVincent Ambo <tazjin@google.com>2020-05-27T20·56+0100
commit3652326ed281f5f753423acef51103fb8df62a6d (patch)
tree3e6969ccaa13e77eb42f887cd081b45d7fffed80 /third_party/nix/src/libutil
parent86a35d963d7b6108dec44411c8ebd5aadbb148ac (diff)
refactor(3p/nix): Anchor local includes at src/ r/865
Previously all includes were anchored in one global mess of header
files. This moves the includes into filesystem "namespaces" (if you
will) for each sub-package of Nix.

Note: This commit does not introduce the relevant build system changes.
Diffstat (limited to 'third_party/nix/src/libutil')
-rw-r--r--third_party/nix/src/libutil/affinity.cc6
-rw-r--r--third_party/nix/src/libutil/archive.cc8
-rw-r--r--third_party/nix/src/libutil/archive.hh4
-rw-r--r--third_party/nix/src/libutil/args.cc4
-rw-r--r--third_party/nix/src/libutil/args.hh2
-rw-r--r--third_party/nix/src/libutil/compression.cc8
-rw-r--r--third_party/nix/src/libutil/compression.hh6
-rw-r--r--third_party/nix/src/libutil/config.cc6
-rw-r--r--third_party/nix/src/libutil/config.hh2
-rw-r--r--third_party/nix/src/libutil/hash.cc8
-rw-r--r--third_party/nix/src/libutil/hash.hh4
-rw-r--r--third_party/nix/src/libutil/json.cc2
-rw-r--r--third_party/nix/src/libutil/pool.hh4
-rw-r--r--third_party/nix/src/libutil/serialise.cc7
-rw-r--r--third_party/nix/src/libutil/serialise.hh4
-rw-r--r--third_party/nix/src/libutil/thread-pool.cc7
-rw-r--r--third_party/nix/src/libutil/thread-pool.hh4
-rw-r--r--third_party/nix/src/libutil/types.hh2
-rw-r--r--third_party/nix/src/libutil/util.cc15
-rw-r--r--third_party/nix/src/libutil/util.hh2
-rw-r--r--third_party/nix/src/libutil/xml-writer.cc2
21 files changed, 55 insertions, 52 deletions
diff --git a/third_party/nix/src/libutil/affinity.cc b/third_party/nix/src/libutil/affinity.cc
index 7db8906eb0b4..03fbe1243992 100644
--- a/third_party/nix/src/libutil/affinity.cc
+++ b/third_party/nix/src/libutil/affinity.cc
@@ -1,9 +1,9 @@
-#include "affinity.hh"
+#include "libutil/affinity.hh"
 
 #include <glog/logging.h>
 
-#include "types.hh"
-#include "util.hh"
+#include "libutil/types.hh"
+#include "libutil/util.hh"
 
 #if __linux__
 #include <sched.h>
diff --git a/third_party/nix/src/libutil/archive.cc b/third_party/nix/src/libutil/archive.cc
index f78727c5fb46..40898093212a 100644
--- a/third_party/nix/src/libutil/archive.cc
+++ b/third_party/nix/src/libutil/archive.cc
@@ -1,4 +1,4 @@
-#include "archive.hh"
+#include "libutil/archive.hh"
 
 #include <algorithm>
 #include <cerrno>
@@ -7,14 +7,14 @@
 
 #include <dirent.h>
 #include <fcntl.h>
+#include <glog/logging.h>
 #include <strings.h>  // for strcasecmp
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "config.hh"
-#include "glog/logging.h"
-#include "util.hh"
+#include "libutil/config.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/archive.hh b/third_party/nix/src/libutil/archive.hh
index 0afa8893efdd..07f58b5f9433 100644
--- a/third_party/nix/src/libutil/archive.hh
+++ b/third_party/nix/src/libutil/archive.hh
@@ -1,7 +1,7 @@
 #pragma once
 
-#include "serialise.hh"
-#include "types.hh"
+#include "libutil/serialise.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/args.cc b/third_party/nix/src/libutil/args.cc
index 4e7bcb3ae72b..c56383ef88cc 100644
--- a/third_party/nix/src/libutil/args.cc
+++ b/third_party/nix/src/libutil/args.cc
@@ -1,6 +1,6 @@
-#include "args.hh"
+#include "libutil/args.hh"
 
-#include "hash.hh"
+#include "libutil/hash.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/args.hh b/third_party/nix/src/libutil/args.hh
index 2c352a04368c..37904b19aaa8 100644
--- a/third_party/nix/src/libutil/args.hh
+++ b/third_party/nix/src/libutil/args.hh
@@ -6,7 +6,7 @@
 
 #include <absl/strings/numbers.h>
 
-#include "util.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/compression.cc b/third_party/nix/src/libutil/compression.cc
index d7084ab7f15d..a50076fcd550 100644
--- a/third_party/nix/src/libutil/compression.cc
+++ b/third_party/nix/src/libutil/compression.cc
@@ -1,4 +1,4 @@
-#include "compression.hh"
+#include "libutil/compression.hh"
 
 #include <cstdio>
 #include <cstring>
@@ -7,11 +7,11 @@
 #include <brotli/decode.h>
 #include <brotli/encode.h>
 #include <bzlib.h>
+#include <glog/logging.h>
 #include <lzma.h>
 
-#include "finally.hh"
-#include "glog/logging.h"
-#include "util.hh"
+#include "libutil/finally.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/compression.hh b/third_party/nix/src/libutil/compression.hh
index 80b651e107d4..8ec340ab7447 100644
--- a/third_party/nix/src/libutil/compression.hh
+++ b/third_party/nix/src/libutil/compression.hh
@@ -2,9 +2,9 @@
 
 #include <string>
 
-#include "ref.hh"
-#include "serialise.hh"
-#include "types.hh"
+#include "libutil/ref.hh"
+#include "libutil/serialise.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/config.cc b/third_party/nix/src/libutil/config.cc
index 9e3f6f85c52d..ebb6b4df1d70 100644
--- a/third_party/nix/src/libutil/config.cc
+++ b/third_party/nix/src/libutil/config.cc
@@ -1,4 +1,4 @@
-#include "config.hh"
+#include "libutil/config.hh"
 
 #include <string>
 #include <utility>
@@ -9,8 +9,8 @@
 #include <absl/strings/string_view.h>
 #include <glog/logging.h>
 
-#include "args.hh"
-#include "json.hh"
+#include "libutil/args.hh"
+#include "libutil/json.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/config.hh b/third_party/nix/src/libutil/config.hh
index f8055d4d3690..0441e3b9e848 100644
--- a/third_party/nix/src/libutil/config.hh
+++ b/third_party/nix/src/libutil/config.hh
@@ -1,7 +1,7 @@
 #include <map>
 #include <set>
 
-#include "types.hh"
+#include "libutil/types.hh"
 
 #pragma once
 
diff --git a/third_party/nix/src/libutil/hash.cc b/third_party/nix/src/libutil/hash.cc
index 07a9730551da..5c2ddc4bda8e 100644
--- a/third_party/nix/src/libutil/hash.cc
+++ b/third_party/nix/src/libutil/hash.cc
@@ -1,4 +1,4 @@
-#include "hash.hh"
+#include "libutil/hash.hh"
 
 #include <cstring>
 #include <iostream>
@@ -9,9 +9,9 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
-#include "archive.hh"
-#include "istringstream_nocopy.hh"
-#include "util.hh"
+#include "libutil/archive.hh"
+#include "libutil/istringstream_nocopy.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/hash.hh b/third_party/nix/src/libutil/hash.hh
index f9c63c155ead..34cb41c48784 100644
--- a/third_party/nix/src/libutil/hash.hh
+++ b/third_party/nix/src/libutil/hash.hh
@@ -1,7 +1,7 @@
 #pragma once
 
-#include "serialise.hh"
-#include "types.hh"
+#include "libutil/serialise.hh"
+#include "libutil/types.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/json.cc b/third_party/nix/src/libutil/json.cc
index 218fc264ba50..da636e7be9c3 100644
--- a/third_party/nix/src/libutil/json.cc
+++ b/third_party/nix/src/libutil/json.cc
@@ -1,4 +1,4 @@
-#include "json.hh"
+#include "libutil/json.hh"
 
 #include <cstring>
 #include <iomanip>
diff --git a/third_party/nix/src/libutil/pool.hh b/third_party/nix/src/libutil/pool.hh
index 6d70795d35ac..fe6d5c28004e 100644
--- a/third_party/nix/src/libutil/pool.hh
+++ b/third_party/nix/src/libutil/pool.hh
@@ -6,8 +6,8 @@
 #include <list>
 #include <memory>
 
-#include "ref.hh"
-#include "sync.hh"
+#include "libutil/ref.hh"
+#include "libutil/sync.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/serialise.cc b/third_party/nix/src/libutil/serialise.cc
index 52f0b5542601..d02a0205af0d 100644
--- a/third_party/nix/src/libutil/serialise.cc
+++ b/third_party/nix/src/libutil/serialise.cc
@@ -1,4 +1,4 @@
-#include "serialise.hh"
+#include "libutil/serialise.hh"
 
 #include <boost/coroutine2/coroutine.hpp>
 #include <cerrno>
@@ -6,8 +6,9 @@
 #include <memory>
 #include <utility>
 
-#include "glog/logging.h"
-#include "util.hh"
+#include <glog/logging.h>
+
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/serialise.hh b/third_party/nix/src/libutil/serialise.hh
index dc877487ee7e..fbedf0510aa1 100644
--- a/third_party/nix/src/libutil/serialise.hh
+++ b/third_party/nix/src/libutil/serialise.hh
@@ -2,8 +2,8 @@
 
 #include <memory>
 
-#include "types.hh"
-#include "util.hh"
+#include "libutil/types.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/thread-pool.cc b/third_party/nix/src/libutil/thread-pool.cc
index 879de446c294..7c6b0a1b469b 100644
--- a/third_party/nix/src/libutil/thread-pool.cc
+++ b/third_party/nix/src/libutil/thread-pool.cc
@@ -1,7 +1,8 @@
-#include "thread-pool.hh"
+#include "libutil/thread-pool.hh"
 
-#include "affinity.hh"
-#include "glog/logging.h"
+#include <glog/logging.h>
+
+#include "libutil/affinity.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/thread-pool.hh b/third_party/nix/src/libutil/thread-pool.hh
index 72837ca1eecc..23527b907a21 100644
--- a/third_party/nix/src/libutil/thread-pool.hh
+++ b/third_party/nix/src/libutil/thread-pool.hh
@@ -6,8 +6,8 @@
 #include <queue>
 #include <thread>
 
-#include "sync.hh"
-#include "util.hh"
+#include "libutil/sync.hh"
+#include "libutil/util.hh"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/types.hh b/third_party/nix/src/libutil/types.hh
index ad44719afe3a..e2ea86fdcf5f 100644
--- a/third_party/nix/src/libutil/types.hh
+++ b/third_party/nix/src/libutil/types.hh
@@ -7,7 +7,7 @@
 #include <set>
 #include <string>
 
-#include "ref.hh"
+#include "libutil/ref.hh"
 
 /* Before 4.7, gcc's std::exception uses empty throw() specifiers for
  * its (virtual) destructor and what() in c++11 mode, in violation of spec
diff --git a/third_party/nix/src/libutil/util.cc b/third_party/nix/src/libutil/util.cc
index 3f541134b88f..bb6a17e03047 100644
--- a/third_party/nix/src/libutil/util.cc
+++ b/third_party/nix/src/libutil/util.cc
@@ -1,4 +1,4 @@
-#include "util.hh"
+#include "libutil/util.hh"
 
 #include <cctype>
 #include <cerrno>
@@ -15,6 +15,7 @@
 #include <absl/strings/str_split.h>
 #include <absl/strings/string_view.h>
 #include <fcntl.h>
+#include <glog/logging.h>
 #include <grp.h>
 #include <pwd.h>
 #include <sys/ioctl.h>
@@ -23,12 +24,12 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
-#include "affinity.hh"
-#include "finally.hh"
-#include "glog/logging.h"
-#include "lazy.hh"
-#include "serialise.hh"
-#include "sync.hh"
+#include "libutil/affinity.hh"
+#include "libutil/finally.hh"
+#include "libutil/lazy.hh"
+#include "libutil/serialise.hh"
+#include "libutil/sync.hh"
+#include "nix_config.h"
 
 namespace nix {
 
diff --git a/third_party/nix/src/libutil/util.hh b/third_party/nix/src/libutil/util.hh
index 27e6b47fb26b..b308c428fd2c 100644
--- a/third_party/nix/src/libutil/util.hh
+++ b/third_party/nix/src/libutil/util.hh
@@ -15,7 +15,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "types.hh"
+#include "libutil/types.hh"
 
 #ifndef HAVE_STRUCT_DIRENT_D_TYPE
 #define DT_UNKNOWN 0
diff --git a/third_party/nix/src/libutil/xml-writer.cc b/third_party/nix/src/libutil/xml-writer.cc
index d34e9a2f0d59..8274ed769eb4 100644
--- a/third_party/nix/src/libutil/xml-writer.cc
+++ b/third_party/nix/src/libutil/xml-writer.cc
@@ -1,4 +1,4 @@
-#include "xml-writer.hh"
+#include "libutil/xml-writer.hh"
 
 #include <cassert>