From b9dadc24b9477b466bc8058c765d76c65ecc7125 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Dec 2011 01:22:38 +0100 Subject: [PATCH] revert 2184.1.3: forward declaration instead of headers The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users --- apt-inst/contrib/arfile.h | 3 +++ apt-inst/contrib/extracttar.h | 2 ++ apt-inst/database.h | 4 ++++ apt-inst/deb/debfile.h | 4 ++++ apt-pkg/acquire-item.h | 8 ++++++++ apt-pkg/acquire-method.h | 5 +++++ apt-pkg/algorithms.h | 1 + apt-pkg/cachefile.h | 6 ++++++ apt-pkg/cacheset.h | 4 ++++ apt-pkg/cdrom.h | 1 + apt-pkg/contrib/cmndline.h | 4 ++++ apt-pkg/contrib/mmap.h | 1 + apt-pkg/contrib/netrc.h | 4 ++++ apt-pkg/deb/deblistparser.h | 4 ++++ apt-pkg/deb/debmetaindex.h | 4 ++++ apt-pkg/deb/debrecords.h | 4 ++++ apt-pkg/depcache.h | 5 +++++ apt-pkg/edsp.h | 5 +++++ apt-pkg/edsp/edspindexfile.h | 4 ++++ apt-pkg/edsp/edsplistparser.h | 6 ++++++ apt-pkg/indexrecords.h | 4 ++++ apt-pkg/init.h | 5 +++++ apt-pkg/metaindex.h | 3 +++ apt-pkg/packagemanager.h | 1 + apt-pkg/pkgsystem.h | 4 ++++ apt-pkg/sourcelist.h | 26 ++++++++++++++------------ apt-pkg/tagfile.h | 4 ++++ apt-pkg/vendorlist.h | 2 ++ 28 files changed, 116 insertions(+), 12 deletions(-) diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h index 2be1323d1..0f62a34a0 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -17,6 +17,9 @@ #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif class FileFd; diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index e104417c1..4b29df314 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -19,6 +19,8 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include +#include using std::min; #endif diff --git a/apt-inst/database.h b/apt-inst/database.h index ccfee3797..64e149f98 100644 --- a/apt-inst/database.h +++ b/apt-inst/database.h @@ -25,6 +25,10 @@ #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class pkgFLCache; class OpProgress; diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h index 2c4734f9e..5e1ea1d2f 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -29,6 +29,10 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class FileFd; class pkgDataBase; diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 27b8e887b..51d539450 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -25,6 +25,14 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#include +#include +#include +#include +#endif + /** \addtogroup acquire * @{ * diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index c3f042ee0..2dd9ad685 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -25,6 +25,11 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#include +#endif + class Hashes; class pkgAcqMethod { diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index fdb64fc59..185d11e96 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -37,6 +37,7 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include using std::ostream; #endif diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h index b56e42855..802b12b61 100644 --- a/apt-pkg/cachefile.h +++ b/apt-pkg/cachefile.h @@ -20,6 +20,12 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#include +#include +#endif + class pkgPolicy; class pkgSourceList; class OpProgress; diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index d1e396e0f..91d7eec1c 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -20,6 +20,10 @@ #include #include + +#ifndef APT_8_CLEANER_HEADERS +#include +#endif /*}}}*/ class pkgCacheFile; diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h index 4fcf5abcd..cedfccff7 100644 --- a/apt-pkg/cdrom.h +++ b/apt-pkg/cdrom.h @@ -5,6 +5,7 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include using namespace std; #endif diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h index b201d9855..9f505fd41 100644 --- a/apt-pkg/contrib/cmndline.h +++ b/apt-pkg/contrib/cmndline.h @@ -44,6 +44,10 @@ #ifndef PKGLIB_CMNDLINE_H #define PKGLIB_CMNDLINE_H +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class Configuration; class CommandLine diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 602de94f8..6bd4a2d86 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -29,6 +29,7 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include using std::string; #endif diff --git a/apt-pkg/contrib/netrc.h b/apt-pkg/contrib/netrc.h index 7b94eba88..5931d4a42 100644 --- a/apt-pkg/contrib/netrc.h +++ b/apt-pkg/contrib/netrc.h @@ -16,6 +16,10 @@ #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + #define DOT_CHAR "." #define DIR_CHAR "/" diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 9519d9711..386d291a2 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -14,6 +14,10 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class debListParser : public pkgCacheGenerator::ListParser { public: diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 0cba2d8a8..b9ecab97c 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -8,6 +8,10 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class debReleaseIndex : public metaIndex { public: diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 9c7ea6b48..b5e3bbdba 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -18,6 +18,10 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class debRecordParser : public pkgRecords::Parser { /** \brief dpointer placeholder (for later in case we need it) */ diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index f6e6c0afc..7358048ed 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -46,6 +46,11 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#include +#endif + class OpProgress; class pkgDepCache : protected pkgCache::Namespace diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h index 07bbbdd03..12b06d143 100644 --- a/apt-pkg/edsp.h +++ b/apt-pkg/edsp.h @@ -15,6 +15,11 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#include +#endif + class pkgDepCache; class OpProgress; diff --git a/apt-pkg/edsp/edspindexfile.h b/apt-pkg/edsp/edspindexfile.h index 9670c4837..de10f2d2f 100644 --- a/apt-pkg/edsp/edspindexfile.h +++ b/apt-pkg/edsp/edspindexfile.h @@ -10,6 +10,10 @@ #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class edspIndex : public debStatusIndex { /** \brief dpointer placeholder (for later in case we need it) */ diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h index 5d82716c7..a7bf9de95 100644 --- a/apt-pkg/edsp/edsplistparser.h +++ b/apt-pkg/edsp/edsplistparser.h @@ -13,6 +13,12 @@ #include +#ifndef APT_8_CLEANER_HEADERS +#include +#include +#include +#endif + class FileFd; class edspListParser : public debListParser diff --git a/apt-pkg/indexrecords.h b/apt-pkg/indexrecords.h index fa60a0847..a98b939bc 100644 --- a/apt-pkg/indexrecords.h +++ b/apt-pkg/indexrecords.h @@ -13,6 +13,10 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class indexRecords { bool parseSumData(const char *&Start, const char *End, std::string &Name, diff --git a/apt-pkg/init.h b/apt-pkg/init.h index 0c1c7ae5a..b6f3df753 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -13,6 +13,11 @@ #ifndef PKGLIB_INIT_H #define PKGLIB_INIT_H +#ifndef APT_8_CLEANER_HEADERS +#include +#include +#endif + class pkgSystem; class Configuration; diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h index 0f95257e0..5783735ff 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -7,6 +7,9 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include +#include +#include using std::string; #endif diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 1d807795d..1a6a9f01c 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -30,6 +30,7 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include using std::string; #endif diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h index 211fd0d56..75f7b9fcc 100644 --- a/apt-pkg/pkgsystem.h +++ b/apt-pkg/pkgsystem.h @@ -41,6 +41,10 @@ #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class pkgDepCache; class pkgPackageManager; class pkgVersioningSystem; diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h index 4509e54b9..03e29ec34 100644 --- a/apt-pkg/sourcelist.h +++ b/apt-pkg/sourcelist.h @@ -32,9 +32,11 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +#include using std::string; using std::vector; - +#endif class pkgAcquire; class pkgIndexFile; @@ -58,31 +60,31 @@ class pkgSourceList const char *Label; bool FixupURI(string &URI) const; - virtual bool ParseLine(vector &List, + virtual bool ParseLine(std::vector &List, const char *Buffer, - unsigned long const &CurLine,string const &File) const; - virtual bool CreateItem(vector &List,string const &URI, - string const &Dist,string const &Section, - std::map const &Options) const = 0; + unsigned long const &CurLine,std::string const &File) const; + virtual bool CreateItem(vector &List,std::string const &URI, + std::string const &Dist,std::string const &Section, + std::map const &Options) const = 0; Type(); virtual ~Type() {}; }; - typedef vector::const_iterator const_iterator; + typedef std::vector::const_iterator const_iterator; protected: - vector SrcList; + std::vector SrcList; public: bool ReadMainList(); - bool Read(string File); + bool Read(std::string File); // CNC:2003-03-03 void Reset(); - bool ReadAppend(string File); - bool ReadSourceDir(string Dir); + bool ReadAppend(std::string File); + bool ReadSourceDir(std::string Dir); // List accessors inline const_iterator begin() const {return SrcList.begin();}; @@ -98,7 +100,7 @@ class pkgSourceList time_t GetLastModifiedTime(); pkgSourceList(); - pkgSourceList(string File); + pkgSourceList(std::string File); ~pkgSourceList(); }; diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index a5bf5ac90..fd24471c1 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -24,6 +24,10 @@ #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + class FileFd; class pkgTagSection diff --git a/apt-pkg/vendorlist.h b/apt-pkg/vendorlist.h index 4e050477f..a86ccde7c 100644 --- a/apt-pkg/vendorlist.h +++ b/apt-pkg/vendorlist.h @@ -18,6 +18,8 @@ #include #ifndef APT_8_CLEANER_HEADERS +#include +#include using std::string; using std::vector; #endif -- 2.45.2