summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-03-05 22:11:25 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:58:45 +0100
commit453b82a388013e522b3a1b9fcd6ed0810dab1f4f (patch)
treebaa519d4f494816eb31b4cd4d06351c2ba23a1b7 /methods
parent54298f49d71347616df19b8d2f59c907374e07b3 (diff)
downloadapt-453b82a388013e522b3a1b9fcd6ed0810dab1f4f.tar.gz
cleanup headers and especially #includes everywhere
Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
Diffstat (limited to 'methods')
-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
20 files changed, 80 insertions, 60 deletions
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index 3c14d9df..74e2ecc6 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 d9c9a1dd..e2cbf4f5 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 f2a8f9ed..d59f032f 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 3d0687c5..12db6220 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 4108b2da..66787a7b 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 8055c389..119d0c7e 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 25bf64dd..ae521a2e 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 3269ffbb..ace5e9f7 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 e1bb2e13..82f16e9b 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 450a42ee..5406ce4a 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 2ca91bfc..3b346a51 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 04121417..c4aff8f3 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 3199b29f..faac8a3c 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 b3063675..d3aef91b 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 1dd9f2ec..6c0ce370 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 7169fc73..cabb3c45 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 8088cac3..bd46d251 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 d7efa3f0..c2c06acf 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 90e83d1a..5a13f18a 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 b4870698..d1e151f8 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;