summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-15 09:40:15 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-15 09:40:15 +0100
commit6e877571bc2dd50e38f2f35675c401d74dbe233d (patch)
tree3687286269bda4e8c86bf779d4cc67ae98a70d68
parentda4f6c5b71eee9eee67225d2c4b396d47f44620d (diff)
Run unifdef -DAPT_PKG_ABI=700 again
main picked up a couple new ifdefs since the branch started; so clean them up again.
-rw-r--r--apt-pkg/contrib/hashes.cc4
-rw-r--r--apt-pkg/contrib/hashes.h4
-rw-r--r--apt-pkg/contrib/macros.h26
-rw-r--r--apt-pkg/pkgcache.h11
-rw-r--r--apt-pkg/pkgcachegen.cc10
-rw-r--r--apt-pkg/tagfile.cc12
-rw-r--r--apt-pkg/tagfile.h6
-rw-r--r--ftparchive/writer.cc4
8 files changed, 0 insertions, 77 deletions
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index c7a4ab0e7..9c0ce40d2 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -55,11 +55,7 @@ HashString::HashString(std::string Type, std::string Hash) : Type(Type), Hash(Ha
{
}
-#if APT_PKG_ABI > 600
HashString::HashString(std::string_view StringedHash) /*{{{*/
-#else
-HashString::HashString(std::string StringedHash) /*{{{*/
-#endif
{
if (StringedHash.find(":") == std::string::npos)
{
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 69b742f10..18feae57b 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -40,11 +40,7 @@ class APT_PUBLIC HashString
public:
HashString(std::string Type, std::string Hash);
-#if APT_PKG_ABI > 600
explicit HashString(std::string_view StringedHashString); // init from str as "type:hash"
-#else
- explicit HashString(std::string StringedHashString); // init from str as "type:hash"
-#endif
HashString();
// get hash type used
diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
index 996302971..08e7aeb72 100644
--- a/apt-pkg/contrib/macros.h
+++ b/apt-pkg/contrib/macros.h
@@ -109,31 +109,5 @@ AptScopeWrapper(F) -> AptScopeWrapper<F>;
#ifndef APT_COMPILING_APT
-#if APT_PKG_ABI <= 600
-#if __cplusplus >= 201103L
- #define APT_OVERRIDE override
-#else
- #define APT_OVERRIDE /* no c++11 standard */
-#endif
-#define APT_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
-#define FLAG(f) (1L << (f))
-#define SETFLAG(v,f) ((v) |= FLAG(f))
-#define CLRFLAG(v,f) ((v) &=~FLAG(f))
-#define CHKFLAG(v,f) ((v) & FLAG(f) ? true : false)
-#if APT_GCC_VERSION >= 0x0300
- #define APT_DEPRECATED __attribute__ ((deprecated))
- #define APT_DEPRECATED_MSG(X) __attribute__ ((deprecated(X)))
- #define APT_NORETURN __attribute__((noreturn))
- #define APT_UNUSED __attribute__((unused))
- #define APT_MUSTCHECK __attribute__((warn_unused_result))
-#else
- #define APT_DEPRECATED
- #define APT_DEPRECATED_MSG(X)
- #define APT_NORETURN
- #define APT_UNUSED
- #define APT_MUSTCHECK
-#endif
-#define APT_IGNORE_DEPRECATED(XXX) XXX
-#endif
#endif
#endif
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index ed445b5bc..22eea3f6c 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -340,13 +340,8 @@ struct pkgCache::Header
map_id_t DependsDataCount;
map_fileid_t ReleaseFileCount;
map_fileid_t PackageFileCount;
-#if APT_PKG_ABI <= 600
- map_fileid_t VerFileCount;
- map_fileid_t DescFileCount;
-#else
map_id_t VerFileCount;
map_id_t DescFileCount;
-#endif
map_id_t ProvidesCount;
/** \brief index of the first PackageFile structure
@@ -603,9 +598,6 @@ struct pkgCache::VerFile
map_pointer<VerFile> NextFile;
/** \brief position in the package file */
map_filesize_t Offset; // File offset
-#if APT_PKG_ABI <= 600
- [[deprecated("No usage in src:apt, try MaxVerFileSize instead")]] map_filesize_t Size;
-#endif
};
/*}}}*/
// DescFile structure /*{{{*/
@@ -618,9 +610,6 @@ struct pkgCache::DescFile
map_pointer<DescFile> NextFile;
/** \brief position in the file */
map_filesize_t Offset; // File offset
-#if APT_PKG_ABI <= 600
- [[deprecated("No usage in src:apt, try MaxDescFileSize instead")]] map_filesize_t Size;
-#endif
};
/*}}}*/
// Version structure /*{{{*/
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 8c4a1c517..fec931cf2 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -869,11 +869,6 @@ bool pkgCacheGenerator::NewFileVer(pkgCache::VerIterator &Ver,
auto const Size = List.Size();
if (Cache.HeaderP->MaxVerFileSize < Size)
Cache.HeaderP->MaxVerFileSize = Size;
-#if APT_PKG_ABI <= 600
- APT_IGNORE_DEPRECATED_PUSH
- VF->Size = Size;
- APT_IGNORE_DEPRECATED_POP
-#endif
Cache.HeaderP->VerFileCount++;
return true;
@@ -975,11 +970,6 @@ bool pkgCacheGenerator::NewFileDesc(pkgCache::DescIterator &Desc,
auto const Size = List.Size();
if (Cache.HeaderP->MaxDescFileSize < Size)
Cache.HeaderP->MaxDescFileSize = Size;
-#if APT_PKG_ABI <= 600
- APT_IGNORE_DEPRECATED_PUSH
- DF->Size = Size;
- APT_IGNORE_DEPRECATED_POP
-#endif
Cache.HeaderP->DescFileCount++;
return true;
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc
index bb0244cd5..26bf70804 100644
--- a/apt-pkg/tagfile.cc
+++ b/apt-pkg/tagfile.cc
@@ -958,27 +958,15 @@ APT_PURE unsigned int pkgTagSection::Count() const { /*{{{*/
}
/*}}}*/
// TagSection::Write - Ordered (re)writing of fields /*{{{*/
-#if APT_PKG_ABI > 600
pkgTagSection::Tag pkgTagSection::Tag::Remove(std::string_view Name)
-#else
-pkgTagSection::Tag pkgTagSection::Tag::Remove(std::string const &Name)
-#endif
{
return Tag(REMOVE, Name, "");
}
-#if APT_PKG_ABI > 600
pkgTagSection::Tag pkgTagSection::Tag::Rename(std::string_view OldName, std::string_view NewName)
-#else
-pkgTagSection::Tag pkgTagSection::Tag::Rename(std::string const &OldName, std::string const &NewName)
-#endif
{
return Tag(RENAME, OldName, NewName);
}
-#if APT_PKG_ABI > 600
pkgTagSection::Tag pkgTagSection::Tag::Rewrite(std::string_view Name, std::string_view Data)
-#else
-pkgTagSection::Tag pkgTagSection::Tag::Rewrite(std::string const &Name, std::string const &Data)
-#endif
{
if (Data.empty() == true)
return Tag(REMOVE, Name, "");
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index bea6f37ba..4c5871833 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -150,15 +150,9 @@ class APT_PUBLIC pkgTagSection
std::string Name;
std::string Data;
-#if APT_PKG_ABI > 600
static Tag Remove(std::string_view Name);
static Tag Rename(std::string_view OldName, std::string_view NewName);
static Tag Rewrite(std::string_view Name, std::string_view Data);
-#else
- static Tag Remove(std::string const &Name);
- static Tag Rename(std::string const &OldName, std::string const &NewName);
- static Tag Rewrite(std::string const &Name, std::string const &Data);
-#endif
private:
Tag(ActionType const Action, std::string_view Name, std::string_view Data) :
Action(Action), Name(Name), Data(Data) {}
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index 78852e772..a0319caf4 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -822,11 +822,7 @@ bool SourcesWriter::DoPackage(string FileName)
std::vector<pkgTagSection::Tag> Changes;
Changes.push_back(pkgTagSection::Tag::Remove("Source"));
-#if APT_PKG_ABI > 600
Changes.push_back(pkgTagSection::Tag::Rewrite("Package", Package));
-#else
- Changes.push_back(pkgTagSection::Tag::Rewrite("Package", std::string{Package}));
-#endif
if (Files.empty() == false)
Changes.push_back(pkgTagSection::Tag::Rewrite("Files", Files));
else