From daa1352ed3d2bb4bc6aa0f0e7f22be3f0908942d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 11 May 2019 17:17:20 +0200 Subject: Run unifdef -DAPT_{8,9,10,15}_CLEANER_HEADERS --- CMake/config.h.in | 5 ----- apt-pkg/acquire-item.h | 4 ---- apt-pkg/acquire-method.h | 4 ---- apt-pkg/acquire.h | 7 ------- apt-pkg/algorithms.h | 9 --------- apt-pkg/cachefile.h | 5 ----- apt-pkg/cacheset.h | 6 ------ apt-pkg/cdrom.h | 4 ---- apt-pkg/clean.h | 3 --- apt-pkg/contrib/arfile.h | 3 --- apt-pkg/contrib/cdromutl.h | 3 --- apt-pkg/contrib/cmndline.h | 3 --- apt-pkg/contrib/configuration.h | 3 --- apt-pkg/contrib/extracttar.h | 5 ----- apt-pkg/contrib/fileutl.h | 3 --- apt-pkg/contrib/gpgv.h | 3 --- apt-pkg/contrib/hashes.h | 9 --------- apt-pkg/contrib/hashsum_template.h | 9 --------- apt-pkg/contrib/macros.h | 20 -------------------- apt-pkg/contrib/md5.h | 9 --------- apt-pkg/contrib/mmap.h | 4 ---- apt-pkg/contrib/netrc.h | 7 ------- apt-pkg/contrib/progress.h | 3 --- apt-pkg/contrib/sha1.h | 9 --------- apt-pkg/contrib/sha2.h | 5 ----- apt-pkg/contrib/strutl.h | 8 -------- apt-pkg/deb/debfile.h | 6 ------ apt-pkg/deb/deblistparser.h | 3 --- apt-pkg/deb/debmetaindex.h | 6 ------ apt-pkg/deb/debrecords.h | 3 --- apt-pkg/deb/debsystem.h | 3 --- apt-pkg/deb/dpkgpm.h | 7 ------- apt-pkg/depcache.h | 8 -------- apt-pkg/edsp.h | 4 ---- apt-pkg/edsp/edspindexfile.h | 3 --- apt-pkg/edsp/edsplistparser.h | 5 ----- apt-pkg/indexcopy.h | 8 -------- apt-pkg/indexfile.h | 6 ------ apt-pkg/init.h | 7 ------- apt-pkg/metaindex.h | 10 ---------- apt-pkg/packagemanager.h | 8 -------- apt-pkg/pkgcache.h | 3 --- apt-pkg/pkgsystem.h | 3 --- apt-pkg/policy.h | 3 --- apt-pkg/sourcelist.h | 8 -------- apt-pkg/srcrecords.h | 4 ---- apt-pkg/tagfile.h | 3 --- apt-pkg/version.h | 3 --- apt-pkg/versionmatch.h | 3 --- 49 files changed, 270 deletions(-) diff --git a/CMake/config.h.in b/CMake/config.h.in index a9528ccfa..b89f7297d 100644 --- a/CMake/config.h.in +++ b/CMake/config.h.in @@ -81,10 +81,5 @@ #cmakedefine HAVE_FMV_SSE42_AND_CRC32 #cmakedefine HAVE_FMV_SSE42_AND_CRC32DI -#define APT_8_CLEANER_HEADERS -#define APT_9_CLEANER_HEADERS -#define APT_10_CLEANER_HEADERS -#define APT_15_CLEANER_HEADERS - /* unrolling is faster combined with an optimizing compiler */ #define SHA2_UNROLL_TRANSFORM diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index a45e9f7a4..c62e44b78 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -30,10 +30,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#include -#endif /** \addtogroup acquire * @{ diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index 664b95c18..48c2e130e 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -29,10 +29,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#include -#endif class pkgAcqMethod { diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index a5c10fd92..d8fadce66 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -76,14 +76,7 @@ #include #include -#ifndef APT_10_CLEANER_HEADERS -#include -#endif -#ifndef APT_8_CLEANER_HEADERS -using std::vector; -using std::string; -#endif class pkgAcquireStatus; class metaIndex; diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index f6a1ce1fb..21d79367b 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -38,16 +38,7 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -using std::ostream; -#endif -#ifndef APT_9_CLEANER_HEADERS -// include pkg{DistUpgrade,AllUpgrade,MiniizeUpgrade} here for compatibility -#include -#include -#endif class pkgSimulatePrivate; diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h index 998145ee6..98b72ebd1 100644 --- a/apt-pkg/cachefile.h +++ b/apt-pkg/cachefile.h @@ -22,11 +22,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#include -#include -#endif class MMap; class pkgPolicy; diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 934f6611c..26dd82a60 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -30,12 +30,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif -#ifndef APT_10_CLEANER_HEADERS -#include -#endif /*}}}*/ class pkgCacheFile; diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h index 6bc2b34f9..82e12fa4e 100644 --- a/apt-pkg/cdrom.h +++ b/apt-pkg/cdrom.h @@ -8,10 +8,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -using namespace std; -#endif class Configuration; class OpProgress; diff --git a/apt-pkg/clean.h b/apt-pkg/clean.h index a64e6a935..ad1ddcce7 100644 --- a/apt-pkg/clean.h +++ b/apt-pkg/clean.h @@ -9,9 +9,6 @@ #ifndef APTPKG_CLEAN_H #define APTPKG_CLEAN_H -#ifndef APT_10_CLEANER_HEADERS -#include -#endif #include diff --git a/apt-pkg/contrib/arfile.h b/apt-pkg/contrib/arfile.h index cf454941e..acbe2c3f8 100644 --- a/apt-pkg/contrib/arfile.h +++ b/apt-pkg/contrib/arfile.h @@ -16,9 +16,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif class FileFd; diff --git a/apt-pkg/contrib/cdromutl.h b/apt-pkg/contrib/cdromutl.h index 4e07e42f6..d355a297e 100644 --- a/apt-pkg/contrib/cdromutl.h +++ b/apt-pkg/contrib/cdromutl.h @@ -11,9 +11,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif // mount cdrom, DeviceName (e.g. /dev/sr0) is optional bool MountCdrom(std::string Path, std::string DeviceName=""); diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h index bdd4f6e8f..66e0e16d8 100644 --- a/apt-pkg/contrib/cmndline.h +++ b/apt-pkg/contrib/cmndline.h @@ -45,9 +45,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif class Configuration; diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index b5dfe721f..33cdfbfe9 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -35,9 +35,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif class Configuration { diff --git a/apt-pkg/contrib/extracttar.h b/apt-pkg/contrib/extracttar.h index adde21352..8d4c17924 100644 --- a/apt-pkg/contrib/extracttar.h +++ b/apt-pkg/contrib/extracttar.h @@ -18,11 +18,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -#include -using std::min; -#endif class pkgDirStream; diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index cc0191192..f80457cd3 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -30,9 +30,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif /* Define this for python-apt */ #define APT_HAS_GZIP 1 diff --git a/apt-pkg/contrib/gpgv.h b/apt-pkg/contrib/gpgv.h index 2a4cdad72..4d48e2914 100644 --- a/apt-pkg/contrib/gpgv.h +++ b/apt-pkg/contrib/gpgv.h @@ -14,9 +14,6 @@ #include #include -#ifndef APT_10_CLEANER_HEADERS -#include -#endif class FileFd; diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index c636852ec..e9b8a0519 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -20,15 +20,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -using std::min; -using std::vector; -#endif -#ifndef APT_10_CLEANER_HEADERS -#include -#include -#include -#endif class FileFd; diff --git a/apt-pkg/contrib/hashsum_template.h b/apt-pkg/contrib/hashsum_template.h index 52b2cbab3..12c46e77b 100644 --- a/apt-pkg/contrib/hashsum_template.h +++ b/apt-pkg/contrib/hashsum_template.h @@ -15,15 +15,6 @@ #include -#ifndef APT_10_CLEANER_HEADERS -#include -#include -#include -#endif -#ifndef APT_8_CLEANER_HEADERS -using std::string; -using std::min; -#endif class FileFd; diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h index 3648390ce..df85b7856 100644 --- a/apt-pkg/contrib/macros.h +++ b/apt-pkg/contrib/macros.h @@ -116,26 +116,6 @@ #define APT_HOT #endif -#ifndef APT_10_CLEANER_HEADERS -#if APT_GCC_VERSION >= 0x0300 - #define __must_check __attribute__ ((warn_unused_result)) - #define __deprecated __attribute__ ((deprecated)) - #define __attrib_const __attribute__ ((__const__)) - #define __like_printf(n) __attribute__((format(printf, n, n + 1))) -#else - #define __must_check /* no warn_unused_result */ - #define __deprecated /* no deprecated */ - #define __attrib_const /* no const attribute */ - #define __like_printf(n) /* no like-printf */ -#endif -#if APT_GCC_VERSION >= 0x0403 - #define __cold __attribute__ ((__cold__)) - #define __hot __attribute__ ((__hot__)) -#else - #define __cold /* no cold marker */ - #define __hot /* no hot marker */ -#endif -#endif #if __GNUC__ >= 4 #define APT_IGNORE_DEPRECATED_PUSH \ diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h index 38b6c6876..d1287c573 100644 --- a/apt-pkg/contrib/md5.h +++ b/apt-pkg/contrib/md5.h @@ -26,15 +26,6 @@ #include "hashsum_template.h" -#ifndef APT_10_CLEANER_HEADERS -#include -#include -#include -#endif -#ifndef APT_8_CLEANER_HEADERS -using std::string; -using std::min; -#endif typedef HashSumValue<128> MD5SumValue; diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 3af1f47fb..76db7b542 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -29,10 +29,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -using std::string; -#endif class FileFd; diff --git a/apt-pkg/contrib/netrc.h b/apt-pkg/contrib/netrc.h index 96a5a0973..c8a03a4b7 100644 --- a/apt-pkg/contrib/netrc.h +++ b/apt-pkg/contrib/netrc.h @@ -20,14 +20,7 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif -#ifndef APT_15_CLEANER_HEADERS -#define DOT_CHAR "." -#define DIR_CHAR "/" -#endif class URI; class FileFd; diff --git a/apt-pkg/contrib/progress.h b/apt-pkg/contrib/progress.h index 903e6613e..850d009fa 100644 --- a/apt-pkg/contrib/progress.h +++ b/apt-pkg/contrib/progress.h @@ -24,9 +24,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif class Configuration; class OpProgress diff --git a/apt-pkg/contrib/sha1.h b/apt-pkg/contrib/sha1.h index dffb95033..7149da97f 100644 --- a/apt-pkg/contrib/sha1.h +++ b/apt-pkg/contrib/sha1.h @@ -15,15 +15,6 @@ #include "hashsum_template.h" -#ifndef APT_10_CLEANER_HEADERS -#include -#include -#include -#endif -#ifndef APT_8_CLEANER_HEADERS -using std::string; -using std::min; -#endif typedef HashSumValue<160> SHA1SumValue; diff --git a/apt-pkg/contrib/sha2.h b/apt-pkg/contrib/sha2.h index e1a8c6c6e..5489007a2 100644 --- a/apt-pkg/contrib/sha2.h +++ b/apt-pkg/contrib/sha2.h @@ -18,11 +18,6 @@ #include "hashsum_template.h" #include "sha2_internal.h" -#ifndef APT_10_CLEANER_HEADERS -#include -#include -#include -#endif typedef HashSumValue<512> SHA512SumValue; diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 3853d5ba6..367b04ef6 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -26,14 +26,6 @@ #include "macros.h" -#ifndef APT_10_CLEANER_HEADERS -#include -#endif -#ifndef APT_8_CLEANER_HEADERS -using std::string; -using std::vector; -using std::ostream; -#endif namespace APT { namespace String { diff --git a/apt-pkg/deb/debfile.h b/apt-pkg/deb/debfile.h index 21c59a567..06b54a43f 100644 --- a/apt-pkg/deb/debfile.h +++ b/apt-pkg/deb/debfile.h @@ -29,12 +29,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif -#ifndef APT_10_CLEANER_HEADERS -#include -#endif class FileFd; diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 807968452..c041585e6 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -20,9 +20,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif class FileFd; diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 864ac3eba..0038f52f9 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -8,12 +8,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif -#ifndef APT_10_CLEANER_HEADERS -#include -#endif class pkgAcquire; class pkgIndexFile; diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index ea3fc320a..10ef91768 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -20,9 +20,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser { diff --git a/apt-pkg/deb/debsystem.h b/apt-pkg/deb/debsystem.h index 4503676fa..3a308fb1c 100644 --- a/apt-pkg/deb/debsystem.h +++ b/apt-pkg/deb/debsystem.h @@ -19,9 +19,6 @@ class pkgPackageManager; class debSystemPrivate; class pkgDepCache; -#ifndef APT_10_CLEANER_HEADERS -class debStatusIndex; -#endif class debSystem : public pkgSystem { diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 3ba4770e8..a656bf19c 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -18,17 +18,10 @@ #include #include -#ifndef APT_10_CLEANER_HEADERS -#include -#endif class pkgDepCache; namespace APT { namespace Progress { class PackageManager; } } -#ifndef APT_8_CLEANER_HEADERS -using std::vector; -using std::map; -#endif class pkgDPkgPMPrivate; diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 5cbaf5f9a..0e5b7ae01 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -48,14 +48,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#include -#endif -#ifndef APT_10_CLEANER_HEADERS -#include -#include -#endif class OpProgress; class pkgVersioningSystem; diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h index 5eb72d48d..3bcd695cd 100644 --- a/apt-pkg/edsp.h +++ b/apt-pkg/edsp.h @@ -19,10 +19,6 @@ #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 8fa8fdd60..42ef3fea3 100644 --- a/apt-pkg/edsp/edspindexfile.h +++ b/apt-pkg/edsp/edspindexfile.h @@ -11,9 +11,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif class OpProgress; class pkgCacheGenerator; diff --git a/apt-pkg/edsp/edsplistparser.h b/apt-pkg/edsp/edsplistparser.h index 8f56f8abf..6087e77e6 100644 --- a/apt-pkg/edsp/edsplistparser.h +++ b/apt-pkg/edsp/edsplistparser.h @@ -18,11 +18,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -#include -#include -#endif namespace APT { class StringView; diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 8dfd68d9a..2cceeae03 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -17,14 +17,6 @@ #include -#ifndef APT_10_CLEANER_HEADERS -#include -class FileFd; -#endif -#ifndef APT_8_CLEANER_HEADERS -using std::string; -using std::vector; -#endif class pkgTagSection; class pkgCdromStatus; diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h index d69d84d39..dc44532fd 100644 --- a/apt-pkg/indexfile.h +++ b/apt-pkg/indexfile.h @@ -29,12 +29,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif -#ifndef APT_10_CLEANER_HEADERS -class pkgAcquire; -#endif class pkgCacheGenerator; class pkgCacheListParser; diff --git a/apt-pkg/init.h b/apt-pkg/init.h index d062392e3..9b26965b3 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -12,13 +12,6 @@ #ifndef PKGLIB_INIT_H #define PKGLIB_INIT_H -#ifndef APT_8_CLEANER_HEADERS -#include -#include -#endif -#ifndef APT_10_CLEANER_HEADERS -#include -#endif class pkgSystem; class Configuration; diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h index 08affe888..a44e5c21e 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -9,16 +9,6 @@ #include #include -#ifndef APT_10_CLEANER_HEADERS -#include -class pkgCacheGenerator; -class OpProgress; -#endif -#ifndef APT_8_CLEANER_HEADERS -#include -#include -using std::string; -#endif class pkgAcquire; class IndexTarget; diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 9a06e2875..f777b3dc3 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -30,14 +30,6 @@ #include #include -#ifndef APT_10_CLEANER_HEADERS -#include -#include -#endif -#ifndef APT_8_CLEANER_HEADERS -#include -using std::string; -#endif class pkgAcquire; class pkgDepCache; diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 4511aade0..3f77d5eae 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -83,9 +83,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif // size of (potentially big) files like debs or the install size of them typedef uint64_t map_filesize_t; diff --git a/apt-pkg/pkgsystem.h b/apt-pkg/pkgsystem.h index b42070532..1be2668ff 100644 --- a/apt-pkg/pkgsystem.h +++ b/apt-pkg/pkgsystem.h @@ -40,9 +40,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif class pkgDepCache; class pkgPackageManager; diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h index bcd1daf3e..77f246740 100644 --- a/apt-pkg/policy.h +++ b/apt-pkg/policy.h @@ -39,9 +39,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -using std::vector; -#endif class pkgPolicy : public pkgDepCache::Policy { diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h index 255c99868..efbf4bfbc 100644 --- a/apt-pkg/sourcelist.h +++ b/apt-pkg/sourcelist.h @@ -31,14 +31,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif -#ifndef APT_8_CLEANER_HEADERS -#include -using std::string; -using std::vector; -#endif class FileFd; class pkgTagSection; diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index 77d648fa8..8c4b00906 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -18,10 +18,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -using std::vector; -#endif class pkgSourceList; class pkgIndexFile; diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index d00a735c3..8a5884157 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -29,9 +29,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -#include -#endif class FileFd; class pkgTagSectionPrivate; diff --git a/apt-pkg/version.h b/apt-pkg/version.h index 6cb29328e..936c678fd 100644 --- a/apt-pkg/version.h +++ b/apt-pkg/version.h @@ -22,9 +22,6 @@ #include #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif class pkgVersioningSystem { diff --git a/apt-pkg/versionmatch.h b/apt-pkg/versionmatch.h index c9e436723..31ebedb86 100644 --- a/apt-pkg/versionmatch.h +++ b/apt-pkg/versionmatch.h @@ -38,9 +38,6 @@ #include -#ifndef APT_8_CLEANER_HEADERS -using std::string; -#endif class pkgVersionMatch { -- cgit v1.2.3 From 82b881caafa0c82b20db3900f8b76cebd8a393a4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 12 Jun 2019 13:47:46 +0200 Subject: Adjust code for missing includes/using std::string --- apt-pkg/metaindex.cc | 10 +++++----- apt-pkg/statechanges.cc | 2 ++ apt-private/private-json-hooks.cc | 4 +++- ftparchive/sources.cc | 1 + test/libapt/extracttar_test.cc | 1 + 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apt-pkg/metaindex.cc b/apt-pkg/metaindex.cc index 8cbdb5e01..d0b3f5165 100644 --- a/apt-pkg/metaindex.cc +++ b/apt-pkg/metaindex.cc @@ -83,7 +83,7 @@ APT_PURE time_t metaIndex::GetDate() const { return this->Date; } APT_PURE metaIndex::TriState metaIndex::GetLoadedSuccessfully() const { return LoadedSuccessfully; } APT_PURE std::string metaIndex::GetExpectedDist() const { return Dist; } /*}}}*/ -bool metaIndex::CheckDist(string const &MaybeDist) const /*{{{*/ +bool metaIndex::CheckDist(std::string const &MaybeDist) const /*{{{*/ { if (MaybeDist.empty() || this->Codename == MaybeDist || this->Suite == MaybeDist) return true; @@ -93,7 +93,7 @@ bool metaIndex::CheckDist(string const &MaybeDist) const /*{{{*/ Transformed = "experimental"; auto const pos = Transformed.rfind('/'); - if (pos != string::npos) + if (pos != std::string::npos) Transformed = Transformed.substr(0, pos); if (Transformed == ".") @@ -102,7 +102,7 @@ bool metaIndex::CheckDist(string const &MaybeDist) const /*{{{*/ return Transformed.empty() || this->Codename == Transformed || this->Suite == Transformed; } /*}}}*/ -APT_PURE metaIndex::checkSum *metaIndex::Lookup(string const &MetaKey) const /*{{{*/ +APT_PURE metaIndex::checkSum *metaIndex::Lookup(std::string const &MetaKey) const /*{{{*/ { std::map::const_iterator sum = Entries.find(MetaKey); if (sum == Entries.end()) @@ -110,7 +110,7 @@ APT_PURE metaIndex::checkSum *metaIndex::Lookup(string const &MetaKey) const /*{ return sum->second; } /*}}}*/ -APT_PURE bool metaIndex::Exists(string const &MetaKey) const /*{{{*/ +APT_PURE bool metaIndex::Exists(std::string const &MetaKey) const /*{{{*/ { return Entries.find(MetaKey) != Entries.end(); } @@ -118,7 +118,7 @@ APT_PURE bool metaIndex::Exists(string const &MetaKey) const /*{{{*/ std::vector metaIndex::MetaKeys() const /*{{{*/ { std::vector keys; - std::map::const_iterator I = Entries.begin(); + std::map::const_iterator I = Entries.begin(); while(I != Entries.end()) { keys.push_back((*I).first); ++I; diff --git a/apt-pkg/statechanges.cc b/apt-pkg/statechanges.cc index 258c84885..45468e462 100644 --- a/apt-pkg/statechanges.cc +++ b/apt-pkg/statechanges.cc @@ -1,9 +1,11 @@ #include +#include #include #include #include #include #include +#include #include #include diff --git a/apt-private/private-json-hooks.cc b/apt-private/private-json-hooks.cc index 3e0d8c93b..480c4f732 100644 --- a/apt-private/private-json-hooks.cc +++ b/apt-private/private-json-hooks.cc @@ -7,7 +7,9 @@ */ #include +#include #include +#include #include #include @@ -356,7 +358,7 @@ bool RunJsonHook(std::string const &option, std::string const &method, const cha SetCloseExec(STDIN_FILENO, false); SetCloseExec(STDERR_FILENO, false); - string hookfd; + std::string hookfd; strprintf(hookfd, "%d", InfoFD); setenv("APT_HOOK_SOCKET", hookfd.c_str(), 1); diff --git a/ftparchive/sources.cc b/ftparchive/sources.cc index 60a86171f..ee6efda05 100644 --- a/ftparchive/sources.cc +++ b/ftparchive/sources.cc @@ -5,6 +5,7 @@ #include #include +#include #include #include "sources.h" diff --git a/test/libapt/extracttar_test.cc b/test/libapt/extracttar_test.cc index 30934144a..67e0461c2 100644 --- a/test/libapt/extracttar_test.cc +++ b/test/libapt/extracttar_test.cc @@ -1,4 +1,5 @@ #include +#include #include #include #include -- cgit v1.2.3