summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/contrib/arfile.cc4
-rw-r--r--apt-inst/contrib/extracttar.cc6
-rw-r--r--apt-inst/deb/debfile.cc12
-rw-r--r--apt-inst/deb/debfile.h6
-rw-r--r--apt-inst/dirstream.cc1
-rw-r--r--apt-inst/extract.cc9
-rw-r--r--apt-inst/extract.h5
-rw-r--r--apt-inst/filelist.cc2
-rw-r--r--apt-pkg/acquire-item.cc15
-rw-r--r--apt-pkg/acquire-item.h4
-rw-r--r--apt-pkg/acquire-method.cc12
-rw-r--r--apt-pkg/acquire-method.h1
-rw-r--r--apt-pkg/acquire-worker.cc7
-rw-r--r--apt-pkg/acquire-worker.h3
-rw-r--r--apt-pkg/acquire.cc6
-rw-r--r--apt-pkg/acquire.h7
-rw-r--r--apt-pkg/algorithms.cc13
-rw-r--r--apt-pkg/algorithms.h5
-rw-r--r--apt-pkg/aptconfiguration.cc9
-rw-r--r--apt-pkg/cachefile.cc9
-rw-r--r--apt-pkg/cachefile.h9
-rw-r--r--apt-pkg/cachefilter.cc4
-rw-r--r--apt-pkg/cachefilter.h1
-rw-r--r--apt-pkg/cacheiterators.h4
-rw-r--r--apt-pkg/cacheset.cc16
-rw-r--r--apt-pkg/cacheset.h7
-rw-r--r--apt-pkg/cdrom.cc34
-rw-r--r--apt-pkg/cdrom.h2
-rw-r--r--apt-pkg/clean.cc4
-rw-r--r--apt-pkg/clean.h7
-rw-r--r--apt-pkg/contrib/cdromutl.cc5
-rw-r--r--apt-pkg/contrib/cmndline.cc5
-rw-r--r--apt-pkg/contrib/configuration.cc13
-rw-r--r--apt-pkg/contrib/error.cc4
-rw-r--r--apt-pkg/contrib/error.h27
-rw-r--r--apt-pkg/contrib/fileutl.cc12
-rw-r--r--apt-pkg/contrib/fileutl.h11
-rw-r--r--apt-pkg/contrib/gpgv.cc18
-rw-r--r--apt-pkg/contrib/gpgv.h14
-rw-r--r--apt-pkg/contrib/hashes.cc6
-rw-r--r--apt-pkg/contrib/hashes.h13
-rw-r--r--apt-pkg/contrib/hashsum.cc3
-rw-r--r--apt-pkg/contrib/hashsum_template.h10
-rw-r--r--apt-pkg/contrib/macros.h8
-rw-r--r--apt-pkg/contrib/md5.cc6
-rw-r--r--apt-pkg/contrib/md5.h9
-rw-r--r--apt-pkg/contrib/mmap.cc4
-rw-r--r--apt-pkg/contrib/netrc.cc3
-rw-r--r--apt-pkg/contrib/netrc.h6
-rw-r--r--apt-pkg/contrib/progress.cc2
-rw-r--r--apt-pkg/contrib/sha1.cc5
-rw-r--r--apt-pkg/contrib/sha1.h7
-rw-r--r--apt-pkg/contrib/sha2.h10
-rw-r--r--apt-pkg/contrib/sha2_internal.cc1
-rw-r--r--apt-pkg/contrib/sha2_internal.h1
-rw-r--r--apt-pkg/contrib/strutl.cc9
-rw-r--r--apt-pkg/contrib/strutl.h23
-rw-r--r--apt-pkg/deb/debindexfile.cc14
-rw-r--r--apt-pkg/deb/debindexfile.h10
-rw-r--r--apt-pkg/deb/deblistparser.cc9
-rw-r--r--apt-pkg/deb/deblistparser.h7
-rw-r--r--apt-pkg/deb/debmetaindex.cc11
-rw-r--r--apt-pkg/deb/debmetaindex.h8
-rw-r--r--apt-pkg/deb/debrecords.cc8
-rw-r--r--apt-pkg/deb/debrecords.h3
-rw-r--r--apt-pkg/deb/debsrcrecords.cc11
-rw-r--r--apt-pkg/deb/debsrcrecords.h7
-rw-r--r--apt-pkg/deb/debsystem.cc9
-rw-r--r--apt-pkg/deb/debsystem.h10
-rw-r--r--apt-pkg/deb/debversion.cc2
-rw-r--r--apt-pkg/deb/debversion.h6
-rw-r--r--apt-pkg/deb/dpkgpm.cc52
-rw-r--r--apt-pkg/deb/dpkgpm.h13
-rw-r--r--apt-pkg/depcache.cc14
-rw-r--r--apt-pkg/depcache.h12
-rw-r--r--apt-pkg/edsp.cc17
-rw-r--r--apt-pkg/edsp.h5
-rw-r--r--apt-pkg/edsp/edspindexfile.cc17
-rw-r--r--apt-pkg/edsp/edspindexfile.h4
-rw-r--r--apt-pkg/edsp/edsplistparser.cc10
-rw-r--r--apt-pkg/edsp/edsplistparser.h4
-rw-r--r--apt-pkg/edsp/edspsystem.cc15
-rw-r--r--apt-pkg/edsp/edspsystem.h9
-rw-r--r--apt-pkg/indexcopy.cc6
-rw-r--r--apt-pkg/indexcopy.h10
-rw-r--r--apt-pkg/indexfile.cc10
-rw-r--r--apt-pkg/indexfile.h15
-rw-r--r--apt-pkg/indexrecords.cc7
-rw-r--r--apt-pkg/indexrecords.h6
-rw-r--r--apt-pkg/init.cc4
-rw-r--r--apt-pkg/init.h2
-rw-r--r--apt-pkg/install-progress.cc30
-rw-r--r--apt-pkg/metaindex.h15
-rw-r--r--apt-pkg/orderlist.cc6
-rw-r--r--apt-pkg/orderlist.h6
-rw-r--r--apt-pkg/packagemanager.cc11
-rw-r--r--apt-pkg/packagemanager.h12
-rw-r--r--apt-pkg/pkgcache.cc7
-rw-r--r--apt-pkg/pkgcachegen.cc20
-rw-r--r--apt-pkg/pkgcachegen.h12
-rw-r--r--apt-pkg/pkgrecords.cc6
-rw-r--r--apt-pkg/pkgrecords.h3
-rw-r--r--apt-pkg/pkgsystem.cc1
-rw-r--r--apt-pkg/pkgsystem.h2
-rw-r--r--apt-pkg/policy.cc10
-rw-r--r--apt-pkg/policy.h5
-rw-r--r--apt-pkg/sourcelist.cc11
-rw-r--r--apt-pkg/sourcelist.h12
-rw-r--r--apt-pkg/srcrecords.cc7
-rw-r--r--apt-pkg/tagfile.cc2
-rw-r--r--apt-pkg/update.cc23
-rw-r--r--apt-pkg/upgrade.cc19
-rw-r--r--apt-pkg/upgrade.h2
-rw-r--r--apt-pkg/vendor.cc8
-rw-r--r--apt-pkg/vendor.h2
-rw-r--r--apt-pkg/vendorlist.cc9
-rw-r--r--apt-pkg/vendorlist.h2
-rw-r--r--apt-pkg/version.cc2
-rw-r--r--apt-pkg/versionmatch.cc7
-rw-r--r--apt-pkg/versionmatch.h3
-rw-r--r--apt-private/acqprogress.cc5
-rw-r--r--apt-private/private-cachefile.cc12
-rw-r--r--apt-private/private-cachefile.h2
-rw-r--r--apt-private/private-cacheset.cc13
-rw-r--r--apt-private/private-cacheset.h15
-rw-r--r--apt-private/private-cmndline.cc6
-rw-r--r--apt-private/private-download.cc6
-rw-r--r--apt-private/private-download.h2
-rw-r--r--apt-private/private-install.cc68
-rw-r--r--apt-private/private-install.h18
-rw-r--r--apt-private/private-list.cc43
-rw-r--r--apt-private/private-list.h2
-rw-r--r--apt-private/private-main.cc12
-rw-r--r--apt-private/private-main.h3
-rw-r--r--apt-private/private-moo.cc12
-rw-r--r--apt-private/private-output.cc14
-rw-r--r--apt-private/private-output.h5
-rw-r--r--apt-private/private-search.cc44
-rw-r--r--apt-private/private-search.h2
-rw-r--r--apt-private/private-show.cc40
-rw-r--r--apt-private/private-show.h2
-rw-r--r--apt-private/private-sources.cc21
-rw-r--r--apt-private/private-sources.h7
-rw-r--r--apt-private/private-update.cc39
-rw-r--r--apt-private/private-upgrade.cc18
-rw-r--r--apt-private/private-upgrade.h4
-rw-r--r--apt-private/private-utils.cc8
-rw-r--r--apt-private/private-utils.h2
-rw-r--r--buildlib/apti18n.h.in3
-rw-r--r--buildlib/config.h.in1
-rw-r--r--cmdline/acqprogress.cc2
-rw-r--r--cmdline/apt-cache.cc51
-rw-r--r--cmdline/apt-cdrom.cc9
-rw-r--r--cmdline/apt-config.cc2
-rw-r--r--cmdline/apt-dump-solver.cc6
-rw-r--r--cmdline/apt-extracttemplates.cc9
-rw-r--r--cmdline/apt-extracttemplates.h3
-rw-r--r--cmdline/apt-get.cc83
-rw-r--r--cmdline/apt-helper.cc12
-rw-r--r--cmdline/apt-internal-solver.cc10
-rw-r--r--cmdline/apt-mark.cc29
-rw-r--r--cmdline/apt-sortpkgs.cc6
-rw-r--r--cmdline/apt.cc40
-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
-rw-r--r--methods/cdrom.cc4
-rw-r--r--methods/connect.cc2
-rw-r--r--methods/copy.cc3
-rw-r--r--methods/file.cc3
-rw-r--r--methods/ftp.cc5
-rw-r--r--methods/ftp.h2
-rw-r--r--methods/gpgv.cc16
-rw-r--r--methods/gzip.cc14
-rw-r--r--methods/http.cc13
-rw-r--r--methods/http.h4
-rw-r--r--methods/http_main.cc5
-rw-r--r--methods/https.cc9
-rw-r--r--methods/https.h7
-rw-r--r--methods/mirror.cc10
-rw-r--r--methods/mirror.h2
-rw-r--r--methods/rred.cc5
-rw-r--r--methods/rsh.cc4
-rw-r--r--methods/rsh.h2
-rw-r--r--methods/server.cc27
-rw-r--r--methods/server.h3
-rw-r--r--test/interactive-helper/aptwebserver.cc34
-rw-r--r--test/interactive-helper/extract-control.cc3
-rw-r--r--test/interactive-helper/mthdcat.cc2
-rw-r--r--test/interactive-helper/rpmver.cc2
-rw-r--r--test/interactive-helper/test_udevcdrom.cc8
-rw-r--r--test/interactive-helper/testdeb.cc7
-rw-r--r--test/libapt/cdromfindpackages_test.cc4
-rw-r--r--test/libapt/cdromreducesourcelist_test.cc4
-rw-r--r--test/libapt/commandline_test.cc3
-rw-r--r--test/libapt/commandlineasstring_test.cc2
-rw-r--r--test/libapt/compareversion_test.cc9
-rw-r--r--test/libapt/configuration_test.cc2
-rw-r--r--test/libapt/fileutl_test.cc7
-rw-r--r--test/libapt/getarchitectures_test.cc5
-rw-r--r--test/libapt/getlanguages_test.cc2
-rw-r--r--test/libapt/getlistoffilesindir_test.cc7
-rw-r--r--test/libapt/globalerror_test.cc6
-rw-r--r--test/libapt/hashsums_test.cc15
-rw-r--r--test/libapt/indexcopytosourcelist_test.cc9
-rw-r--r--test/libapt/parsedepends_test.cc6
-rw-r--r--test/libapt/sourcelist_test.cc9
-rw-r--r--test/libapt/strutil_test.cc7
-rw-r--r--test/libapt/tagfile_test.cc6
-rw-r--r--test/libapt/uri_test.cc4
217 files changed, 1348 insertions, 788 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index 77dbc55d6..905110781 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -21,7 +21,9 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
-#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <string>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index 41c509809..0ba3f0521 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -23,9 +23,11 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/macros.h>
+#include <apt-pkg/fileutl.h>
-#include <stdlib.h>
+#include <string.h>
+#include <algorithm>
+#include <string>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc
index 8684f03f7..3803329fa 100644
--- a/apt-inst/deb/debfile.cc
+++ b/apt-inst/deb/debfile.cc
@@ -21,11 +21,17 @@
#include <apt-pkg/debfile.h>
#include <apt-pkg/extracttar.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/deblistparser.h>
#include <apt-pkg/aptconfiguration.h>
-
+#include <apt-pkg/arfile.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/tagfile.h>
+
+#include <string.h>
+#include <string>
+#include <vector>
#include <sys/stat.h>
-#include <unistd.h>
+
#include <apti18n.h>
/*}}}*/
diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h
index ecef71d21..880bcf6c5 100644
--- a/apt-inst/deb/debfile.h
+++ b/apt-inst/deb/debfile.h
@@ -27,11 +27,15 @@
#include <apt-pkg/arfile.h>
#include <apt-pkg/dirstream.h>
#include <apt-pkg/tagfile.h>
-#include <apt-pkg/pkgcache.h>
+
+#include <string>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/md5.h>
#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/pkgcache.h>
+#endif
class FileFd;
diff --git a/apt-inst/dirstream.cc b/apt-inst/dirstream.cc
index 085a0dcbf..39ebb3bb4 100644
--- a/apt-inst/dirstream.cc
+++ b/apt-inst/dirstream.cc
@@ -18,7 +18,6 @@
#include <fcntl.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/time.h>
#include <errno.h>
#include <unistd.h>
diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc
index 60edc702e..b2956d91d 100644
--- a/apt-inst/extract.cc
+++ b/apt-inst/extract.cc
@@ -50,13 +50,20 @@
#include <apt-pkg/error.h>
#include <apt-pkg/debversion.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/filelist.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <string.h>
+#include <string>
#include <sys/stat.h>
#include <stdio.h>
-#include <unistd.h>
#include <errno.h>
#include <dirent.h>
#include <iostream>
+
#include <apti18n.h>
/*}}}*/
using namespace std;
diff --git a/apt-inst/extract.h b/apt-inst/extract.h
index 7143fa409..8ad9ac629 100644
--- a/apt-inst/extract.h
+++ b/apt-inst/extract.h
@@ -17,11 +17,12 @@
#ifndef PKGLIB_EXTRACT_H
#define PKGLIB_EXTRACT_H
-
-
#include <apt-pkg/dirstream.h>
#include <apt-pkg/filelist.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <string>
class pkgExtract : public pkgDirStream
{
diff --git a/apt-inst/filelist.cc b/apt-inst/filelist.cc
index defc4f4df..b4a4f3d9d 100644
--- a/apt-inst/filelist.cc
+++ b/apt-inst/filelist.cc
@@ -39,8 +39,6 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <apti18n.h>
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 3b22743e7..44a1f32df 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -22,12 +22,21 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/md5.h>
#include <apt-pkg/sha1.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/indexrecords.h>
-#include <apt-pkg/metaindex.h>
-
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/hashes.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgrecords.h>
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <iostream>
+#include <vector>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 0524743c6..f48d2a0d7 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -24,6 +24,10 @@
#include <apt-pkg/hashes.h>
#include <apt-pkg/weakptr.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <string>
+#include <vector>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/indexfile.h>
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index 5bc1c159a..746c553f1 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -23,10 +23,18 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
-
+#include <apt-pkg/md5.h>
+#include <apt-pkg/sha1.h>
+#include <apt-pkg/sha2.h>
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <string>
+#include <vector>
#include <iostream>
#include <stdio.h>
-#include <sys/signal.h>
/*}}}*/
using namespace std;
diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h
index 00f99e0a0..f0f2a537a 100644
--- a/apt-pkg/acquire-method.h
+++ b/apt-pkg/acquire-method.h
@@ -21,6 +21,7 @@
#define PKGLIB_ACQUIRE_METHOD_H
#include <stdarg.h>
+#include <time.h>
#include <string>
#include <vector>
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index de62080da..047a655ce 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -14,20 +14,23 @@
// Include Files /*{{{*/
#include <config.h>
+#include <apt-pkg/acquire.h>
#include <apt-pkg/acquire-worker.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/hashes.h>
+#include <string>
+#include <vector>
#include <iostream>
#include <sstream>
-#include <fstream>
#include <sys/stat.h>
+#include <stdlib.h>
#include <unistd.h>
-#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <errno.h>
diff --git a/apt-pkg/acquire-worker.h b/apt-pkg/acquire-worker.h
index a558f69a7..67aee4b59 100644
--- a/apt-pkg/acquire-worker.h
+++ b/apt-pkg/acquire-worker.h
@@ -22,6 +22,9 @@
#include <apt-pkg/acquire.h>
#include <apt-pkg/weakptr.h>
+#include <sys/types.h>
+#include <string>
+#include <vector>
/** \brief A fetch subprocess.
*
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index e8fa68338..a654d8219 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -23,12 +23,18 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
+#include <string>
+#include <vector>
#include <iostream>
#include <sstream>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include <dirent.h>
#include <sys/time.h>
+#include <sys/select.h>
#include <errno.h>
#include <apti18n.h>
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index 2c0b37635..1aac0ba11 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -72,8 +72,13 @@
#include <vector>
#include <string>
+#include <stddef.h>
#include <sys/time.h>
+#include <sys/select.h>
+
+#ifndef APT_10_CLEANER_HEADERS
#include <unistd.h>
+#endif
#ifndef APT_8_CLEANER_HEADERS
using std::vector;
@@ -353,7 +358,7 @@ class pkgAcquire
void SetLog(pkgAcquireStatus *Progress) { Log = Progress; }
/** \brief Construct a new pkgAcquire. */
- pkgAcquire(pkgAcquireStatus *Log) __deprecated;
+ pkgAcquire(pkgAcquireStatus *Log) APT_DEPRECATED;
pkgAcquire();
/** \brief Destroy this pkgAcquire object.
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 2e167119d..a7b676660 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -19,19 +19,18 @@
#include <apt-pkg/algorithms.h>
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/version.h>
#include <apt-pkg/sptr.h>
-#include <apt-pkg/acquire-item.h>
#include <apt-pkg/edsp.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/progress.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/packagemanager.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
-#include <sys/types.h>
+#include <string.h>
+#include <string>
#include <cstdlib>
-#include <algorithm>
#include <iostream>
-#include <stdio.h>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h
index 489d81159..82b6426c6 100644
--- a/apt-pkg/algorithms.h
+++ b/apt-pkg/algorithms.h
@@ -33,8 +33,11 @@
#include <apt-pkg/packagemanager.h>
#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <iostream>
+#include <string>
#include <apt-pkg/macros.h>
@@ -140,7 +143,7 @@ class pkgProblemResolver /*{{{*/
// Try to resolve problems only by using keep
bool ResolveByKeep();
- __deprecated void InstallProtect();
+ APT_DEPRECATED void InstallProtect();
pkgProblemResolver(pkgDepCache *Cache);
~pkgProblemResolver();
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 4c609c603..941a9c334 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -17,14 +17,19 @@
#include <apt-pkg/macros.h>
#include <apt-pkg/strutl.h>
-#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
#include <fcntl.h>
-
+#include <ctype.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include <algorithm>
#include <string>
#include <vector>
+
+#include <apti18n.h>
/*}}}*/
namespace APT {
// getCompressionTypes - Return Vector of usable compressiontypes /*{{{*/
diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc
index 2401b015e..0fd40106f 100644
--- a/apt-pkg/cachefile.cc
+++ b/apt-pkg/cachefile.cc
@@ -21,9 +21,16 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/policy.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/acquire-item.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/progress.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <string.h>
+#include <unistd.h>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h
index 802b12b61..36b20893a 100644
--- a/apt-pkg/cachefile.h
+++ b/apt-pkg/cachefile.h
@@ -17,8 +17,12 @@
#ifndef PKGLIB_CACHEFILE_H
#define PKGLIB_CACHEFILE_H
+#include <stddef.h>
+
#include <apt-pkg/depcache.h>
#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/acquire.h>
@@ -26,6 +30,7 @@
#include <apt-pkg/sourcelist.h>
#endif
+class MMap;
class pkgPolicy;
class pkgSourceList;
class OpProgress;
@@ -60,13 +65,13 @@ class pkgCacheFile
inline unsigned char &operator [](pkgCache::DepIterator const &I) {return (*DCache)[I];};
bool BuildCaches(OpProgress *Progress = NULL,bool WithLock = true);
- __deprecated bool BuildCaches(OpProgress &Progress,bool const &WithLock = true) { return BuildCaches(&Progress, WithLock); };
+ APT_DEPRECATED bool BuildCaches(OpProgress &Progress,bool const &WithLock = true) { return BuildCaches(&Progress, WithLock); };
bool BuildSourceList(OpProgress *Progress = NULL);
bool BuildPolicy(OpProgress *Progress = NULL);
bool BuildDepCache(OpProgress *Progress = NULL);
bool Open(OpProgress *Progress = NULL, bool WithLock = true);
inline bool ReadOnlyOpen(OpProgress *Progress = NULL) { return Open(Progress, false); };
- __deprecated bool Open(OpProgress &Progress,bool const &WithLock = true) { return Open(&Progress, WithLock); };
+ APT_DEPRECATED bool Open(OpProgress &Progress,bool const &WithLock = true) { return Open(&Progress, WithLock); };
static void RemoveCaches();
void Close();
diff --git a/apt-pkg/cachefilter.cc b/apt-pkg/cachefilter.cc
index 57b9af159..e388f2450 100644
--- a/apt-pkg/cachefilter.cc
+++ b/apt-pkg/cachefilter.cc
@@ -9,10 +9,12 @@
#include <apt-pkg/cachefilter.h>
#include <apt-pkg/error.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/macros.h>
#include <string>
-
+#include <string.h>
#include <regex.h>
#include <fnmatch.h>
diff --git a/apt-pkg/cachefilter.h b/apt-pkg/cachefilter.h
index 81ae1383c..49d2855f5 100644
--- a/apt-pkg/cachefilter.h
+++ b/apt-pkg/cachefilter.h
@@ -7,6 +7,7 @@
#define APT_CACHEFILTER_H
// Include Files /*{{{*/
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <string>
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 64fec5daa..d9c8ed1e4 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -29,7 +29,11 @@
/*}}}*/
#ifndef PKGLIB_CACHEITERATORS_H
#define PKGLIB_CACHEITERATORS_H
+#include<apt-pkg/pkgcache.h>
+
#include<iterator>
+#include <iosfwd>
+#include <string>
#include<string.h>
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 8a30d00a2..a58631d5b 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -16,14 +16,22 @@
#include <apt-pkg/cachefilter.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/versionmatch.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/policy.h>
-
-#include <vector>
-
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
#include <regex.h>
+#include <list>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index ef28bbc34..16a3daa42 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -9,7 +9,6 @@
#ifndef APT_CACHESET_H
#define APT_CACHESET_H
// Include Files /*{{{*/
-#include <iostream>
#include <fstream>
#include <map>
#include <set>
@@ -17,12 +16,18 @@
#include <string>
#include <iterator>
+#include <stddef.h>
+
#include <apt-pkg/error.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/cachefile.h>
#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <iostream>
+#endif
/*}}}*/
class pkgCacheFile;
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 6f946b030..262ff9eab 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -1,28 +1,30 @@
/*
*/
-#include<config.h>
-
-#include<apt-pkg/init.h>
-#include<apt-pkg/error.h>
-#include<apt-pkg/cdromutl.h>
-#include<apt-pkg/strutl.h>
-#include<apt-pkg/cdrom.h>
-#include<apt-pkg/aptconfiguration.h>
-#include<apt-pkg/configuration.h>
-#include<apt-pkg/fileutl.h>
-
-#include<sstream>
-#include<fstream>
+#include <config.h>
+
+#include <apt-pkg/error.h>
+#include <apt-pkg/cdromutl.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/cdrom.h>
+#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/indexcopy.h>
+
+
+#include <string.h>
+#include <iostream>
+#include <string>
+#include <vector>
+#include <sstream>
+#include <fstream>
#include <sys/stat.h>
-#include <fcntl.h>
#include <dirent.h>
#include <unistd.h>
#include <stdio.h>
#include <algorithm>
#include <dlfcn.h>
-#include "indexcopy.h"
-
#include<apti18n.h>
using namespace std;
diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h
index c58593550..f4a873808 100644
--- a/apt-pkg/cdrom.h
+++ b/apt-pkg/cdrom.h
@@ -4,6 +4,8 @@
#include<string>
#include<vector>
+#include <stddef.h>
+
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/init.h>
using namespace std;
diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc
index 2dea8ffdd..0ee3b765d 100644
--- a/apt-pkg/clean.cc
+++ b/apt-pkg/clean.cc
@@ -16,7 +16,11 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <string>
+#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/apt-pkg/clean.h b/apt-pkg/clean.h
index ad4049e83..930d54a7f 100644
--- a/apt-pkg/clean.h
+++ b/apt-pkg/clean.h
@@ -10,8 +10,13 @@
#ifndef APTPKG_CLEAN_H
#define APTPKG_CLEAN_H
-
+#ifndef APT_10_CLEANER_HEADERS
#include <apt-pkg/pkgcache.h>
+#endif
+
+#include <string>
+
+class pkgCache;
class pkgArchiveCleaner
{
diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc
index 20210ec0a..096d3bcf5 100644
--- a/apt-pkg/contrib/cdromutl.cc
+++ b/apt-pkg/contrib/cdromutl.cc
@@ -19,7 +19,10 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/strutl.h>
-#include <sys/wait.h>
+#include <stdlib.h>
+#include <string.h>
+#include <iostream>
+#include <string>
#include <sys/statvfs.h>
#include <dirent.h>
#include <fcntl.h>
diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc
index ed5800007..3799c822d 100644
--- a/apt-pkg/contrib/cmndline.cc
+++ b/apt-pkg/contrib/cmndline.cc
@@ -18,6 +18,11 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+
#include <apti18n.h>
/*}}}*/
using namespace std;
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 003fd01d8..00f6ad0f9 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -21,11 +21,18 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/init.h>
-
+#include <apt-pkg/macros.h>
+
+#include <ctype.h>
+#include <regex.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <algorithm>
+#include <string>
#include <vector>
#include <fstream>
-#include <iostream>
#include <apti18n.h>
diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc
index 2d25f5ed9..892cd4874 100644
--- a/apt-pkg/contrib/error.cc
+++ b/apt-pkg/contrib/error.cc
@@ -17,12 +17,14 @@
#include <apt-pkg/error.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <list>
#include <iostream>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
#include <string>
#include <cstring>
diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h
index c06e45ee4..919b1e6d4 100644
--- a/apt-pkg/contrib/error.h
+++ b/apt-pkg/contrib/error.h
@@ -46,6 +46,7 @@
#include <list>
#include <string>
+#include <stddef.h>
#include <stdarg.h>
class GlobalError /*{{{*/
@@ -73,7 +74,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool FatalE(const char *Function,const char *Description,...) __like_printf(3) __cold;
+ bool FatalE(const char *Function,const char *Description,...) APT_PRINTF(3) APT_COLD;
/** \brief add an Error message with errno to the list
*
@@ -82,7 +83,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool Errno(const char *Function,const char *Description,...) __like_printf(3) __cold;
+ bool Errno(const char *Function,const char *Description,...) APT_PRINTF(3) APT_COLD;
/** \brief add a warning message with errno to the list
*
@@ -94,7 +95,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool WarningE(const char *Function,const char *Description,...) __like_printf(3) __cold;
+ bool WarningE(const char *Function,const char *Description,...) APT_PRINTF(3) APT_COLD;
/** \brief add a notice message with errno to the list
*
@@ -103,7 +104,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool NoticeE(const char *Function,const char *Description,...) __like_printf(3) __cold;
+ bool NoticeE(const char *Function,const char *Description,...) APT_PRINTF(3) APT_COLD;
/** \brief add a debug message with errno to the list
*
@@ -112,7 +113,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool DebugE(const char *Function,const char *Description,...) __like_printf(3) __cold;
+ bool DebugE(const char *Function,const char *Description,...) APT_PRINTF(3) APT_COLD;
/** \brief adds an errno message with the given type
*
@@ -121,7 +122,7 @@ public: /*{{{*/
* \param Description of the error
*/
bool InsertErrno(MsgType const &type, const char* Function,
- const char* Description,...) __like_printf(4) __cold;
+ const char* Description,...) APT_PRINTF(4) APT_COLD;
/** \brief adds an errno message with the given type
*
@@ -155,7 +156,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool Fatal(const char *Description,...) __like_printf(2) __cold;
+ bool Fatal(const char *Description,...) APT_PRINTF(2) APT_COLD;
/** \brief add an Error message to the list
*
@@ -163,7 +164,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool Error(const char *Description,...) __like_printf(2) __cold;
+ bool Error(const char *Description,...) APT_PRINTF(2) APT_COLD;
/** \brief add a warning message to the list
*
@@ -174,7 +175,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool Warning(const char *Description,...) __like_printf(2) __cold;
+ bool Warning(const char *Description,...) APT_PRINTF(2) APT_COLD;
/** \brief add a notice message to the list
*
@@ -187,7 +188,7 @@ public: /*{{{*/
*
* \return \b false
*/
- bool Notice(const char *Description,...) __like_printf(2) __cold;
+ bool Notice(const char *Description,...) APT_PRINTF(2) APT_COLD;
/** \brief add a debug message to the list
*
@@ -195,14 +196,14 @@ public: /*{{{*/
*
* \return \b false
*/
- bool Debug(const char *Description,...) __like_printf(2) __cold;
+ bool Debug(const char *Description,...) APT_PRINTF(2) APT_COLD;
/** \brief adds an error message with the given type
*
* \param type of the error message
* \param Description of the error
*/
- bool Insert(MsgType const &type, const char* Description,...) __like_printf(3) __cold;
+ bool Insert(MsgType const &type, const char* Description,...) APT_PRINTF(3) APT_COLD;
/** \brief adds an error message with the given type
*
@@ -218,7 +219,7 @@ public: /*{{{*/
* should call this method again in that case
*/
bool Insert(MsgType type, const char* Description,
- va_list &args, size_t &msgSize) __cold;
+ va_list &args, size_t &msgSize) APT_COLD;
/** \brief is an error in the list?
*
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 464950abd..55ba41128 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -26,16 +26,22 @@
#include <apt-pkg/sptr.h>
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
-
+#include <apt-pkg/macros.h>
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <sys/select.h>
+#include <time.h>
+#include <string>
+#include <vector>
#include <cstdlib>
#include <cstring>
#include <cstdio>
-
#include <iostream>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <dirent.h>
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h
index e752e9621..6fdea1294 100644
--- a/apt-pkg/contrib/fileutl.h
+++ b/apt-pkg/contrib/fileutl.h
@@ -27,6 +27,7 @@
#include <string>
#include <vector>
#include <set>
+#include <time.h>
#include <zlib.h>
@@ -94,7 +95,7 @@ class FileFd
And as the auto-conversation converts a 'unsigned long *' to a 'bool'
instead of 'unsigned long long *' we need to provide this explicitely -
otherwise applications magically start to fail… */
- __deprecated bool Read(void *To,unsigned long long Size,unsigned long *Actual)
+ bool Read(void *To,unsigned long long Size,unsigned long *Actual) APT_DEPRECATED
{
unsigned long long R;
bool const T = Read(To, Size, &R);
@@ -118,7 +119,7 @@ class FileFd
// Simple manipulators
inline int Fd() {return iFd;};
inline void Fd(int fd) { OpenDescriptor(fd, ReadWrite);};
- __deprecated gzFile gzFd();
+ gzFile gzFd() APT_DEPRECATED;
inline bool IsOpen() {return iFd >= 0;};
inline bool Failed() {return (Flags & Fail) == Fail;};
@@ -152,8 +153,8 @@ class FileFd
bool OpenInternDescriptor(unsigned int const Mode, APT::Configuration::Compressor const &compressor);
// private helpers to set Fail flag and call _error->Error
- bool FileFdErrno(const char* Function, const char* Description,...) __like_printf(3) __cold;
- bool FileFdError(const char* Description,...) __like_printf(2) __cold;
+ bool FileFdErrno(const char* Function, const char* Description,...) APT_PRINTF(3) APT_COLD;
+ bool FileFdError(const char* Description,...) APT_PRINTF(2) APT_COLD;
};
bool RunScripts(const char *Cnf);
@@ -161,7 +162,7 @@ bool CopyFile(FileFd &From,FileFd &To);
int GetLock(std::string File,bool Errors = true);
bool FileExists(std::string File);
bool RealFileExists(std::string File);
-bool DirectoryExists(std::string const &Path) __attrib_const;
+bool DirectoryExists(std::string const &Path) APT_CONST;
bool CreateDirectory(std::string const &Parent, std::string const &Path);
time_t GetModificationTime(std::string const &Path);
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc
index 9de227062..f24dd9640 100644
--- a/apt-pkg/contrib/gpgv.cc
+++ b/apt-pkg/contrib/gpgv.cc
@@ -2,21 +2,23 @@
// Include Files /*{{{*/
#include<config.h>
+#include<apt-pkg/configuration.h>
+#include<apt-pkg/error.h>
+#include<apt-pkg/strutl.h>
+#include<apt-pkg/fileutl.h>
+#include<apt-pkg/gpgv.h>
+
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-
-#include<apt-pkg/configuration.h>
-#include<apt-pkg/error.h>
-#include<apt-pkg/strutl.h>
-#include<apt-pkg/fileutl.h>
-#include<apt-pkg/gpgv.h>
+#include <stddef.h>
+#include <iostream>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/contrib/gpgv.h b/apt-pkg/contrib/gpgv.h
index d9712d6a8..ab3c68de5 100644
--- a/apt-pkg/contrib/gpgv.h
+++ b/apt-pkg/contrib/gpgv.h
@@ -9,17 +9,17 @@
#ifndef CONTRIB_GPGV_H
#define CONTRIB_GPGV_H
+#include <apt-pkg/macros.h>
+
#include <string>
#include <vector>
+#ifndef APT_10_CLEANER_HEADERS
#include <apt-pkg/fileutl.h>
-
-#if __GNUC__ >= 4
- #define APT_noreturn __attribute__ ((noreturn))
-#else
- #define APT_noreturn /* no support */
#endif
+class FileFd;
+
/** \brief generates and run the command to verify a file with gpgv
*
* If File and FileSig specify the same file it is assumed that we
@@ -40,15 +40,13 @@
* @param FileSig is the signature (detached or clear-signed)
*/
void ExecGPGV(std::string const &File, std::string const &FileSig,
- int const &statusfd, int fd[2]) APT_noreturn;
+ int const &statusfd, int fd[2]) APT_NORETURN;
inline void ExecGPGV(std::string const &File, std::string const &FileSig,
int const &statusfd = -1) {
int fd[2];
ExecGPGV(File, FileSig, statusfd, fd);
}
-#undef APT_noreturn
-
/** \brief Split an inline signature into message and signature
*
* Takes a clear-signed message and puts the first signed message
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index 890573d9c..5efafa511 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -16,8 +16,12 @@
#include <apt-pkg/hashes.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/macros.h>
+#include <apt-pkg/md5.h>
+#include <apt-pkg/sha1.h>
+#include <apt-pkg/sha2.h>
+#include <stddef.h>
+#include <algorithm>
#include <unistd.h>
#include <string>
#include <iostream>
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 636cad257..979ee1eb8 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -17,17 +17,22 @@
#include <apt-pkg/md5.h>
#include <apt-pkg/sha1.h>
#include <apt-pkg/sha2.h>
-#include <apt-pkg/fileutl.h>
-#include <algorithm>
-#include <vector>
#include <cstring>
-
+#include <string>
#ifndef APT_8_CLEANER_HEADERS
using std::min;
using std::vector;
#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#include <algorithm>
+#include <vector>
+#endif
+
+
+class FileFd;
// helper class that contains hash function name
// and hash
diff --git a/apt-pkg/contrib/hashsum.cc b/apt-pkg/contrib/hashsum.cc
index d02177724..25ccc187d 100644
--- a/apt-pkg/contrib/hashsum.cc
+++ b/apt-pkg/contrib/hashsum.cc
@@ -1,6 +1,9 @@
// Cryptographic API Base
#include <config.h>
+#include <apt-pkg/fileutl.h>
+
+#include <algorithm>
#include <unistd.h>
#include "hashsum_template.h"
diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h
index f96188eb8..869dc5cb7 100644
--- a/apt-pkg/contrib/hashsum_template.h
+++ b/apt-pkg/contrib/hashsum_template.h
@@ -10,20 +10,24 @@
#ifndef APTPKG_HASHSUM_TEMPLATE_H
#define APTPKG_HASHSUM_TEMPLATE_H
-#include <apt-pkg/fileutl.h>
#include <string>
#include <cstring>
-#include <algorithm>
-#include <stdint.h>
#include <apt-pkg/strutl.h>
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#include <algorithm>
+#include <stdint.h>
+#endif
#ifndef APT_8_CLEANER_HEADERS
using std::string;
using std::min;
#endif
+class FileFd;
+
template<int N>
class HashSumValue
{
diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
index 294242e68..d97053553 100644
--- a/apt-pkg/contrib/macros.h
+++ b/apt-pkg/contrib/macros.h
@@ -71,13 +71,13 @@
#endif
#if APT_GCC_VERSION >= 0x0300
- #define APT_UNUSED __attribute__((unused))
+ #define APT_DEPRECATED __attribute__ ((deprecated))
#define APT_CONST __attribute__((const))
#define APT_PURE __attribute__((pure))
#define APT_NORETURN __attribute__((noreturn))
#define APT_PRINTF(n) __attribute__((format(printf, n, n + 1)))
#else
- #define APT_UNUSED
+ #define APT_DEPRECATED
#define APT_CONST
#define APT_PURE
#define APT_NORETURN
@@ -103,8 +103,8 @@
#define APT_COLD __attribute__ ((__cold__))
#define APT_HOT __attribute__ ((__hot__))
#else
- #define __cold
- #define __hot
+ #define APT_COLD
+ #define APT_HOT
#endif
#ifndef APT_10_CLEANER_HEADERS
diff --git a/apt-pkg/contrib/md5.cc b/apt-pkg/contrib/md5.cc
index 4351aeb22..b487a96f9 100644
--- a/apt-pkg/contrib/md5.cc
+++ b/apt-pkg/contrib/md5.cc
@@ -38,13 +38,9 @@
#include <config.h>
#include <apt-pkg/md5.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/macros.h>
+#include <stdint.h>
#include <string.h>
-#include <unistd.h>
-#include <netinet/in.h> // For htonl
-#include <inttypes.h>
/*}}}*/
// byteSwap - Swap bytes in a buffer /*{{{*/
diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h
index 195455645..f4992c223 100644
--- a/apt-pkg/contrib/md5.h
+++ b/apt-pkg/contrib/md5.h
@@ -23,14 +23,15 @@
#ifndef APTPKG_MD5_H
#define APTPKG_MD5_H
-
-#include <string>
-#include <cstring>
-#include <algorithm>
#include <stdint.h>
#include "hashsum_template.h"
+#ifndef APT_10_CLEANER_HEADERS
+#include <string>
+#include <cstring>
+#include <algorithm>
+#endif
#ifndef APT_8_CLEANER_HEADERS
using std::string;
using std::min;
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index 37acba340..b2a53a6cb 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -22,11 +22,11 @@
#include <apt-pkg/mmap.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/macros.h>
+#include <string>
#include <sys/mman.h>
-#include <sys/stat.h>
#include <unistd.h>
-#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>
#include <cstring>
diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc
index 32b146581..feaed67c8 100644
--- a/apt-pkg/contrib/netrc.cc
+++ b/apt-pkg/contrib/netrc.cc
@@ -15,14 +15,13 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/fileutl.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <stddef.h>
#include <pwd.h>
#include "netrc.h"
diff --git a/apt-pkg/contrib/netrc.h b/apt-pkg/contrib/netrc.h
index 6feb5b726..dbeb45386 100644
--- a/apt-pkg/contrib/netrc.h
+++ b/apt-pkg/contrib/netrc.h
@@ -16,6 +16,8 @@
#include <string>
+#include <apt-pkg/macros.h>
+
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/strutl.h>
#endif
@@ -25,9 +27,9 @@
class URI;
-// kill this export on the next ABI break - strongly doubt its in use anyway
+// FIXME: kill this export on the next ABI break - strongly doubt its in use anyway
// outside of the apt itself, its really a internal interface
-__deprecated int parsenetrc (char *host, char *login, char *password, char *filename);
+APT_DEPRECATED int parsenetrc (char *host, char *login, char *password, char *filename);
void maybe_add_auth (URI &Uri, std::string NetRCFile);
#endif
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc
index 9d74ed495..4ff4f181d 100644
--- a/apt-pkg/contrib/progress.cc
+++ b/apt-pkg/contrib/progress.cc
@@ -14,6 +14,8 @@
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
+#include <sys/time.h>
+#include <string>
#include <iostream>
#include <stdio.h>
#include <cstring>
diff --git a/apt-pkg/contrib/sha1.cc b/apt-pkg/contrib/sha1.cc
index b5a6a2440..bf6bc6cb6 100644
--- a/apt-pkg/contrib/sha1.cc
+++ b/apt-pkg/contrib/sha1.cc
@@ -32,12 +32,9 @@
#include <config.h>
#include <apt-pkg/sha1.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/macros.h>
+#include <stdint.h>
#include <string.h>
-#include <unistd.h>
-#include <inttypes.h>
/*}}}*/
// SHA1Transform - Alters an existing SHA-1 hash /*{{{*/
diff --git a/apt-pkg/contrib/sha1.h b/apt-pkg/contrib/sha1.h
index a8d55eb13..5770c315a 100644
--- a/apt-pkg/contrib/sha1.h
+++ b/apt-pkg/contrib/sha1.h
@@ -14,12 +14,13 @@
#ifndef APTPKG_SHA1_H
#define APTPKG_SHA1_H
+#include "hashsum_template.h"
+
+#ifndef APT_10_CLEANER_HEADERS
#include <string>
#include <cstring>
#include <algorithm>
-
-#include "hashsum_template.h"
-
+#endif
#ifndef APT_8_CLEANER_HEADERS
using std::string;
using std::min;
diff --git a/apt-pkg/contrib/sha2.h b/apt-pkg/contrib/sha2.h
index 8e0c99a1b..a25ad4d32 100644
--- a/apt-pkg/contrib/sha2.h
+++ b/apt-pkg/contrib/sha2.h
@@ -14,14 +14,18 @@
#ifndef APTPKG_SHA2_H
#define APTPKG_SHA2_H
-#include <string>
#include <cstring>
-#include <algorithm>
-#include <stdint.h>
#include "sha2_internal.h"
#include "hashsum_template.h"
+#ifndef APT_10_CLEANER_HEADERS
+#include <string>
+#include <algorithm>
+#include <stdint.h>
+#endif
+
+
typedef HashSumValue<512> SHA512SumValue;
typedef HashSumValue<256> SHA256SumValue;
diff --git a/apt-pkg/contrib/sha2_internal.cc b/apt-pkg/contrib/sha2_internal.cc
index bb2560252..131ff5beb 100644
--- a/apt-pkg/contrib/sha2_internal.cc
+++ b/apt-pkg/contrib/sha2_internal.cc
@@ -33,6 +33,7 @@
*/
#include <config.h>
+#include <endian.h>
#include <string.h> /* memcpy()/memset() or bcopy()/bzero() */
#include <assert.h> /* assert() */
#include "sha2_internal.h"
diff --git a/apt-pkg/contrib/sha2_internal.h b/apt-pkg/contrib/sha2_internal.h
index d9d429c92..1b82d965d 100644
--- a/apt-pkg/contrib/sha2_internal.h
+++ b/apt-pkg/contrib/sha2_internal.h
@@ -44,6 +44,7 @@
#ifdef SHA2_USE_INTTYPES_H
+#include <stddef.h>
#include <inttypes.h>
#endif /* SHA2_USE_INTTYPES_H */
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 61fcc6a7d..2100ee47b 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -21,6 +21,11 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string>
+#include <vector>
#include <ctype.h>
#include <string.h>
#include <sstream>
@@ -33,9 +38,9 @@
#include <iconv.h>
#include <apti18n.h>
-
-using namespace std;
/*}}}*/
+using namespace std;
+
// Strip - Remove white space from the front and back of a string /*{{{*/
// ---------------------------------------------------------------------
namespace APT {
diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h
index 3a6d38b75..79479957d 100644
--- a/apt-pkg/contrib/strutl.h
+++ b/apt-pkg/contrib/strutl.h
@@ -18,15 +18,18 @@
#include <limits>
-#include <stdlib.h>
#include <string>
#include <cstring>
#include <vector>
#include <iostream>
#include <time.h>
+#include <stddef.h>
#include "macros.h"
+#ifndef APT_10_CLEANER_HEADERS
+#include <stdlib.h>
+#endif
#ifndef APT_8_CLEANER_HEADERS
using std::string;
using std::vector;
@@ -60,9 +63,9 @@ std::string Base64Encode(const std::string &Str);
std::string OutputInDepth(const unsigned long Depth, const char* Separator=" ");
std::string URItoFileName(const std::string &URI);
std::string TimeRFC1123(time_t Date);
-bool RFC1123StrToTime(const char* const str,time_t &time) __must_check;
-bool FTPMDTMStrToTime(const char* const str,time_t &time) __must_check;
-__deprecated bool StrToTime(const std::string &Val,time_t &Result);
+bool RFC1123StrToTime(const char* const str,time_t &time) APT_MUSTCHECK;
+bool FTPMDTMStrToTime(const char* const str,time_t &time) APT_MUSTCHECK;
+APT_DEPRECATED bool StrToTime(const std::string &Val,time_t &Result);
std::string LookupTag(const std::string &Message,const char *Tag,const char *Default = 0);
int StringToBool(const std::string &Text,int Default = -1);
bool ReadMessages(int Fd, std::vector<std::string> &List);
@@ -76,7 +79,7 @@ bool TokSplitString(char Tok,char *Input,char **List,
unsigned long ListMax);
// split a given string by a char
-std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) __attrib_const;
+std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) APT_CONST;
/* \brief Return a vector of strings from string "input" where "sep"
* is used as the delimiter string.
@@ -94,13 +97,13 @@ std::vector<std::string> VectorizeString(std::string const &haystack, char const
*/
std::vector<std::string> StringSplit(std::string const &input,
std::string const &sep,
- unsigned int maxsplit=std::numeric_limits<unsigned int>::max()) __attrib_const;
+ unsigned int maxsplit=std::numeric_limits<unsigned int>::max()) APT_CONST;
-void ioprintf(std::ostream &out,const char *format,...) __like_printf(2);
-void strprintf(std::string &out,const char *format,...) __like_printf(2);
-char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3);
+void ioprintf(std::ostream &out,const char *format,...) APT_PRINTF(2);
+void strprintf(std::string &out,const char *format,...) APT_PRINTF(2);
+char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_PRINTF(3);
bool CheckDomainList(const std::string &Host, const std::string &List);
-int tolower_ascii(int const c) __attrib_const __hot;
+int tolower_ascii(int const c) APT_CONST APT_HOT;
std::string StripEpoch(const std::string &VerStr);
#define APT_MKSTRCMP(name,func) \
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index 909dfcf47..1b35d0d52 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -15,7 +15,6 @@
#include <apt-pkg/debsrcrecords.h>
#include <apt-pkg/deblistparser.h>
#include <apt-pkg/debrecords.h>
-#include <apt-pkg/sourcelist.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/error.h>
@@ -23,7 +22,18 @@
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/debmetaindex.h>
#include <apt-pkg/gpgv.h>
-
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcachegen.h>
+#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/srcrecords.h>
+
+#include <stdio.h>
+#include <iostream>
+#include <string>
#include <sys/stat.h>
/*}}}*/
diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h
index e079d40c2..3bcb3b64f 100644
--- a/apt-pkg/deb/debindexfile.h
+++ b/apt-pkg/deb/debindexfile.h
@@ -16,9 +16,17 @@
#ifndef PKGLIB_DEBINDEXFILE_H
#define PKGLIB_DEBINDEXFILE_H
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/srcrecords.h>
+#include <string>
+
+class OpProgress;
+class pkgAcquire;
+class pkgCacheGenerator;
-#include <apt-pkg/indexfile.h>
class debStatusIndex : public pkgIndexFile
{
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 3374865ac..7777d654e 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -21,8 +21,17 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/crc-16.h>
#include <apt-pkg/md5.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/tagfile.h>
#include <apt-pkg/macros.h>
+#include <stddef.h>
+#include <string.h>
+#include <algorithm>
+#include <string>
+#include <vector>
#include <ctype.h>
/*}}}*/
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 0531b20f3..c0973260f 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -13,11 +13,18 @@
#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/tagfile.h>
+#include <apt-pkg/md5.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <string>
+#include <vector>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/indexfile.h>
#endif
+class FileFd;
+
class debListParser : public pkgCacheGenerator::ListParser
{
public:
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 504877558..6fd12add8 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -9,8 +9,15 @@
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/indexrecords.h>
#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/error.h>
-
+#include <apt-pkg/hashes.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/metaindex.h>
+
+#include <string.h>
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
#include <set>
#include <algorithm>
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h
index cef8d68f7..2286fa8b2 100644
--- a/apt-pkg/deb/debmetaindex.h
+++ b/apt-pkg/deb/debmetaindex.h
@@ -3,7 +3,7 @@
#define PKGLIB_DEBMETAINDEX_H
#include <apt-pkg/metaindex.h>
-#include <apt-pkg/init.h>
+#include <apt-pkg/macros.h>
#include <map>
#include <string>
@@ -12,6 +12,12 @@
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/sourcelist.h>
#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/init.h>
+#endif
+
+class pkgAcquire;
+class pkgIndexFile;
class debReleaseIndex : public metaIndex {
public:
diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc
index 184c07c33..6063db5a8 100644
--- a/apt-pkg/deb/debrecords.cc
+++ b/apt-pkg/deb/debrecords.cc
@@ -12,10 +12,16 @@
#include <apt-pkg/debrecords.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/tagfile.h>
+#include <string.h>
+#include <algorithm>
+#include <string>
+#include <vector>
#include <langinfo.h>
/*}}}*/
diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h
index b5e3bbdba..bdac6c90b 100644
--- a/apt-pkg/deb/debrecords.h
+++ b/apt-pkg/deb/debrecords.h
@@ -17,6 +17,9 @@
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <string>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/indexfile.h>
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index daa54d036..b09588dd3 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -15,12 +15,19 @@
#include <apt-pkg/debsrcrecords.h>
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/configuration.h>
#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/srcrecords.h>
+#include <apt-pkg/tagfile.h>
-using std::max;
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <algorithm>
+#include <string>
+#include <vector>
/*}}}*/
+using std::max;
using std::string;
// SrcRecordParser::Binaries - Return the binaries field /*{{{*/
diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h
index a8fb465bb..b65d1480b 100644
--- a/apt-pkg/deb/debsrcrecords.h
+++ b/apt-pkg/deb/debsrcrecords.h
@@ -11,11 +11,16 @@
#ifndef PKGLIB_DEBSRCRECORDS_H
#define PKGLIB_DEBSRCRECORDS_H
-
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/fileutl.h>
+#include <stddef.h>
+#include <string>
+#include <vector>
+
+class pkgIndexFile;
+
class debSrcRecordParser : public pkgSrcRecords::Parser
{
/** \brief dpointer placeholder (for later in case we need it) */
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index b95ff15df..db557e537 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -19,7 +19,14 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <sys/types.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+#include <vector>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>
diff --git a/apt-pkg/deb/debsystem.h b/apt-pkg/deb/debsystem.h
index 855123516..a945f68fb 100644
--- a/apt-pkg/deb/debsystem.h
+++ b/apt-pkg/deb/debsystem.h
@@ -12,11 +12,19 @@
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <vector>
+class Configuration;
+class pkgIndexFile;
+class pkgPackageManager;
class debSystemPrivate;
-class debStatusIndex;
class pkgDepCache;
+#ifndef APT_10_CLEANER_HEADERS
+class debStatusIndex;
+#endif
+
class debSystem : public pkgSystem
{
// private d-pointer
diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc
index 74e2552ff..a5eacb7f5 100644
--- a/apt-pkg/deb/debversion.cc
+++ b/apt-pkg/deb/debversion.cc
@@ -15,6 +15,8 @@
#include <apt-pkg/debversion.h>
#include <apt-pkg/pkgcache.h>
+#include <string.h>
+#include <string>
#include <stdlib.h>
#include <ctype.h>
/*}}}*/
diff --git a/apt-pkg/deb/debversion.h b/apt-pkg/deb/debversion.h
index f1d6f3cc5..981ea9ad2 100644
--- a/apt-pkg/deb/debversion.h
+++ b/apt-pkg/deb/debversion.h
@@ -12,12 +12,12 @@
#ifndef PKGLIB_DEBVERSION_H
#define PKGLIB_DEBVERSION_H
+#include <apt-pkg/version.h>
+#include <string>
-#include <apt-pkg/version.h>
-
class debVersioningSystem : public pkgVersioningSystem
-{
+{
public:
static int CmpFragment(const char *A, const char *AEnd, const char *B,
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index adf59516e..9fee7c923 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -10,41 +10,45 @@
// Includes /*{{{*/
#include <config.h>
-#include <apt-pkg/dpkgpm.h>
-#include <apt-pkg/error.h>
+#include <apt-pkg/cachefile.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/depcache.h>
-#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/dpkgpm.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/cachefile.h>
-#include <apt-pkg/packagemanager.h>
#include <apt-pkg/install-progress.h>
+#include <apt-pkg/packagemanager.h>
+#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
-#include <unistd.h>
-#include <stdlib.h>
+#include <errno.h>
#include <fcntl.h>
+#include <grp.h>
+#include <pty.h>
+#include <pwd.h>
+#include <signal.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/stat.h>
-#include <sys/types.h>
+#include <sys/time.h>
#include <sys/wait.h>
-#include <signal.h>
-#include <errno.h>
-#include <string.h>
-#include <stdio.h>
-#include <string.h>
-#include <algorithm>
-#include <sstream>
-#include <map>
-#include <pwd.h>
-#include <grp.h>
-#include <iomanip>
-
#include <termios.h>
+#include <time.h>
#include <unistd.h>
-#include <sys/ioctl.h>
-#include <pty.h>
-#include <stdio.h>
+#include <algorithm>
+#include <cstring>
+#include <iostream>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index c144f78e1..859c74b46 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -11,11 +11,20 @@
#define PKGLIB_DPKGPM_H
#include <apt-pkg/packagemanager.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/macros.h>
+
#include <vector>
#include <map>
#include <stdio.h>
-#include <apt-pkg/macros.h>
+#include <string>
+
+#ifndef APT_10_CLEANER_HEADERS
#include <apt-pkg/init.h>
+#endif
+
+class pkgDepCache;
+namespace APT { namespace Progress { class PackageManager; } }
#ifndef APT_8_CLEANER_HEADERS
using std::vector;
@@ -82,7 +91,7 @@ class pkgDPkgPM : public pkgPackageManager
// Helpers
bool RunScriptsWithPkgs(const char *Cnf);
- __deprecated bool SendV2Pkgs(FILE *F);
+ APT_DEPRECATED bool SendV2Pkgs(FILE *F);
bool SendPkgsInfo(FILE * const F, unsigned int const &Version);
void WriteHistoryTag(std::string const &tag, std::string value);
std::string ExpandShortPackageName(pkgDepCache &Cache,
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index b45f5d9b5..149dbc0e7 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -11,20 +11,26 @@
#include<config.h>
#include <apt-pkg/depcache.h>
-#include <apt-pkg/version.h>
#include <apt-pkg/versionmatch.h>
#include <apt-pkg/error.h>
#include <apt-pkg/sptr.h>
-#include <apt-pkg/algorithms.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/cacheset.h>
-
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/macros.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <list>
+#include <string>
+#include <utility>
+#include <vector>
#include <algorithm>
#include <iostream>
#include <sstream>
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 50f810806..3ffc3b47d 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -40,18 +40,26 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <stddef.h>
-#include <vector>
#include <memory>
-#include <set>
#include <list>
+#include <string>
+#include <utility>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/progress.h>
#include <apt-pkg/error.h>
#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <set>
+#include <vector>
+#endif
class OpProgress;
+class pkgVersioningSystem;
class pkgDepCache : protected pkgCache::Namespace
{
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index dbd2dba46..ee42267bc 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -11,16 +11,25 @@
#include <apt-pkg/error.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/policy.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/progress.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/strutl.h>
-#include <limits>
+#include <ctype.h>
+#include <stddef.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
#include <stdio.h>
-
+#include <iostream>
+#include <vector>
+#include <limits>
#include <string>
+#include <list>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h
index 828ee3753..ae20ed7db 100644
--- a/apt-pkg/edsp.h
+++ b/apt-pkg/edsp.h
@@ -9,8 +9,11 @@
#ifndef PKGLIB_EDSP_H
#define PKGLIB_EDSP_H
-#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheset.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <stdio.h>
#include <list>
#include <string>
diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc
index 80b9f79ea..10313fd61 100644
--- a/apt-pkg/edsp/edspindexfile.cc
+++ b/apt-pkg/edsp/edspindexfile.cc
@@ -10,15 +10,20 @@
#include <apt-pkg/edspindexfile.h>
#include <apt-pkg/edsplistparser.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/progress.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/debindexfile.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcachegen.h>
+#include <apt-pkg/pkgrecords.h>
-#include <sys/stat.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <string>
/*}}}*/
// edspIndex::edspIndex - Constructor /*{{{*/
diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h
index de10f2d2f..bd3b41cf2 100644
--- a/apt-pkg/edsp/edspindexfile.h
+++ b/apt-pkg/edsp/edspindexfile.h
@@ -9,11 +9,15 @@
#define PKGLIB_EDSPINDEXFILE_H
#include <apt-pkg/debindexfile.h>
+#include <string>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/indexfile.h>
#endif
+class OpProgress;
+class pkgCacheGenerator;
+
class edspIndex : public debStatusIndex
{
/** \brief dpointer placeholder (for later in case we need it) */
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index 37959f37b..139deb9f1 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -12,11 +12,13 @@
#include <config.h>
#include <apt-pkg/edsplistparser.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/md5.h>
-#include <apt-pkg/macros.h>
+#include <apt-pkg/deblistparser.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/tagfile.h>
+
+#include <string>
/*}}}*/
// ListParser::edspListParser - Constructor /*{{{*/
diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h
index a7bf9de95..959fb587f 100644
--- a/apt-pkg/edsp/edsplistparser.h
+++ b/apt-pkg/edsp/edsplistparser.h
@@ -12,6 +12,10 @@
#define PKGLIB_EDSPLISTPARSER_H
#include <apt-pkg/deblistparser.h>
+#include <apt-pkg/md5.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <string>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/pkgcachegen.h>
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc
index b509fa001..92edb8d77 100644
--- a/apt-pkg/edsp/edspsystem.cc
+++ b/apt-pkg/edsp/edspsystem.cc
@@ -11,16 +11,17 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/edspsystem.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/debversion.h>
#include <apt-pkg/edspindexfile.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/error.h>
+#include <apt-pkg/edspsystem.h>
#include <apt-pkg/fileutl.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <stddef.h>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/edsp/edspsystem.h b/apt-pkg/edsp/edspsystem.h
index ca703fa84..eafff39ba 100644
--- a/apt-pkg/edsp/edspsystem.h
+++ b/apt-pkg/edsp/edspsystem.h
@@ -11,8 +11,17 @@
#define PKGLIB_EDSPSYSTEM_H
#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcache.h>
+#include <vector>
+
+class Configuration;
+class pkgDepCache;
+class pkgIndexFile;
+class pkgPackageManager;
class edspIndex;
+
class edspSystem : public pkgSystem
{
/** \brief dpointer placeholder (for later in case we need it) */
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index 59afa86ec..3a1385fa5 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -20,17 +20,17 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/tagfile.h>
#include <apt-pkg/indexrecords.h>
-#include <apt-pkg/md5.h>
#include <apt-pkg/cdrom.h>
+#include <apt-pkg/gpgv.h>
+#include <apt-pkg/hashes.h>
#include <iostream>
#include <sstream>
#include <unistd.h>
#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "indexcopy.h"
#include <apti18n.h>
diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h
index e6a07a887..43cdb3f0a 100644
--- a/apt-pkg/indexcopy.h
+++ b/apt-pkg/indexcopy.h
@@ -14,16 +14,18 @@
#include <string>
#include <stdio.h>
-#include <apt-pkg/gpgv.h>
#include <apt-pkg/macros.h>
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/gpgv.h>
+class FileFd;
+#endif
#ifndef APT_8_CLEANER_HEADERS
using std::string;
using std::vector;
#endif
class pkgTagSection;
-class FileFd;
class indexRecords;
class pkgCdromStatus;
@@ -99,9 +101,9 @@ class SigVerify /*{{{*/
bool CopyAndVerify(std::string CDROM,std::string Name,std::vector<std::string> &SigList,
std::vector<std::string> PkgList,std::vector<std::string> SrcList);
- __deprecated static bool RunGPGV(std::string const &File, std::string const &FileOut,
+ APT_DEPRECATED static bool RunGPGV(std::string const &File, std::string const &FileOut,
int const &statusfd, int fd[2]);
- __deprecated static bool RunGPGV(std::string const &File, std::string const &FileOut,
+ APT_DEPRECATED static bool RunGPGV(std::string const &File, std::string const &FileOut,
int const &statusfd = -1);
};
/*}}}*/
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 875c80336..89615cb41 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -13,7 +13,13 @@
#include <apt-pkg/indexfile.h>
#include <apt-pkg/error.h>
#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/srcrecords.h>
+#include <apt-pkg/macros.h>
+#include <string>
+#include <vector>
#include <clocale>
#include <cstring>
/*}}}*/
@@ -82,7 +88,7 @@ bool pkgIndexFile::TranslationsAvailable() {
is already done in getLanguages(). Note also that this check is
rather bad (doesn't take three character like ast into account).
TODO: Remove method with next API break */
-__attribute__ ((deprecated)) bool pkgIndexFile::CheckLanguageCode(const char *Lang)
+APT_DEPRECATED bool pkgIndexFile::CheckLanguageCode(const char *Lang)
{
if (strlen(Lang) == 2 || (strlen(Lang) == 5 && Lang[2] == '_'))
return true;
@@ -98,7 +104,7 @@ __attribute__ ((deprecated)) bool pkgIndexFile::CheckLanguageCode(const char *La
/* As we have now possibly more than one LanguageCode this method is
supersided by a) private classmembers or b) getLanguages().
TODO: Remove method with next API break */
-__attribute__ ((deprecated)) std::string pkgIndexFile::LanguageCode() {
+APT_DEPRECATED std::string pkgIndexFile::LanguageCode() {
if (TranslationsAvailable() == false)
return "";
return APT::Configuration::getLanguages()[0];
diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h
index 9a5c74200..98cdda603 100644
--- a/apt-pkg/indexfile.h
+++ b/apt-pkg/indexfile.h
@@ -22,18 +22,21 @@
#ifndef PKGLIB_INDEXFILE_H
#define PKGLIB_INDEXFILE_H
-
-#include <string>
-#include <apt-pkg/pkgcache.h>
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/macros.h>
+#include <string>
+
#ifndef APT_8_CLEANER_HEADERS
using std::string;
#endif
-
+#ifndef APT_10_CLEANER_HEADERS
class pkgAcquire;
+#endif
+
class pkgCacheGenerator;
class OpProgress;
@@ -79,10 +82,10 @@ class pkgIndexFile
virtual bool HasPackages() const = 0;
virtual unsigned long Size() const = 0;
virtual bool Merge(pkgCacheGenerator &/*Gen*/, OpProgress* /*Prog*/) const { return false; };
- __deprecated virtual bool Merge(pkgCacheGenerator &Gen, OpProgress &Prog) const
+ APT_DEPRECATED virtual bool Merge(pkgCacheGenerator &Gen, OpProgress &Prog) const
{ return Merge(Gen, &Prog); };
virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/,OpProgress* /*Prog*/) const {return true;};
- __deprecated virtual bool MergeFileProvides(pkgCacheGenerator &Gen, OpProgress &Prog) const
+ APT_DEPRECATED virtual bool MergeFileProvides(pkgCacheGenerator &Gen, OpProgress &Prog) const
{return MergeFileProvides(Gen, &Prog);};
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index c1c397e31..1123d1690 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -14,8 +14,13 @@
#include <apt-pkg/hashes.h>
#include <apt-pkg/gpgv.h>
-#include <sys/stat.h>
+#include <stdlib.h>
+#include <time.h>
#include <clocale>
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h
index d003ec0fa..e31f889ad 100644
--- a/apt-pkg/indexrecords.h
+++ b/apt-pkg/indexrecords.h
@@ -5,17 +5,19 @@
#ifndef PKGLIB_INDEXRECORDS_H
#define PKGLIB_INDEXRECORDS_H
-
-#include <apt-pkg/pkgcache.h>
#include <apt-pkg/hashes.h>
#include <map>
#include <vector>
#include <ctime>
+#include <string>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/fileutl.h>
#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/pkgcache.h>
+#endif
class indexRecords
{
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 6ab5ec42d..3a35f852e 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -15,9 +15,11 @@
#include <apt-pkg/error.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <string.h>
+#include <string>
#include <cstdlib>
-#include <sys/stat.h>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/init.h b/apt-pkg/init.h
index 4ee7a95ac..d062392e3 100644
--- a/apt-pkg/init.h
+++ b/apt-pkg/init.h
@@ -16,7 +16,9 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgsystem.h>
#endif
+#ifndef APT_10_CLEANER_HEADERS
#include <apt-pkg/macros.h>
+#endif
class pkgSystem;
class Configuration;
diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc
index 657330b60..6f43e0bc0 100644
--- a/apt-pkg/install-progress.cc
+++ b/apt-pkg/install-progress.cc
@@ -1,17 +1,23 @@
+#include <config.h>
+
#include <apt-pkg/configuration.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/install-progress.h>
-#include <apti18n.h>
-
-#include <termios.h>
+#include <signal.h>
+#include <unistd.h>
+#include <iostream>
+#include <string>
+#include <vector>
#include <sys/ioctl.h>
#include <sstream>
#include <fcntl.h>
#include <algorithm>
#include <stdio.h>
+#include <apti18n.h>
+
namespace APT {
namespace Progress {
@@ -329,15 +335,15 @@ bool PackageManagerFancy::StatusChanged(std::string PackageName,
int row = GetNumberTerminalRows();
- static string save_cursor = "\033[s";
- static string restore_cursor = "\033[u";
-
- static string set_bg_color = "\033[42m"; // green
- static string set_fg_color = "\033[30m"; // black
-
- static string restore_bg = "\033[49m";
- static string restore_fg = "\033[39m";
-
+ static std::string save_cursor = "\033[s";
+ static std::string restore_cursor = "\033[u";
+
+ static std::string set_bg_color = "\033[42m"; // green
+ static std::string set_fg_color = "\033[30m"; // black
+
+ static std::string restore_bg = "\033[49m";
+ static std::string restore_fg = "\033[39m";
+
std::cout << save_cursor
// move cursor position to last row
<< "\033[" << row << ";0f"
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index 18a90a29d..ffabaadbf 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -1,12 +1,19 @@
#ifndef PKGLIB_METAINDEX_H
#define PKGLIB_METAINDEX_H
-
-#include <string>
-#include <apt-pkg/pkgcache.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/init.h>
+#include <stddef.h>
+
+#include <string>
+#include <vector>
+
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/pkgcache.h>
+class pkgCacheGenerator;
+class OpProgress;
+#endif
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/pkgrecords.h>
@@ -15,8 +22,6 @@ using std::string;
#endif
class pkgAcquire;
-class pkgCacheGenerator;
-class OpProgress;
class metaIndex
{
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc
index 21b5fc4e7..a1fcbcc98 100644
--- a/apt-pkg/orderlist.cc
+++ b/apt-pkg/orderlist.cc
@@ -68,10 +68,14 @@
#include <apt-pkg/orderlist.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/version.h>
#include <apt-pkg/sptr.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcache.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
#include <iostream>
/*}}}*/
diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h
index a2d7b321b..1fdfbf559 100644
--- a/apt-pkg/orderlist.h
+++ b/apt-pkg/orderlist.h
@@ -16,10 +16,12 @@
#ifndef PKGLIB_ORDERLIST_H
#define PKGLIB_ORDERLIST_H
-
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/macros.h>
+#include <string>
+
class pkgDepCache;
class pkgOrderList : protected pkgCache::Namespace
{
@@ -46,7 +48,7 @@ class pkgOrderList : protected pkgCache::Namespace
bool Debug;
// Main visit function
- __deprecated bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); };
+ APT_DEPRECATED bool VisitNode(PkgIterator Pkg) { return VisitNode(Pkg, "UNKNOWN"); };
bool VisitNode(PkgIterator Pkg, char const* from);
bool VisitDeps(DepFunc F,PkgIterator Pkg);
bool VisitRDeps(DepFunc F,PkgIterator Pkg);
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 0be76b311..4d08fb3ba 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -13,7 +13,7 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#include<config.h>
+#include <config.h>
#include <apt-pkg/packagemanager.h>
#include <apt-pkg/orderlist.h>
@@ -24,7 +24,14 @@
#include <apt-pkg/algorithms.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/sptr.h>
-
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/strutl.h>
+
+#include <stddef.h>
+#include <list>
+#include <string>
#include <iostream>
#include <apti18n.h>
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h
index d684463eb..a86b176a4 100644
--- a/apt-pkg/packagemanager.h
+++ b/apt-pkg/packagemanager.h
@@ -23,15 +23,17 @@
#ifndef PKGLIB_PACKAGEMANAGER_H
#define PKGLIB_PACKAGEMANAGER_H
-#include <apt-pkg/macros.h>
#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/install-progress.h>
#include <apt-pkg/init.h>
+#include <apt-pkg/macros.h>
#include <string>
-#include <iostream>
#include <set>
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/install-progress.h>
+#include <iostream>
+#endif
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/depcache.h>
using std::string;
@@ -109,7 +111,7 @@ class pkgPackageManager : protected pkgCache::Namespace
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
OrderResult DoInstall(APT::Progress::PackageManager *progress);
// compat
- __deprecated OrderResult DoInstall(int statusFd=-1);
+ APT_DEPRECATED OrderResult DoInstall(int statusFd=-1);
#else
OrderResult DoInstall(int statusFd=-1);
#endif
@@ -124,7 +126,7 @@ class pkgPackageManager : protected pkgCache::Namespace
// stuff that needs to be done after the fork
OrderResult DoInstallPostFork(APT::Progress::PackageManager *progress);
// compat
- __deprecated OrderResult DoInstallPostFork(int statusFd=-1);
+ APT_DEPRECATED OrderResult DoInstallPostFork(int statusFd=-1);
#else
OrderResult DoInstallPostFork(int statusFd=-1);
#endif
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 9c14e626e..a19b9571c 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -29,12 +29,15 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/mmap.h>
#include <apt-pkg/macros.h>
+#include <stddef.h>
+#include <string.h>
+#include <ostream>
+#include <vector>
#include <string>
#include <sys/stat.h>
-#include <unistd.h>
-#include <ctype.h>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 185b9ca45..525f1dfb4 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -18,20 +18,26 @@
#include <apt-pkg/progress.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/sptr.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/macros.h>
-#include <apt-pkg/tagfile.h>
#include <apt-pkg/metaindex.h>
#include <apt-pkg/fileutl.h>
-
+#include <apt-pkg/hashsum_template.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/md5.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <stddef.h>
+#include <string.h>
+#include <iostream>
+#include <string>
#include <vector>
#include <sys/stat.h>
#include <unistd.h>
-#include <errno.h>
-#include <stdio.h>
#include <apti18n.h>
/*}}}*/
@@ -1333,7 +1339,7 @@ DynamicMMap* pkgCacheGenerator::CreateDynamicMMap(FileFd *CacheF, unsigned long
the cache will be stored there. This is pretty much mandetory if you
are using AllowMem. AllowMem lets the function be run as non-root
where it builds the cache 'fast' into a memory buffer. */
-__deprecated bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
+APT_DEPRECATED bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress,
MMap **OutMap, bool AllowMem)
{ return pkgCacheGenerator::MakeStatusCache(List, &Progress, OutMap, AllowMem); }
bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
@@ -1534,7 +1540,7 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
// CacheGenerator::MakeOnlyStatusCache - Build only a status files cache/*{{{*/
// ---------------------------------------------------------------------
/* */
-__deprecated bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap)
+APT_DEPRECATED bool pkgMakeOnlyStatusCache(OpProgress &Progress,DynamicMMap **OutMap)
{ return pkgCacheGenerator::MakeOnlyStatusCache(&Progress, OutMap); }
bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
{
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index e8901025e..9ccf71c7b 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -19,16 +19,18 @@
#ifndef PKGLIB_PKGCACHEGEN_H
#define PKGLIB_PKGCACHEGEN_H
-
-#include <apt-pkg/pkgcache.h>
#include <apt-pkg/md5.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/macros.h>
#include <vector>
+#include <string>
+class FileFd;
class pkgSourceList;
class OpProgress;
-class MMap;
class pkgIndexFile;
class pkgCacheGenerator /*{{{*/
@@ -80,7 +82,7 @@ class pkgCacheGenerator /*{{{*/
bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver,
map_ptrloc const Version, unsigned int const &Op,
unsigned int const &Type, map_ptrloc* &OldDepLast);
- __deprecated unsigned long NewVersion(pkgCache::VerIterator &Ver,const std::string &VerStr,unsigned long Next)
+ unsigned long NewVersion(pkgCache::VerIterator &Ver,const std::string &VerStr,unsigned long Next) APT_DEPRECATED
{ return NewVersion(Ver, VerStr, 0, 0, Next); }
unsigned long NewVersion(pkgCache::VerIterator &Ver,const std::string &VerStr,
map_ptrloc const ParentPkg, unsigned long const Hash,
@@ -102,7 +104,7 @@ class pkgCacheGenerator /*{{{*/
bool HasFileDeps() {return FoundFileDeps;};
bool MergeFileProvides(ListParser &List);
- __deprecated bool FinishCache(OpProgress *Progress);
+ bool FinishCache(OpProgress *Progress) APT_DEPRECATED;
static bool MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
MMap **OutMap = 0,bool AllowMem = false);
diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc
index 36dab3480..c403e4dc3 100644
--- a/apt-pkg/pkgrecords.cc
+++ b/apt-pkg/pkgrecords.cc
@@ -14,7 +14,11 @@
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/configuration.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <stddef.h>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h
index ca0984bbf..b5237b3a0 100644
--- a/apt-pkg/pkgrecords.h
+++ b/apt-pkg/pkgrecords.h
@@ -17,8 +17,9 @@
#ifndef PKGLIB_PKGRECORDS_H
#define PKGLIB_PKGRECORDS_H
-
#include <apt-pkg/pkgcache.h>
+
+#include <string>
#include <vector>
class pkgRecords /*{{{*/
diff --git a/apt-pkg/pkgsystem.cc b/apt-pkg/pkgsystem.cc
index 05ba6e0e6..ee6c3f4ec 100644
--- a/apt-pkg/pkgsystem.cc
+++ b/apt-pkg/pkgsystem.cc
@@ -13,7 +13,6 @@
#include<config.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/policy.h>
#include <cassert>
#include <cstring>
/*}}}*/
diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h
index eb75df412..6e33c67ed 100644
--- a/apt-pkg/pkgsystem.h
+++ b/apt-pkg/pkgsystem.h
@@ -38,6 +38,7 @@
#define PKGLIB_PKGSYSTEM_H
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <vector>
@@ -50,7 +51,6 @@ class pkgPackageManager;
class pkgVersioningSystem;
class Configuration;
class pkgIndexFile;
-class PkgFileIterator;
class pkgSystem
{
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 2176f1f42..ae30b6f50 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -33,7 +33,15 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
#include <apt-pkg/sptr.h>
-
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/versionmatch.h>
+
+#include <ctype.h>
+#include <stddef.h>
+#include <string.h>
+#include <string>
+#include <vector>
#include <iostream>
#include <sstream>
diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h
index 5172a3c3b..f15d8c0a0 100644
--- a/apt-pkg/policy.h
+++ b/apt-pkg/policy.h
@@ -33,10 +33,13 @@
#ifndef PKGLIB_POLICY_H
#define PKGLIB_POLICY_H
-
#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/versionmatch.h>
+
#include <vector>
+#include <string>
#ifndef APT_8_CLEANER_HEADERS
using std::vector;
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 1f5179885..e37899ec6 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -18,7 +18,16 @@
#include <apt-pkg/metaindex.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/tagfile.h>
-
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <ctype.h>
+#include <stddef.h>
+#include <time.h>
+#include <cstring>
+#include <map>
+#include <string>
+#include <vector>
#include <fstream>
#include <algorithm>
diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h
index 0ccb4aa00..af7569375 100644
--- a/apt-pkg/sourcelist.h
+++ b/apt-pkg/sourcelist.h
@@ -27,18 +27,26 @@
#ifndef PKGLIB_SOURCELIST_H
#define PKGLIB_SOURCELIST_H
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <time.h>
+
#include <string>
#include <vector>
#include <map>
-#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/tagfile.h>
#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/tagfile.h>
+#endif
+#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/metaindex.h>
using std::string;
using std::vector;
#endif
+class FileFd;
+class pkgTagSection;
class pkgAcquire;
class pkgIndexFile;
class metaIndex;
diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
index 60b62850a..775cf2e5f 100644
--- a/apt-pkg/srcrecords.cc
+++ b/apt-pkg/srcrecords.cc
@@ -16,8 +16,13 @@
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/error.h>
#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/metaindex.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/macros.h>
+
+#include <string.h>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index e1459c80e..906321456 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -21,6 +21,8 @@
#include <string>
#include <stdio.h>
#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/update.cc b/apt-pkg/update.cc
index 97be5490b..5d5b19626 100644
--- a/apt-pkg/update.cc
+++ b/apt-pkg/update.cc
@@ -1,24 +1,17 @@
-
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/algorithms.h>
-#include <apt-pkg/update.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/edsp.h>
-#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/progress.h>
+#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/update.h>
-#include <sys/types.h>
-#include <cstdlib>
-#include <algorithm>
-#include <iostream>
-#include <stdio.h>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/upgrade.cc b/apt-pkg/upgrade.cc
index d6f6933dd..7926845c2 100644
--- a/apt-pkg/upgrade.cc
+++ b/apt-pkg/upgrade.cc
@@ -1,24 +1,17 @@
-
// Include Files /*{{{*/
#include <config.h>
#include <apt-pkg/algorithms.h>
-#include <apt-pkg/upgrade.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/sptr.h>
-#include <apt-pkg/acquire-item.h>
#include <apt-pkg/edsp.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/fileutl.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/progress.h>
+#include <apt-pkg/upgrade.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
-#include <sys/types.h>
-#include <cstdlib>
-#include <algorithm>
-#include <iostream>
-#include <stdio.h>
+#include <string>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-pkg/upgrade.h b/apt-pkg/upgrade.h
index 436d38300..aa883df10 100644
--- a/apt-pkg/upgrade.h
+++ b/apt-pkg/upgrade.h
@@ -10,6 +10,8 @@
#ifndef PKGLIB_UPGRADE_H
#define PKGLIB_UPGRADE_H
+class pkgDepCache;
+
namespace APT {
namespace Upgrade {
// FIXME: make this "enum class UpgradeMode {" once we enable c++11
diff --git a/apt-pkg/vendor.cc b/apt-pkg/vendor.cc
index f19534171..986636e97 100644
--- a/apt-pkg/vendor.cc
+++ b/apt-pkg/vendor.cc
@@ -1,10 +1,14 @@
#include<config.h>
-#include <iostream>
-#include <apt-pkg/error.h>
#include <apt-pkg/vendor.h>
#include <apt-pkg/configuration.h>
+#include <iostream>
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
+
Vendor::Vendor(std::string VendorID,
std::string Origin,
std::vector<struct Vendor::Fingerprint *> *FingerprintList)
diff --git a/apt-pkg/vendor.h b/apt-pkg/vendor.h
index 6484adf9b..2d2e2b0ae 100644
--- a/apt-pkg/vendor.h
+++ b/apt-pkg/vendor.h
@@ -11,7 +11,7 @@ using std::string;
#endif
// A class representing a particular software provider.
-class __deprecated Vendor
+class APT_DEPRECATED Vendor
{
public:
struct Fingerprint
diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc
index 602425624..fb33ff17d 100644
--- a/apt-pkg/vendorlist.cc
+++ b/apt-pkg/vendorlist.cc
@@ -3,9 +3,16 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
+
+#include <stddef.h>
+#include <iostream>
+#include <string>
+#include <vector>
+
#include <apti18n.h>
#if __GNUC__ >= 4
+ #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
@@ -157,5 +164,5 @@ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput) /*
/*}}}*/
#if __GNUC__ >= 4
- #pragma GCC diagnostic warning "-Wdeprecated-declarations"
+ #pragma GCC diagnostic pop
#endif
diff --git a/apt-pkg/vendorlist.h b/apt-pkg/vendorlist.h
index a86ccde7c..bc3702a93 100644
--- a/apt-pkg/vendorlist.h
+++ b/apt-pkg/vendorlist.h
@@ -27,7 +27,7 @@ using std::vector;
class Vendor;
class Configuration;
-class __deprecated pkgVendorList
+class APT_DEPRECATED pkgVendorList
{
protected:
std::vector<Vendor const *> VendorList;
diff --git a/apt-pkg/version.cc b/apt-pkg/version.cc
index cb2c34c0f..29bee46da 100644
--- a/apt-pkg/version.cc
+++ b/apt-pkg/version.cc
@@ -11,8 +11,8 @@
#include<config.h>
#include <apt-pkg/version.h>
-#include <apt-pkg/pkgcache.h>
+#include <string.h>
#include <stdlib.h>
/*}}}*/
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index 26262a010..284098bdf 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -16,11 +16,16 @@
#include <apt-pkg/versionmatch.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
#include <stdio.h>
#include <ctype.h>
#include <fnmatch.h>
-#include <sys/types.h>
#include <regex.h>
/*}}}*/
diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h
index 433396fc9..a889878ad 100644
--- a/apt-pkg/versionmatch.h
+++ b/apt-pkg/versionmatch.h
@@ -35,9 +35,10 @@
#ifndef PKGLIB_VERSIONMATCH_H
#define PKGLIB_VERSIONMATCH_H
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <string>
-#include <apt-pkg/pkgcache.h>
#ifndef APT_8_CLEANER_HEADERS
using std::string;
diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc
index d08ed072f..fe7a45e12 100644
--- a/apt-private/acqprogress.cc
+++ b/apt-private/acqprogress.cc
@@ -10,18 +10,21 @@
// Include files /*{{{*/
#include<config.h>
+#include <apt-pkg/acquire.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/acquire-worker.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/error.h>
+#include <apt-private/acqprogress.h>
+
+#include <string.h>
#include <stdio.h>
#include <signal.h>
#include <iostream>
#include <unistd.h>
-#include "acqprogress.h"
#include <apti18n.h>
/*}}}*/
diff --git a/apt-private/private-cachefile.cc b/apt-private/private-cachefile.cc
index c822b9bad..5e955ac39 100644
--- a/apt-private/private-cachefile.cc
+++ b/apt-private/private-cachefile.cc
@@ -4,11 +4,17 @@
#include <apt-pkg/algorithms.h>
#include <apt-pkg/upgrade.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
-#include <cstdlib>
+#include <apt-private/private-output.h>
+#include <apt-private/private-cachefile.h>
-#include "private-output.h"
-#include "private-cachefile.h"
+#include <string.h>
+#include <ostream>
+#include <cstdlib>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-private/private-cachefile.h b/apt-private/private-cachefile.h
index f24d93020..94d93df2c 100644
--- a/apt-private/private-cachefile.h
+++ b/apt-private/private-cachefile.h
@@ -3,6 +3,8 @@
#include <apt-pkg/cachefile.h>
#include <apt-pkg/progress.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/pkgcache.h>
// class CacheFile - Cover class for some dependency cache functions /*{{{*/
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc
index a7dc0e800..4a63c7e81 100644
--- a/apt-private/private-cacheset.cc
+++ b/apt-private/private-cacheset.cc
@@ -1,9 +1,18 @@
+#include <config.h>
+
#include <apt-pkg/cachefile.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/depcache.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/policy.h>
+
+#include <apt-private/private-cacheset.h>
+
+#include <stddef.h>
-#include "private-cacheset.h"
+#include <apti18n.h>
bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
LocalitySortedVersionSet &output_set,
diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h
index 26c7f1ac2..854d16922 100644
--- a/apt-private/private-cacheset.h
+++ b/apt-private/private-cacheset.h
@@ -1,17 +1,32 @@
#ifndef APT_PRIVATE_CACHESET_H
#define APT_PRIVATE_CACHESET_H
+#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/sptr.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/macros.h>
#include <algorithm>
#include <vector>
+#include <string.h>
+#include <list>
+#include <ostream>
+#include <set>
+#include <string>
+#include <utility>
#include "private-output.h"
#include <apti18n.h>
+class OpProgress;
+
struct VersionSortDescriptionLocality
{
bool operator () (const pkgCache::VerIterator &v_lhs,
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 132da04d5..2b2a35637 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -2,15 +2,13 @@
#include <config.h>
#include <apt-pkg/cmndline.h>
-#include <apt-pkg/configuration.h>
-#include <vector>
+#include <apt-private/private-cmndline.h>
+#include <vector>
#include <stdarg.h>
#include <string.h>
-#include "private-cmndline.h"
-
#include <apti18n.h>
/*}}}*/
diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc
index 80795f964..a095f0c67 100644
--- a/apt-private/private-download.cc
+++ b/apt-private/private-download.cc
@@ -7,10 +7,8 @@
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
-#include "private-output.h"
-#include "private-download.h"
-
-#include <locale.h>
+#include <apt-private/private-output.h>
+#include <apt-private/private-download.h>
#include <fstream>
#include <string>
diff --git a/apt-private/private-download.h b/apt-private/private-download.h
index b8cc8da1e..1447845ed 100644
--- a/apt-private/private-download.h
+++ b/apt-private/private-download.h
@@ -1,7 +1,7 @@
#ifndef APT_PRIVATE_DOWNLOAD_H
#define APT_PRIVATE_DOWNLOAD_H
-#include <apt-pkg/acquire.h>
+class pkgAcquire;
bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser);
bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failure, bool * const TransientNetworkFailure);
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index ff609f567..8092af939 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -1,57 +1,45 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/cmndline.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/depcache.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/algorithms.h>
+#include <apt-pkg/acquire.h>
#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/clean.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
+#include <apt-pkg/algorithms.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/sptr.h>
-#include <apt-pkg/md5.h>
-#include <apt-pkg/versionmatch.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/cmndline.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/install-progress.h>
-#include <apt-pkg/init.h>
+#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/sptr.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/packagemanager.h>
+#include <apt-pkg/pkgcache.h>
-#include <set>
-#include <locale.h>
-#include <langinfo.h>
-#include <fstream>
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
-#include <signal.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <regex.h>
-#include <sys/wait.h>
-#include <sstream>
+#include <algorithm>
+#include <iostream>
+#include <set>
+#include <vector>
-#include "private-install.h"
-#include "private-download.h"
-#include "private-cachefile.h"
-#include "private-output.h"
-#include "private-cacheset.h"
-#include "acqprogress.h"
+#include <apt-private/acqprogress.h>
+#include <apt-private/private-install.h>
+#include <apt-private/private-cachefile.h>
+#include <apt-private/private-cacheset.h>
+#include <apt-private/private-download.h>
+#include <apt-private/private-output.h>
#include <apti18n.h>
/*}}}*/
+class pkgSourceList;
// InstallPackages - Actually download and install the packages /*{{{*/
// ---------------------------------------------------------------------
diff --git a/apt-private/private-install.h b/apt-private/private-install.h
index 2187146d3..79769d470 100644
--- a/apt-private/private-install.h
+++ b/apt-private/private-install.h
@@ -1,15 +1,29 @@
#ifndef APT_PRIVATE_INSTALL_H
#define APT_PRIVATE_INSTALL_H
+#include <apt-pkg/cachefile.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/cmndline.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/algorithms.h>
+
+#include <stddef.h>
+#include <iosfwd>
+#include <list>
+#include <map>
+#include <string>
+#include <utility>
-#include "private-cachefile.h"
#include "private-output.h"
#include <apti18n.h>
+class CacheFile;
+class CommandLine;
+
#define RAMFS_MAGIC 0x858458f6
bool DoInstall(CommandLine &Cmd);
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc
index bc4539aeb..7664ca134 100644
--- a/apt-private/private-list.cc
+++ b/apt-private/private-list.cc
@@ -1,43 +1,28 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cachefilter.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cmndline.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/policy.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/algorithms.h>
-#include <apt-pkg/sptr.h>
-#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/metaindex.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <apt-private/private-cacheset.h>
+#include <apt-private/private-list.h>
+#include <apt-private/private-output.h>
+#include <iostream>
#include <sstream>
-#include <vector>
+#include <map>
+#include <string>
#include <utility>
-#include <cassert>
-#include <locale.h>
-#include <iostream>
-#include <unistd.h>
-#include <errno.h>
-#include <regex.h>
-#include <stdio.h>
-#include <algorithm>
-
-#include "private-cmndline.h"
-#include "private-list.h"
-#include "private-output.h"
-#include "private-cacheset.h"
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-private/private-list.h b/apt-private/private-list.h
index 6f5aad27a..749744dd1 100644
--- a/apt-private/private-list.h
+++ b/apt-private/private-list.h
@@ -1,7 +1,7 @@
#ifndef APT_PRIVATE_LIST_H
#define APT_PRIVATE_LIST_H
-#include <apt-pkg/cmndline.h>
+class CommandLine;
bool List(CommandLine &Cmd);
diff --git a/apt-private/private-main.cc b/apt-private/private-main.cc
index 1fdf3f0be..2d3965172 100644
--- a/apt-private/private-main.cc
+++ b/apt-private/private-main.cc
@@ -1,9 +1,13 @@
+#include <config.h>
-#include<unistd.h>
-#include<cstring>
-
+#include <apt-pkg/cmndline.h>
#include <apt-pkg/configuration.h>
-#include "private-main.h"
+
+#include <apt-private/private-main.h>
+
+#include <iostream>
+#include <string.h>
+#include <unistd.h>
#include <apti18n.h>
diff --git a/apt-private/private-main.h b/apt-private/private-main.h
index f9a95c4ec..257c51a0b 100644
--- a/apt-private/private-main.h
+++ b/apt-private/private-main.h
@@ -1,9 +1,8 @@
#ifndef APT_PRIVATE_MAIN_H
#define APT_PRIVATE_MAIN_H
-#include <apt-pkg/cmndline.h>
+class CommandLine;
void CheckSimulateMode(CommandLine &CmdL);
-
#endif
diff --git a/apt-private/private-moo.cc b/apt-private/private-moo.cc
index 9c4f6bf15..a87999150 100644
--- a/apt-private/private-moo.cc
+++ b/apt-private/private-moo.cc
@@ -13,11 +13,15 @@
#include <apt-pkg/cmndline.h>
#include <apt-pkg/strutl.h>
-#include <strings.h>
-#include <sstream>
+#include <apt-private/private-moo.h>
+#include <apt-private/private-output.h>
-#include "private-moo.h"
-#include "private-output.h"
+#include <stddef.h>
+#include <string.h>
+#include <time.h>
+#include <iostream>
+#include <sstream>
+#include <string>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index 52f65d794..bbd8545ad 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -7,16 +7,22 @@
#include <apt-pkg/cachefile.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/policy.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-private/private-output.h>
+#include <apt-private/private-cachefile.h>
+
+#include <regex.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <iomanip>
#include <iostream>
-#include <locale.h>
#include <langinfo.h>
#include <unistd.h>
-#include "private-output.h"
-#include "private-cachefile.h"
-
#include <apti18n.h>
/*}}}*/
diff --git a/apt-private/private-output.h b/apt-private/private-output.h
index 2a2a69458..81643f90a 100644
--- a/apt-private/private-output.h
+++ b/apt-private/private-output.h
@@ -1,17 +1,14 @@
#ifndef APT_PRIVATE_OUTPUT_H
#define APT_PRIVATE_OUTPUT_H
+#include <apt-pkg/pkgcache.h>
-#include <iostream>
#include <fstream>
#include <string>
-#include "private-cachefile.h"
-
// forward declaration
class pkgCacheFile;
class CacheFile;
-class pkgCache;
class pkgDepCache;
class pkgRecords;
diff --git a/apt-private/private-search.cc b/apt-private/private-search.cc
index 0b1a929b0..8106333b6 100644
--- a/apt-private/private-search.cc
+++ b/apt-private/private-search.cc
@@ -1,40 +1,30 @@
// Includes /*{{{*/
-#include <apt-pkg/error.h>
+#include <config.h>
+
#include <apt-pkg/cachefile.h>
-#include <apt-pkg/cachefilter.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cmndline.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
#include <apt-pkg/policy.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/algorithms.h>
-#include <apt-pkg/sptr.h>
-#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/metaindex.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
-#include <sstream>
-#include <utility>
-#include <cassert>
-#include <locale.h>
+#include <apt-private/private-cacheset.h>
+#include <apt-private/private-output.h>
+#include <apt-private/private-search.h>
+
+#include <string.h>
#include <iostream>
-#include <unistd.h>
-#include <errno.h>
-#include <regex.h>
-#include <stdio.h>
-#include <iomanip>
-#include <algorithm>
+#include <sstream>
#include <map>
+#include <string>
+#include <utility>
-#include "private-search.h"
-#include "private-cacheset.h"
+#include <apti18n.h>
/*}}}*/
bool FullTextSearch(CommandLine &CmdL) /*{{{*/
diff --git a/apt-private/private-search.h b/apt-private/private-search.h
index 17faffebc..539915f1f 100644
--- a/apt-private/private-search.h
+++ b/apt-private/private-search.h
@@ -1,7 +1,7 @@
#ifndef APT_PRIVATE_SEARCH_H
#define APT_PRIVATE_SEARCH_H
-#include <apt-pkg/cmndline.h>
+class CommandLine;
bool FullTextSearch(CommandLine &CmdL);
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc
index 94f944af1..8ae6a6dac 100644
--- a/apt-private/private-show.cc
+++ b/apt-private/private-show.cc
@@ -1,30 +1,32 @@
// Includes /*{{{*/
-#include <apt-pkg/error.h>
+#include <config.h>
+
#include <apt-pkg/cachefile.h>
-#include <apt-pkg/cachefilter.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cmndline.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/indexfile.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/policy.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/algorithms.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/metaindex.h>
+#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/tagfile.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
-#include <apti18n.h>
+#include <apt-private/private-cacheset.h>
+#include <apt-private/private-output.h>
+#include <apt-private/private-show.h>
+
+#include <stdio.h>
+#include <ostream>
+#include <string>
-#include "private-output.h"
-#include "private-cacheset.h"
-#include "private-show.h"
+#include <apti18n.h>
/*}}}*/
namespace APT {
@@ -33,7 +35,7 @@ namespace APT {
// DisplayRecord - Displays the complete record for the package /*{{{*/
// ---------------------------------------------------------------------
static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
- ostream &out)
+ std::ostream &out)
{
pkgCache *Cache = CacheFile.GetPkgCache();
if (unlikely(Cache == NULL))
diff --git a/apt-private/private-show.h b/apt-private/private-show.h
index b428c7af0..a15367e28 100644
--- a/apt-private/private-show.h
+++ b/apt-private/private-show.h
@@ -1,7 +1,7 @@
#ifndef APT_PRIVATE_SHOW_H
#define APT_PRIVATE_SHOW_H
-#include <apt-pkg/cmndline.h>
+class CommandLine;
namespace APT {
namespace Cmd {
diff --git a/apt-private/private-sources.cc b/apt-private/private-sources.cc
index 41cf6b313..301936b9d 100644
--- a/apt-private/private-sources.cc
+++ b/apt-private/private-sources.cc
@@ -1,10 +1,23 @@
+#include <config.h>
#include <apt-pkg/hashes.h>
-#include <apti18n.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/cmndline.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
+
+#include <apt-private/private-output.h>
+#include <apt-private/private-sources.h>
+#include <apt-private/private-utils.h>
-#include "private-output.h"
-#include "private-sources.h"
-#include "private-utils.h"
+#include <stddef.h>
+#include <unistd.h>
+#include <iostream>
+#include <string>
+
+#include <apti18n.h>
/* Interface discussion with donkult (for the future):
apt [add-{archive,release,component}|edit|change-release|disable]-sources
diff --git a/apt-private/private-sources.h b/apt-private/private-sources.h
index b394622be..4c58af180 100644
--- a/apt-private/private-sources.h
+++ b/apt-private/private-sources.h
@@ -1,3 +1,8 @@
-#include <apt-pkg/cmndline.h>
+#ifndef APT_PRIVATE_SOURCES_H
+#define APT_PRIVATE_SOURCES_H
+
+class CommandLine;
bool EditSources(CommandLine &CmdL);
+
+#endif
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index 1f6fb6f79..da83d7741 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -1,38 +1,23 @@
// Include files /*{{{*/
#include<config.h>
-#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/cmndline.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/depcache.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/algorithms.h>
#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/clean.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
#include <apt-pkg/cachefile.h>
-#include <apt-pkg/cacheset.h>
-#include <apt-pkg/sptr.h>
-#include <apt-pkg/md5.h>
-#include <apt-pkg/versionmatch.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/indexfile.h>
+#include <apt-pkg/cmndline.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/sourcelist.h>
#include <apt-pkg/update.h>
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/configuration.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
+#include <apt-private/acqprogress.h>
+#include <apt-private/private-cachefile.h>
+#include <apt-private/private-output.h>
+#include <apt-private/private-update.h>
-#include "private-cachefile.h"
-#include "private-output.h"
-#include "private-update.h"
-#include "acqprogress.h"
+#include <ostream>
+#include <string>
#include <apti18n.h>
/*}}}*/
diff --git a/apt-private/private-upgrade.cc b/apt-private/private-upgrade.cc
index a97e6d25b..68b2c5e00 100644
--- a/apt-private/private-upgrade.cc
+++ b/apt-private/private-upgrade.cc
@@ -1,12 +1,18 @@
-
// Includes /*{{{*/
-#include <apt-pkg/algorithms.h>
+#include <config.h>
+
#include <apt-pkg/upgrade.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
+
+#include <apt-private/private-install.h>
+#include <apt-private/private-cachefile.h>
+#include <apt-private/private-upgrade.h>
+#include <apt-private/private-output.h>
+
#include <iostream>
-#include "private-install.h"
-#include "private-cachefile.h"
-#include "private-upgrade.h"
-#include "private-output.h"
+
+#include <apti18n.h>
/*}}}*/
// this is actually performing the various upgrade operations
diff --git a/apt-private/private-upgrade.h b/apt-private/private-upgrade.h
index 5efc66bf7..64c4c0874 100644
--- a/apt-private/private-upgrade.h
+++ b/apt-private/private-upgrade.h
@@ -1,13 +1,11 @@
#ifndef APTPRIVATE_PRIVATE_UPGRADE_H
#define APTPRIVATE_PRIVATE_UPGRADE_H
-#include <apt-pkg/cmndline.h>
-
+class CommandLine;
bool DoDistUpgrade(CommandLine &CmdL);
bool DoUpgrade(CommandLine &CmdL);
bool DoUpgradeNoNewPackages(CommandLine &CmdL);
bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL);
-
#endif
diff --git a/apt-private/private-utils.cc b/apt-private/private-utils.cc
index 813f19329..9547a1b75 100644
--- a/apt-private/private-utils.cc
+++ b/apt-private/private-utils.cc
@@ -1,9 +1,12 @@
-#include <cstdlib>
+#include <config.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/fileutl.h>
-#include "private-utils.h"
+#include <apt-private/private-utils.h>
+
+#include <cstdlib>
+#include <unistd.h>
// DisplayFileInPager - Display File with pager /*{{{*/
void DisplayFileInPager(std::string filename)
@@ -26,7 +29,6 @@ void DisplayFileInPager(std::string filename)
ExecWait(Process, "sensible-pager", false);
}
/*}}}*/
-
// EditFileInSensibleEditor - Edit File with editor /*{{{*/
void EditFileInSensibleEditor(std::string filename)
{
diff --git a/apt-private/private-utils.h b/apt-private/private-utils.h
index 258dd06a8..4bb535e86 100644
--- a/apt-private/private-utils.h
+++ b/apt-private/private-utils.h
@@ -6,6 +6,4 @@
void DisplayFileInPager(std::string filename);
void EditFileInSensibleEditor(std::string filename);
-
-
#endif
diff --git a/buildlib/apti18n.h.in b/buildlib/apti18n.h.in
index a9d48dd97..2202c5b19 100644
--- a/buildlib/apti18n.h.in
+++ b/buildlib/apti18n.h.in
@@ -8,7 +8,8 @@
#ifdef USE_NLS
// apt will use the gettext implementation of the C library
-# include <libintl.h>
+#include <libintl.h>
+#include <locale.h>
# ifdef APT_DOMAIN
# define _(x) dgettext(APT_DOMAIN,x)
# define P_(msg,plural,n) dngettext(APT_DOMAIN,msg,plural,n)
diff --git a/buildlib/config.h.in b/buildlib/config.h.in
index bd43a40b9..6779e07bc 100644
--- a/buildlib/config.h.in
+++ b/buildlib/config.h.in
@@ -42,3 +42,4 @@
#define APT_8_CLEANER_HEADERS
#define APT_9_CLEANER_HEADERS
+#define APT_10_CLEANER_HEADERS
diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc
index 3ac350aca..c362c1edf 100644
--- a/cmdline/acqprogress.cc
+++ b/cmdline/acqprogress.cc
@@ -10,12 +10,14 @@
// Include files /*{{{*/
#include<config.h>
+#include <apt-pkg/acquire.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/acquire-worker.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/error.h>
+#include <string.h>
#include <stdio.h>
#include <signal.h>
#include <iostream>
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index d50e0c724..0860ee7bf 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -15,40 +15,49 @@
// Include Files /*{{{*/
#include<config.h>
-#include <apt-pkg/error.h>
+#include <apt-pkg/algorithms.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cacheset.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cmndline.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/init.h>
+#include <apt-pkg/metaindex.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
+#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/policy.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/algorithms.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/sourcelist.h>
#include <apt-pkg/sptr.h>
-#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/metaindex.h>
+#include <apt-pkg/srcrecords.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/tagfile.h>
+#include <apt-pkg/version.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
-#include <apt-private/private-list.h>
-#include <apt-private/private-cmndline.h>
-#include <apt-private/private-show.h>
#include <apt-private/private-cacheset.h>
+#include <apt-private/private-cmndline.h>
-#include <cassert>
-#include <locale.h>
-#include <iostream>
-#include <unistd.h>
-#include <errno.h>
#include <regex.h>
+#include <stddef.h>
#include <stdio.h>
-#include <iomanip>
+#include <stdlib.h>
+#include <unistd.h>
#include <algorithm>
+#include <cstring>
+#include <iomanip>
+#include <iostream>
+#include <list>
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 8e1d27e52..facb6002b 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -20,22 +20,15 @@
#include <apt-pkg/progress.h>
#include <apt-pkg/cdromutl.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/acquire.h>
-#include <apt-pkg/acquire-item.h>
#include <apt-pkg/cdrom.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgsystem.h>
-#include <locale.h>
#include <iostream>
-#include <fstream>
#include <vector>
-#include <algorithm>
+#include <string>
#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
#include <unistd.h>
-#include <stdio.h>
#include <apt-private/private-cmndline.h>
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 26f0ea161..d95780c73 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -26,10 +26,10 @@
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/pkgsystem.h>
-#include <locale.h>
#include <iostream>
#include <string>
#include <vector>
+#include <string.h>
#include <apt-private/private-cmndline.h>
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc
index c26cdc70a..04e13bde9 100644
--- a/cmdline/apt-dump-solver.cc
+++ b/cmdline/apt-dump-solver.cc
@@ -9,10 +9,12 @@
// Include Files /*{{{*/
#include <apt-pkg/edsp.h>
-#include <config.h>
-
+#include <string.h>
+#include <unistd.h>
#include <cstdio>
#include <iostream>
+
+#include <config.h>
/*}}}*/
// ShowHelp - Show a help screen /*{{{*/
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index a27008233..a82623444 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -18,8 +18,8 @@
#include <apt-pkg/init.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/progress.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/pkgcachegen.h>
#include <apt-pkg/version.h>
@@ -30,14 +30,13 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/mmap.h>
+#include <iostream>
#include <stdio.h>
#include <string.h>
-#include <stdlib.h>
#include <unistd.h>
-#include <locale.h>
-
-#include <fstream>
#include "apt-extracttemplates.h"
diff --git a/cmdline/apt-extracttemplates.h b/cmdline/apt-extracttemplates.h
index 6d07a09c2..9cc3f5f25 100644
--- a/cmdline/apt-extracttemplates.h
+++ b/cmdline/apt-extracttemplates.h
@@ -11,11 +11,12 @@
#define _APTEXTRACTTEMPLATE_H_
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/pkgcache.h>
#include <apt-pkg/dirstream.h>
#include <string>
+class pkgCache;
+
class DebFile : public pkgDirStream
{
FileFd File;
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 9a4eb0881..a830c2387 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -27,66 +27,67 @@
// Include Files /*{{{*/
#include <config.h>
+#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/algorithms.h>
#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/error.h>
+#include <apt-pkg/cachefile.h>
+#include <apt-pkg/cacheset.h>
+#include <apt-pkg/clean.h>
#include <apt-pkg/cmndline.h>
-#include <apt-pkg/init.h>
+#include <apt-pkg/debmetaindex.h>
#include <apt-pkg/depcache.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/algorithms.h>
-#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/clean.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/cachefile.h>
-#include <apt-pkg/cacheset.h>
-#include <apt-pkg/sptr.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/indexrecords.h>
+#include <apt-pkg/init.h>
#include <apt-pkg/md5.h>
-#include <apt-pkg/versionmatch.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/metaindex.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/indexfile.h>
+#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/srcrecords.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/version.h>
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
#include <apt-pkg/upgrade.h>
-#include <apt-pkg/metaindex.h>
-#include <apt-pkg/indexrecords.h>
+#include <apt-private/acqprogress.h>
+#include <apt-private/private-cacheset.h>
+#include <apt-private/private-cachefile.h>
+#include <apt-private/private-cmndline.h>
#include <apt-private/private-download.h>
#include <apt-private/private-install.h>
-#include <apt-private/private-upgrade.h>
+#include <apt-private/private-main.h>
+#include <apt-private/private-moo.h>
#include <apt-private/private-output.h>
-#include <apt-private/private-cacheset.h>
#include <apt-private/private-update.h>
-#include <apt-private/private-cmndline.h>
-#include <apt-private/private-moo.h>
+#include <apt-private/private-upgrade.h>
#include <apt-private/private-utils.h>
-#include <apt-pkg/debmetaindex.h>
-
-#include <apt-private/acqprogress.h>
-
-#include <set>
-#include <fstream>
-#include <sstream>
-
-#include <locale.h>
-#include <langinfo.h>
-#include <termios.h>
+#include <errno.h>
+#include <signal.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
-#include <signal.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <regex.h>
#include <sys/wait.h>
-
-#include <apt-private/private-output.h>
-#include <apt-private/private-main.h>
+#include <unistd.h>
+#include <algorithm>
+#include <fstream>
+#include <iostream>
+#include <set>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index 8ff2fa037..d66b3ffae 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -7,6 +7,7 @@
// Include Files /*{{{*/
#include <config.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/error.h>
#include <apt-pkg/init.h>
@@ -20,14 +21,9 @@
#include <apt-private/private-output.h>
#include <apt-private/private-cmndline.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-
-
+#include <iostream>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 0c2ff0f43..b85c07c33 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -20,7 +20,15 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/upgrade.h>
-
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
+
+#include <string.h>
+#include <iostream>
+#include <list>
+#include <string>
#include <unistd.h>
#include <cstdio>
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index 53b5ec158..ed348358a 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -11,20 +11,31 @@
#include <apt-pkg/cacheset.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/init.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <apt-private/private-cmndline.h>
-#include <algorithm>
#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
#include <fcntl.h>
-
-#include <apt-private/private-cmndline.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <algorithm>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <vector>
#include <apti18n.h>
/*}}}*/
diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index 8d9cb23de..c2b11890a 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -25,9 +25,9 @@
#include <vector>
#include <algorithm>
-
-#include <locale.h>
-#include <unistd.h>
+#include <stdio.h>
+#include <iostream>
+#include <string>
#include <apti18n.h>
/*}}}*/
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 1b7626948..5dbf868d7 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -11,39 +11,12 @@
// Include Files /*{{{*/
#include<config.h>
-#include <cassert>
-#include <locale.h>
-#include <iostream>
-#include <unistd.h>
-#include <errno.h>
-#include <regex.h>
-#include <stdio.h>
-#include <iomanip>
-#include <algorithm>
-
-
+#include <apt-pkg/cmndline.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/cachefile.h>
-#include <apt-pkg/cacheset.h>
#include <apt-pkg/init.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/cmndline.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/version.h>
-#include <apt-pkg/policy.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/algorithms.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/metaindex.h>
-#include <apt-pkg/hashes.h>
-
-#include <apti18n.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/configuration.h>
#include <apt-private/private-list.h>
#include <apt-private/private-search.h>
@@ -55,11 +28,14 @@
#include <apt-private/private-upgrade.h>
#include <apt-private/private-show.h>
#include <apt-private/private-main.h>
-#include <apt-private/private-utils.h>
#include <apt-private/private-sources.h>
- /*}}}*/
+#include <unistd.h>
+#include <iostream>
+#include <vector>
+#include <apti18n.h>
+ /*}}}*/
static bool ShowHelp(CommandLine &)
{
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"
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index 3c14d9dfb..74e2ecc6b 100644
--- a/methods/cdrom.cc
+++ b/methods/cdrom.cc
@@ -19,9 +19,9 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/hashes.h>
+#include <string>
+#include <vector>
#include <sys/stat.h>
-#include <unistd.h>
-#include <dlfcn.h>
#include <iostream>
#include <apti18n.h>
diff --git a/methods/connect.cc b/methods/connect.cc
index d9c9a1dd4..e2cbf4f5c 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -23,7 +23,7 @@
#include <errno.h>
#include <unistd.h>
#include <sstream>
-
+#include <string.h>
#include<set>
#include<string>
diff --git a/methods/copy.cc b/methods/copy.cc
index f2a8f9ed8..d59f032ff 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -17,9 +17,10 @@
#include <apt-pkg/error.h>
#include <apt-pkg/hashes.h>
+#include <string>
#include <sys/stat.h>
#include <sys/time.h>
-#include <unistd.h>
+
#include <apti18n.h>
/*}}}*/
diff --git a/methods/file.cc b/methods/file.cc
index 3d0687c5b..12db62203 100644
--- a/methods/file.cc
+++ b/methods/file.cc
@@ -21,8 +21,9 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
+#include <string>
#include <sys/stat.h>
-#include <unistd.h>
+
#include <apti18n.h>
/*}}}*/
diff --git a/methods/ftp.cc b/methods/ftp.cc
index 4108b2da3..66787a7be 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -23,7 +23,11 @@
#include <apt-pkg/hashes.h>
#include <apt-pkg/netrc.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/strutl.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
@@ -42,6 +46,7 @@
#include "rfc2553emu.h"
#include "connect.h"
#include "ftp.h"
+
#include <apti18n.h>
/*}}}*/
diff --git a/methods/ftp.h b/methods/ftp.h
index 8055c389f..119d0c7e8 100644
--- a/methods/ftp.h
+++ b/methods/ftp.h
@@ -12,6 +12,8 @@
#include <apt-pkg/strutl.h>
+#include <sys/types.h>
+#include <time.h>
#include <string>
class FTPConn
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 25bf64ddd..ae521a2ed 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -1,19 +1,21 @@
#include <config.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/acquire-method.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/indexcopy.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/gpgv.h>
+#include <apt-pkg/strutl.h>
-#include <stdio.h>
-#include <fcntl.h>
+#include <ctype.h>
#include <errno.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/wait.h>
+#include <unistd.h>
#include <iostream>
-#include <sstream>
+#include <string>
#include <vector>
#include <apti18n.h>
diff --git a/methods/gzip.cc b/methods/gzip.cc
index 3269ffbb8..ace5e9f71 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -11,17 +11,19 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/acquire-method.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/aptconfiguration.h>
+#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
+#include <string>
+#include <vector>
+
#include <apti18n.h>
/*}}}*/
diff --git a/methods/http.cc b/methods/http.cc
index e1bb2e130..82f16e9b2 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -33,24 +33,21 @@
#include <apt-pkg/error.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/netrc.h>
+#include <apt-pkg/strutl.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <sys/select.h>
+#include <cstring>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include <signal.h>
#include <stdio.h>
#include <errno.h>
-#include <string.h>
-#include <climits>
#include <iostream>
-#include <map>
-
-// Internet stuff
-#include <netdb.h>
#include "config.h"
#include "connect.h"
-#include "rfc2553emu.h"
#include "http.h"
#include <apti18n.h>
diff --git a/methods/http.h b/methods/http.h
index 450a42eed..5406ce4a7 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -12,14 +12,18 @@
#define APT_HTTP_H
#include <apt-pkg/strutl.h>
+#include <apt-pkg/acquire-method.h>
#include <string>
+#include <sys/time.h>
+#include <iostream>
#include "server.h"
using std::cout;
using std::endl;
+class FileFd;
class HttpMethod;
class Hashes;
diff --git a/methods/http_main.cc b/methods/http_main.cc
index 2ca91bfc9..3b346a514 100644
--- a/methods/http_main.cc
+++ b/methods/http_main.cc
@@ -1,14 +1,9 @@
#include <config.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/acquire-method.h>
#include <signal.h>
-#include "connect.h"
-#include "rfc2553emu.h"
#include "http.h"
-
int main()
{
setlocale(LC_ALL, "");
diff --git a/methods/https.cc b/methods/https.cc
index 041214179..c4aff8f38 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -18,19 +18,20 @@
#include <apt-pkg/hashes.h>
#include <apt-pkg/netrc.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/strutl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include <signal.h>
#include <stdio.h>
-#include <errno.h>
-#include <string.h>
#include <iostream>
#include <sstream>
+#include <ctype.h>
+#include <stdlib.h>
-#include "config.h"
#include "https.h"
+
#include <apti18n.h>
/*}}}*/
using namespace std;
diff --git a/methods/https.h b/methods/https.h
index 3199b29f2..faac8a3cd 100644
--- a/methods/https.h
+++ b/methods/https.h
@@ -11,14 +11,19 @@
#ifndef APT_HTTPS_H
#define APT_HTTPS_H
-#include <iostream>
+#include <apt-pkg/acquire-method.h>
+
#include <curl/curl.h>
+#include <iostream>
+#include <stddef.h>
+#include <string>
#include "server.h"
using std::cout;
using std::endl;
+class Hashes;
class HttpsMethod;
class FileFd;
diff --git a/methods/mirror.cc b/methods/mirror.cc
index b30636758..d3aef91bc 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -16,18 +16,18 @@
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/acquire.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/hashes.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/metaindex.h>
+#include <apt-pkg/strutl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include <algorithm>
-#include <fstream>
#include <iostream>
-
-#include <stdarg.h>
+#include <fstream>
#include <sys/stat.h>
-#include <sys/types.h>
#include <sys/utsname.h>
#include <dirent.h>
diff --git a/methods/mirror.h b/methods/mirror.h
index 1dd9f2ec6..6c0ce370e 100644
--- a/methods/mirror.h
+++ b/methods/mirror.h
@@ -11,6 +11,8 @@
#ifndef APT_MIRROR_H
#define APT_MIRROR_H
+#include <apt-pkg/acquire-method.h>
+
#include <iostream>
#include <string>
#include <vector>
diff --git a/methods/rred.cc b/methods/rred.cc
index 7169fc731..cabb3c456 100644
--- a/methods/rred.cc
+++ b/methods/rred.cc
@@ -8,19 +8,18 @@
#include <config.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/mmap.h>
#include <apt-pkg/error.h>
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/configuration.h>
+#include <stddef.h>
+#include <iostream>
#include <string>
#include <list>
#include <vector>
-#include <iterator>
-#include <fcntl.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/methods/rsh.cc b/methods/rsh.cc
index 8088cac38..bd46d2515 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -17,7 +17,11 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/acquire-method.h>
+#include <apt-pkg/strutl.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
diff --git a/methods/rsh.h b/methods/rsh.h
index d7efa3f06..c2c06acfe 100644
--- a/methods/rsh.h
+++ b/methods/rsh.h
@@ -11,6 +11,8 @@
#define APT_RSH_H
#include <string>
+#include <time.h>
+
#include <apt-pkg/strutl.h>
class Hashes;
diff --git a/methods/server.cc b/methods/server.cc
index 90e83d1af..5a13f18a7 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -10,32 +10,27 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/hashes.h>
-#include <apt-pkg/netrc.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
-#include <fcntl.h>
+#include <ctype.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h>
#include <unistd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <climits>
#include <iostream>
+#include <limits>
#include <map>
+#include <string>
+#include <vector>
-// Internet stuff
-#include <netdb.h>
-
-#include "config.h"
-#include "connect.h"
-#include "rfc2553emu.h"
-#include "http.h"
+#include "server.h"
#include <apti18n.h>
/*}}}*/
diff --git a/methods/server.h b/methods/server.h
index b4870698f..d1e151f8a 100644
--- a/methods/server.h
+++ b/methods/server.h
@@ -12,7 +12,10 @@
#define APT_SERVER_H
#include <apt-pkg/strutl.h>
+#include <apt-pkg/acquire-method.h>
+#include <time.h>
+#include <iostream>
#include <string>
using std::cout;
diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc
index fb9f7d34e..34476e1af 100644
--- a/test/interactive-helper/aptwebserver.cc
+++ b/test/interactive-helper/aptwebserver.cc
@@ -1,27 +1,29 @@
#include <config.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/configuration.h>
-#include <apt-pkg/init.h>
-
-#include <vector>
-#include <string>
-#include <list>
-#include <sstream>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
+#include <dirent.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <pthread.h>
+#include <regex.h>
+#include <signal.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/socket.h>
-#include <sys/types.h>
#include <sys/stat.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#include <errno.h>
#include <time.h>
-#include <stdlib.h>
-#include <dirent.h>
-#include <signal.h>
+#include <unistd.h>
+#include <iostream>
+#include <sstream>
+#include <list>
+#include <string>
+#include <vector>
static char const * httpcodeToStr(int const httpcode) /*{{{*/
{
diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc
index 94fe9dca8..852ec4ee9 100644
--- a/test/interactive-helper/extract-control.cc
+++ b/test/interactive-helper/extract-control.cc
@@ -1,7 +1,10 @@
+#include <config.h>
+
#include <apt-pkg/debfile.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
+#include <string>
#include <iostream>
#include <unistd.h>
diff --git a/test/interactive-helper/mthdcat.cc b/test/interactive-helper/mthdcat.cc
index 25d09a3f5..2961b2080 100644
--- a/test/interactive-helper/mthdcat.cc
+++ b/test/interactive-helper/mthdcat.cc
@@ -2,6 +2,8 @@
All this does is cat a file into the method without closing the FD when
the file ends */
+#include <config.h>
+
#include <unistd.h>
int main()
diff --git a/test/interactive-helper/rpmver.cc b/test/interactive-helper/rpmver.cc
index 15c96cbbe..017c92fba 100644
--- a/test/interactive-helper/rpmver.cc
+++ b/test/interactive-helper/rpmver.cc
@@ -1,3 +1,5 @@
+#include <config.h>
+
#include <apt-pkg/debversion.h>
#include <rpm/rpmio.h>
#include <rpm/misc.h>
diff --git a/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc
index 88f5f0153..b87dcd935 100644
--- a/test/interactive-helper/test_udevcdrom.cc
+++ b/test/interactive-helper/test_udevcdrom.cc
@@ -1,7 +1,10 @@
+#include <config.h>
+
#include <apt-pkg/cdrom.h>
-#include <stdio.h>
-#include <assert.h>
+#include <stddef.h>
+#include <string>
+#include <assert.h>
#include <vector>
#include <iostream>
@@ -17,5 +20,4 @@ int main()
std::cerr << l[i].DeviceName << " "
<< l[i].Mounted << " "
<< l[i].MountPath << std::endl;
-
}
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc
index 9520d1b50..6aae9f563 100644
--- a/test/interactive-helper/testdeb.cc
+++ b/test/interactive-helper/testdeb.cc
@@ -1,7 +1,14 @@
+#include <config.h>
+
#include <apt-pkg/dirstream.h>
#include <apt-pkg/debfile.h>
#include <apt-pkg/error.h>
#include <apt-pkg/extracttar.h>
+#include <apt-pkg/arfile.h>
+#include <apt-pkg/fileutl.h>
+
+#include <iostream>
+#include <string>
class NullStream : public pkgDirStream
{
diff --git a/test/libapt/cdromfindpackages_test.cc b/test/libapt/cdromfindpackages_test.cc
index e9f5a51b0..583de1423 100644
--- a/test/libapt/cdromfindpackages_test.cc
+++ b/test/libapt/cdromfindpackages_test.cc
@@ -1,9 +1,13 @@
+#include <config.h>
+
#include <apt-pkg/cdrom.h>
#include <apt-pkg/error.h>
#include <algorithm>
#include <string>
#include <vector>
+#include <stddef.h>
+#include <iostream>
#include "assert.h"
diff --git a/test/libapt/cdromreducesourcelist_test.cc b/test/libapt/cdromreducesourcelist_test.cc
index b0314769d..196d0136e 100644
--- a/test/libapt/cdromreducesourcelist_test.cc
+++ b/test/libapt/cdromreducesourcelist_test.cc
@@ -1,7 +1,7 @@
+#include <config.h>
+
#include <apt-pkg/cdrom.h>
-#include <apt-pkg/error.h>
-#include <algorithm>
#include <string>
#include <vector>
diff --git a/test/libapt/commandline_test.cc b/test/libapt/commandline_test.cc
index de8a30bd6..d8c5bc5bd 100644
--- a/test/libapt/commandline_test.cc
+++ b/test/libapt/commandline_test.cc
@@ -1,4 +1,7 @@
+#include <config.h>
+
#include <apt-pkg/cmndline.h>
+#include <apt-pkg/configuration.h>
#include "assert.h"
diff --git a/test/libapt/commandlineasstring_test.cc b/test/libapt/commandlineasstring_test.cc
index a38957d7e..5c005e956 100644
--- a/test/libapt/commandlineasstring_test.cc
+++ b/test/libapt/commandlineasstring_test.cc
@@ -1,3 +1,5 @@
+#include <config.h>
+
#include <apt-pkg/cmndline.h>
#include <apt-pkg/configuration.h>
diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc
index 44f8e9d78..43b98f240 100644
--- a/test/libapt/compareversion_test.cc
+++ b/test/libapt/compareversion_test.cc
@@ -16,17 +16,16 @@
##################################################################### */
/*}}}*/
-#include <apt-pkg/macros.h>
+#include <config.h>
+
#include <apt-pkg/error.h>
-#include <apt-pkg/version.h>
#include <apt-pkg/debversion.h>
#include <apt-pkg/fileutl.h>
-#include <iostream>
-#include <fstream>
+#include <fstream>
+#include <string>
#include <stdlib.h>
#include <unistd.h>
-#include <sys/types.h>
#include <sys/wait.h>
using namespace std;
diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc
index d2efc1b4b..c9235500c 100644
--- a/test/libapt/configuration_test.cc
+++ b/test/libapt/configuration_test.cc
@@ -1,3 +1,5 @@
+#include <config.h>
+
#include <apt-pkg/configuration.h>
#include <string>
diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc
index d256ea55a..8da832ba9 100644
--- a/test/libapt/fileutl_test.cc
+++ b/test/libapt/fileutl_test.cc
@@ -1,14 +1,13 @@
+#include <config.h>
+
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include "assert.h"
#include <string>
#include <vector>
-
-#include <stdio.h>
-#include <iostream>
#include <stdlib.h>
+#include "assert.h"
int main()
{
diff --git a/test/libapt/getarchitectures_test.cc b/test/libapt/getarchitectures_test.cc
index 508d5e458..f4dfc6ae8 100644
--- a/test/libapt/getarchitectures_test.cc
+++ b/test/libapt/getarchitectures_test.cc
@@ -1,11 +1,12 @@
+#include <config.h>
+
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
-#include "assert.h"
#include <string>
#include <vector>
-#include <iostream>
+#include "assert.h"
int main()
{
diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc
index 51cfecee3..15aa4e879 100644
--- a/test/libapt/getlanguages_test.cc
+++ b/test/libapt/getlanguages_test.cc
@@ -1,3 +1,5 @@
+#include <config.h>
+
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc
index b2c95e840..df125fc83 100644
--- a/test/libapt/getlistoffilesindir_test.cc
+++ b/test/libapt/getlistoffilesindir_test.cc
@@ -1,12 +1,13 @@
+#include <config.h>
+
#include <apt-pkg/fileutl.h>
-#include "assert.h"
#include <string>
#include <vector>
-
-#include <stdio.h>
#include <iostream>
+#include "assert.h"
+
#define P(x) std::string(argv[1]).append("/").append(x)
int main(int argc,char *argv[])
diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc
index 742fa53bd..e913fdc12 100644
--- a/test/libapt/globalerror_test.cc
+++ b/test/libapt/globalerror_test.cc
@@ -1,10 +1,14 @@
+#include <config.h>
+
#include <apt-pkg/error.h>
-#include "assert.h"
+#include <stddef.h>
#include <string>
#include <errno.h>
#include <string.h>
+#include "assert.h"
+
int main()
{
std::string const textOfErrnoZero(strerror(0));
diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc
index 410e2c44d..d743faec6 100644
--- a/test/libapt/hashsums_test.cc
+++ b/test/libapt/hashsums_test.cc
@@ -1,12 +1,15 @@
+#include <config.h>
+
#include <apt-pkg/md5.h>
#include <apt-pkg/sha1.h>
#include <apt-pkg/sha2.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/fileutl.h>
-#include <iostream>
-#include <stdio.h>
+#include <iostream>
+#include <stdlib.h>
+#include <string>
#include "assert.h"
@@ -50,22 +53,22 @@ int main(int argc, char** argv)
// test HashSumValue which doesn't calculate but just stores sums
{
- string md5sum = argv[2];
+ std::string md5sum = argv[2];
MD5SumValue md5(md5sum);
equals(md5.Value(), md5sum);
}
{
- string sha1sum = argv[3];
+ std::string sha1sum = argv[3];
SHA1SumValue sha1(sha1sum);
equals(sha1.Value(), sha1sum);
}
{
- string sha2sum = argv[4];
+ std::string sha2sum = argv[4];
SHA256SumValue sha2(sha2sum);
equals(sha2.Value(), sha2sum);
}
{
- string sha2sum = argv[5];
+ std::string sha2sum = argv[5];
SHA512SumValue sha2(sha2sum);
equals(sha2.Value(), sha2sum);
}
diff --git a/test/libapt/indexcopytosourcelist_test.cc b/test/libapt/indexcopytosourcelist_test.cc
index 69d8fae86..e04ab261b 100644
--- a/test/libapt/indexcopytosourcelist_test.cc
+++ b/test/libapt/indexcopytosourcelist_test.cc
@@ -1,8 +1,11 @@
+#include <config.h>
+
#include <apt-pkg/configuration.h>
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/indexcopy.h>
#include <string>
+#include <stdio.h>
#include "assert.h"
@@ -12,14 +15,14 @@ public:
IndexCopy::ConvertToSourceList(CD, Path);
return Path;
}
- bool GetFile(std::string &Filename,unsigned long long &Size) { return false; }
- bool RewriteEntry(FILE *Target,std::string File) { return false; }
+ bool GetFile(std::string &/*Filename*/, unsigned long long &/*Size*/) { return false; }
+ bool RewriteEntry(FILE * /*Target*/, std::string /*File*/) { return false; }
const char *GetFileName() { return NULL; }
const char *Type() { return NULL; }
};
-int main(int argc, char const *argv[]) {
+int main() {
NoCopy ic;
std::string const CD("/media/cdrom/");
diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc
index 5a2c65573..5564e2bc0 100644
--- a/test/libapt/parsedepends_test.cc
+++ b/test/libapt/parsedepends_test.cc
@@ -1,5 +1,11 @@
+#include <config.h>
+
#include <apt-pkg/deblistparser.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/pkgcache.h>
+
+#include <string.h>
+#include <string>
#include "assert.h"
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 0637df03b..71aa54f1e 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -1,11 +1,16 @@
+#include <config.h>
+
+#include <apt-pkg/configuration.h>
#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/tagfile.h>
+#include <apt-pkg/fileutl.h>
-#include "assert.h"
+#include <string>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "assert.h"
+
char *tempfile = NULL;
int tempfile_fd = -1;
diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc
index a4516e7a1..618f4daba 100644
--- a/test/libapt/strutil_test.cc
+++ b/test/libapt/strutil_test.cc
@@ -1,5 +1,10 @@
+#include <config.h>
+
#include <apt-pkg/strutl.h>
+#include <string>
+#include <vector>
+
#include "assert.h"
int main()
@@ -44,7 +49,7 @@ int main()
// Split
input = "status: libnet1:amd64: unpacked";
- vector<std::string> result = StringSplit(input, ": ");
+ std::vector<std::string> result = StringSplit(input, ": ");
equals(result[0], "status");
equals(result[1], "libnet1:amd64");
equals(result[2], "unpacked");
diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc
index 24f258275..aaf46e3e9 100644
--- a/test/libapt/tagfile_test.cc
+++ b/test/libapt/tagfile_test.cc
@@ -1,11 +1,15 @@
+#include <config.h>
+
#include <apt-pkg/fileutl.h>
#include <apt-pkg/tagfile.h>
-#include "assert.h"
+#include <string>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "assert.h"
+
char *tempfile = NULL;
int tempfile_fd = -1;
diff --git a/test/libapt/uri_test.cc b/test/libapt/uri_test.cc
index 8216ade71..6559f1390 100644
--- a/test/libapt/uri_test.cc
+++ b/test/libapt/uri_test.cc
@@ -1,5 +1,9 @@
+#include <config.h>
+
#include <apt-pkg/strutl.h>
+#include <string>
+
#include "assert.h"
int main() {