summaryrefslogtreecommitdiff
path: root/ftparchive
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-03-05 22:11:25 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:58:45 +0100
commit453b82a388013e522b3a1b9fcd6ed0810dab1f4f (patch)
treebaa519d4f494816eb31b4cd4d06351c2ba23a1b7 /ftparchive
parent54298f49d71347616df19b8d2f59c907374e07b3 (diff)
cleanup headers and especially #includes everywhere
Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
Diffstat (limited to 'ftparchive')
-rw-r--r--ftparchive/apt-ftparchive.cc17
-rw-r--r--ftparchive/cachedb.cc4
-rw-r--r--ftparchive/cachedb.h8
-rw-r--r--ftparchive/contents.cc3
-rw-r--r--ftparchive/contents.h8
-rw-r--r--ftparchive/multicompress.cc6
-rw-r--r--ftparchive/multicompress.h3
-rw-r--r--ftparchive/override.cc3
-rw-r--r--ftparchive/writer.cc25
-rw-r--r--ftparchive/writer.h4
10 files changed, 57 insertions, 24 deletions
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index f13e4648a..692f19e25 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -17,14 +17,23 @@
#include <apt-pkg/cmndline.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/init.h>
-#include <algorithm>
+#include <apt-pkg/fileutl.h>
+#include <algorithm>
#include <climits>
#include <sys/time.h>
-#include <regex.h>
-
+#include <locale.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <time.h>
+#include <functional>
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include "cachedb.h"
+#include "override.h"
#include "apt-ftparchive.h"
-#include "contents.h"
#include "multicompress.h"
#include "writer.h"
diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc
index c2318bf53..523c6b5fa 100644
--- a/ftparchive/cachedb.cc
+++ b/ftparchive/cachedb.cc
@@ -19,8 +19,12 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/debfile.h>
#include <netinet/in.h> // htonl, etc
+#include <ctype.h>
+#include <stddef.h>
+#include <sys/stat.h>
#include "cachedb.h"
diff --git a/ftparchive/cachedb.h b/ftparchive/cachedb.h
index b9ced9418..49b9a0ef5 100644
--- a/ftparchive/cachedb.h
+++ b/ftparchive/cachedb.h
@@ -12,17 +12,19 @@
#ifndef CACHEDB_H
#define CACHEDB_H
-
#include <apt-pkg/debfile.h>
#include <db.h>
-#include <inttypes.h>
-#include <sys/stat.h>
#include <errno.h>
#include <string>
+#include <string.h>
+#include <stdint.h>
+#include <stdio.h>
#include "contents.h"
+class FileFd;
+
class CacheDB
{
protected:
diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc
index be4d2a61e..7a1fb779e 100644
--- a/ftparchive/contents.cc
+++ b/ftparchive/contents.cc
@@ -36,13 +36,12 @@
#include <config.h>
#include <apt-pkg/debfile.h>
-#include <apt-pkg/extracttar.h>
+#include <apt-pkg/dirstream.h>
#include <apt-pkg/error.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <malloc.h>
#include "contents.h"
diff --git a/ftparchive/contents.h b/ftparchive/contents.h
index 4af9db574..dbbb83350 100644
--- a/ftparchive/contents.h
+++ b/ftparchive/contents.h
@@ -9,11 +9,13 @@
/*}}}*/
#ifndef CONTENTS_H
#define CONTENTS_H
-
-#include <stdlib.h>
-#include <stdio.h>
+
#include <apt-pkg/dirstream.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string>
+
class debDebFile;
class GenContents
diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc
index 1555d2f2d..f35d5304a 100644
--- a/ftparchive/multicompress.cc
+++ b/ftparchive/multicompress.cc
@@ -20,13 +20,15 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/error.h>
#include <apt-pkg/md5.h>
+#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/hashsum_template.h>
-#include <fcntl.h>
+#include <ctype.h>
+#include <vector>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include <iostream>
#include "multicompress.h"
#include <apti18n.h>
diff --git a/ftparchive/multicompress.h b/ftparchive/multicompress.h
index 388fad22e..ddd1815a3 100644
--- a/ftparchive/multicompress.h
+++ b/ftparchive/multicompress.h
@@ -22,7 +22,8 @@
#include <string>
#include <stdio.h>
#include <sys/types.h>
-
+#include <time.h>
+
class MultiCompress
{
// An output file
diff --git a/ftparchive/override.cc b/ftparchive/override.cc
index 38d76a6a3..b4cd49b6c 100644
--- a/ftparchive/override.cc
+++ b/ftparchive/override.cc
@@ -16,6 +16,9 @@
#include <apt-pkg/error.h>
#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <utility>
#include "override.h"
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index edc0fddea..153c4fb42 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -13,28 +13,37 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/md5.h>
-#include <apt-pkg/hashes.h>
#include <apt-pkg/deblistparser.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/gpgv.h>
+#include <apt-pkg/hashes.h>
+#include <apt-pkg/md5.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/debfile.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/sha1.h>
+#include <apt-pkg/sha2.h>
+#include <apt-pkg/tagfile.h>
+#include <ctype.h>
+#include <fnmatch.h>
+#include <ftw.h>
+#include <locale.h>
+#include <string.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <ctime>
-#include <ftw.h>
-#include <fnmatch.h>
#include <iostream>
#include <sstream>
#include <memory>
+#include <utility>
+#include "apt-ftparchive.h"
#include "writer.h"
#include "cachedb.h"
-#include "apt-ftparchive.h"
#include "multicompress.h"
#include <apti18n.h>
diff --git a/ftparchive/writer.h b/ftparchive/writer.h
index 4932b0cc8..86884dcfc 100644
--- a/ftparchive/writer.h
+++ b/ftparchive/writer.h
@@ -13,14 +13,16 @@
#ifndef WRITER_H
#define WRITER_H
-
#include <string>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <map>
#include <set>
+#include <stdlib.h>
+#include <sys/types.h>
+#include "contents.h"
#include "cachedb.h"
#include "override.h"
#include "apt-ftparchive.h"