summaryrefslogtreecommitdiff
path: root/lib/libalpm/versioncmp.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-09 21:08:10 +0000
committerAaron Griffin <aaron@archlinux.org>2007-02-09 21:08:10 +0000
commitf8cd4858ca35400eaf9e298ff3e0e9c245e0d1e3 (patch)
treebb8120c99d051551ef1d1a08db10981a663cc4fe /lib/libalpm/versioncmp.c
parent0ae434d9e1c96a614ed245a6a1ba595186cf4e97 (diff)
downloadpacman-f8cd4858ca35400eaf9e298ff3e0e9c245e0d1e3.tar.xz
* I made "alpm_versioncmp" public a while back, without noticing this was already done (alpm_pkg_vercmp). I dropped this change, making versioncmp "private" again. (alpm_versioncmp -> _alpm_versioncmp, hidden symbol)
* Make alpm_get_upgrades use the same version check that -Su and -S use.
Diffstat (limited to 'lib/libalpm/versioncmp.c')
-rw-r--r--lib/libalpm/versioncmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/versioncmp.c b/lib/libalpm/versioncmp.c
index 0cc9e78c..489e109d 100644
--- a/lib/libalpm/versioncmp.c
+++ b/lib/libalpm/versioncmp.c
@@ -148,7 +148,7 @@ static int strverscmp (s1, s2)
#endif
/* this function was taken from rpm 4.0.4 and rewritten */
-int SYMEXPORT alpm_versioncmp(const char *a, const char *b)
+int _alpm_versioncmp(const char *a, const char *b)
{
char str1[64], str2[64];
char *ptr1, *ptr2;
@@ -238,7 +238,7 @@ int SYMEXPORT alpm_versioncmp(const char *a, const char *b)
if((!*one) && (!*two)) {
/* compare release numbers */
- if(rel1 && rel2) return(alpm_versioncmp(rel1, rel2));
+ if(rel1 && rel2) return(_alpm_versioncmp(rel1, rel2));
return(0);
}
@@ -256,7 +256,7 @@ int _alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
if(dep->mod == PM_DEP_MOD_ANY) {
equal = 1;
} else {
- int cmp = alpm_versioncmp(pkg->version, dep->version);
+ int cmp = _alpm_versioncmp(pkg->version, dep->version);
switch(dep->mod) {
case PM_DEP_MOD_EQ: equal = (cmp == 0); break;
case PM_DEP_MOD_GE: equal = (cmp >= 0); break;