X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/7be8c02360bdb9bd7f59b087da874f88af2a7206..05f64ca2e483709faa6bc69dfa79129d2d4c679e:/apt-pkg/versionmatch.cc diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index f336b3c35..284098bdf 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -16,14 +16,21 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include -#include #include /*}}}*/ +using std::string; + // VersionMatch::pkgVersionMatch - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Break up the data string according to the selected type */ @@ -179,9 +186,9 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg) bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string) { if (pattern[0] == '/') { - bool res = false; size_t length = strlen(pattern); if (pattern[length - 1] == '/') { + bool res = false; regex_t preg; char *regex = strdup(pattern + 1); regex[length - 2] = '\0';