Fix library interface

Two functions defined in alpm.h were not marked with SYMEXPORT, causing
linking errors if they were used.

In addition, remove the incorrect use of the 'alpm_' prefix from an internal
function and replace it with '_alpm_'.

Fixes FS#9155.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2008-01-11 08:43:10 -06:00
parent 0a65de10b1
commit f9a7d8cba4
4 changed files with 6 additions and 6 deletions

View File

@ -488,7 +488,7 @@ void SYMEXPORT alpm_option_add_ignorepkg(const char *pkg)
handle->ignorepkg = alpm_list_add(handle->ignorepkg, strdup(pkg));
}
void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs)
void SYMEXPORT alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs)
{
if(handle->ignorepkg) FREELIST(handle->ignorepkg);
if(ignorepkgs) handle->ignorepkg = ignorepkgs;
@ -534,7 +534,7 @@ void SYMEXPORT alpm_option_add_ignoregrp(const char *grp)
handle->ignoregrp = alpm_list_add(handle->ignoregrp, strdup(grp));
}
void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps)
void SYMEXPORT alpm_option_set_ignoregrps(alpm_list_t *ignoregrps)
{
if(handle->ignoregrp) FREELIST(handle->ignoregrp);
if(ignoregrps) handle->ignoregrp = ignoregrps;

View File

@ -825,7 +825,7 @@ void _alpm_pkg_free(pmpkg_t *pkg)
}
/* Is pkgB an upgrade for pkgA ? */
int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg)
{
int cmp = 0;

View File

@ -90,7 +90,7 @@ pmpkg_t* _alpm_pkg_new(const char *name, const char *version);
pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg);
void _alpm_pkg_free(pmpkg_t *pkg);
int _alpm_pkg_cmp(const void *p1, const void *p2);
int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full);
pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack);
int _alpm_pkg_should_ignore(pmpkg_t *pkg);

View File

@ -238,7 +238,7 @@ int _alpm_sync_sysupgrade(pmtrans_t *trans,
}
/* compare versions and see if we need to upgrade */
if(alpm_pkg_compare_versions(local, spkg)) {
if(_alpm_pkg_compare_versions(local, spkg)) {
_alpm_log(PM_LOG_DEBUG, "%s elected for upgrade (%s => %s)\n",
alpm_pkg_get_name(local), alpm_pkg_get_version(local),
alpm_pkg_get_version(spkg));
@ -330,7 +330,7 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy
local = _alpm_db_get_pkgfromcache(db_local, alpm_pkg_get_name(spkg));
if(local) {
if(alpm_pkg_compare_versions(local, spkg) == 0) {
if(_alpm_pkg_compare_versions(local, spkg) == 0) {
/* spkg is NOT an upgrade */
if(trans->flags & PM_TRANS_FLAG_NEEDED) {
_alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping\n"),