mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
* Fix group comparison issue and associated compilation warnings by using
the alpm strcmp operation which takes void* references. * We had this great visibility patch, but never actually took advantage of it. Added the right compile flag to make it work and added some more SYMEXPORTs where necessary to have a successful compile.
This commit is contained in:
parent
f94506396f
commit
7f7da2b5fc
@ -8,7 +8,7 @@ include_HEADERS = alpm_list.h alpm.h
|
||||
localedir = $(datadir)/locale
|
||||
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
||||
|
||||
AM_CFLAGS = -pedantic -D_GNU_SOURCE $(CFLAGS)
|
||||
AM_CFLAGS = -fvisibility=hidden -pedantic -D_GNU_SOURCE $(CFLAGS)
|
||||
|
||||
EXTRA_DIST = Doxyfile
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
||||
#include "remove.h"
|
||||
#include "handle.h"
|
||||
|
||||
int SYMHIDDEN _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
|
||||
int _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
|
||||
{
|
||||
pmpkg_t *info = NULL;
|
||||
pmpkg_t *dummy;
|
||||
|
@ -1071,7 +1071,7 @@ int SYMEXPORT alpm_parse_config(char *file, alpm_cb_db_register callback, const
|
||||
/* This function is mostly the same as sync.c find_replacements and sysupgrade
|
||||
* functions, and we should be able to combine them - this is an interim
|
||||
* solution made for -Qu operation */
|
||||
alpm_list_t *alpm_get_upgrades()
|
||||
alpm_list_t SYMEXPORT *alpm_get_upgrades()
|
||||
{
|
||||
alpm_list_t *syncpkgs = NULL;
|
||||
alpm_list_t *i, *j, *k, *m;
|
||||
|
@ -427,7 +427,7 @@ int SYMEXPORT alpm_list_count(const alpm_list_t *list)
|
||||
* @param haystack the list to search
|
||||
* @return 1 if `needle` is found, 0 otherwise
|
||||
*/
|
||||
int alpm_list_find(alpm_list_t *haystack, const void *needle)
|
||||
int SYMEXPORT alpm_list_find(alpm_list_t *haystack, const void *needle)
|
||||
{
|
||||
alpm_list_t *lp = haystack;
|
||||
while(lp) {
|
||||
@ -446,7 +446,7 @@ int alpm_list_find(alpm_list_t *haystack, const void *needle)
|
||||
* @param haystack the list to search
|
||||
* @return 1 if `needle` is found, 0 otherwise
|
||||
*/
|
||||
int alpm_list_find_str(alpm_list_t *haystack, const char *needle)
|
||||
int SYMEXPORT alpm_list_find_str(alpm_list_t *haystack, const char *needle)
|
||||
{
|
||||
alpm_list_t *lp = haystack;
|
||||
while(lp) {
|
||||
|
@ -213,8 +213,8 @@ int _alpm_db_load_grpcache(pmdb_t *db)
|
||||
grp->packages = alpm_list_add_sorted(grp->packages,
|
||||
/* gross signature forces us to
|
||||
* discard const */
|
||||
(void *)alpm_pkg_get_name(pkg),
|
||||
strcmp);
|
||||
(void*)alpm_pkg_get_name(pkg),
|
||||
_alpm_str_cmp);
|
||||
db->grpcache = alpm_list_add_sorted(db->grpcache, grp, _alpm_grp_cmp);
|
||||
} else {
|
||||
alpm_list_t *j;
|
||||
@ -225,7 +225,9 @@ int _alpm_db_load_grpcache(pmdb_t *db)
|
||||
if(strcmp(grp->name, i->data) == 0) {
|
||||
const char *pkgname = alpm_pkg_get_name(pkg);
|
||||
if(!alpm_list_find_str(grp->packages, pkgname)) {
|
||||
grp->packages = alpm_list_add_sorted(grp->packages, (void *)pkgname, strcmp);
|
||||
grp->packages = alpm_list_add_sorted(grp->packages,
|
||||
(void*)pkgname,
|
||||
_alpm_str_cmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ alpm_list_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, pmtranstype_t op,
|
||||
return(baddeps);
|
||||
}
|
||||
|
||||
pmdepend_t *alpm_splitdep(const char *depstring)
|
||||
pmdepend_t SYMEXPORT *alpm_splitdep(const char *depstring)
|
||||
{
|
||||
pmdepend_t *depend;
|
||||
char *ptr = NULL;
|
||||
|
@ -123,7 +123,7 @@ int _alpm_handle_free(pmhandle_t *handle)
|
||||
|
||||
alpm_cb_log alpm_option_get_logcb() { return (handle ? handle->logcb : NULL); }
|
||||
alpm_cb_download alpm_option_get_dlcb() { return (handle ? handle->dlcb : NULL); }
|
||||
unsigned short alpm_option_get_logmask() { return handle->logmask; }
|
||||
unsigned short SYMEXPORT alpm_option_get_logmask() { return handle->logmask; }
|
||||
const char SYMEXPORT *alpm_option_get_root() { return handle->root; }
|
||||
const char SYMEXPORT *alpm_option_get_dbpath() { return handle->dbpath; }
|
||||
const char SYMEXPORT *alpm_option_get_cachedir() { return handle->cachedir; }
|
||||
@ -139,7 +139,7 @@ unsigned short alpm_option_get_nopassiveftp() { return handle->nopassiveftp; }
|
||||
unsigned short SYMEXPORT alpm_option_get_chomp() { return handle->chomp; }
|
||||
unsigned short alpm_option_get_usecolor() { return handle->use_color; }
|
||||
|
||||
pmdb_t *alpm_option_get_localdb() { return handle->db_local; }
|
||||
pmdb_t SYMEXPORT *alpm_option_get_localdb() { return handle->db_local; }
|
||||
alpm_list_t SYMEXPORT *alpm_option_get_syncdbs()
|
||||
{
|
||||
return handle->dbs_sync;
|
||||
@ -151,7 +151,7 @@ void SYMEXPORT alpm_option_set_dlcb(alpm_cb_download cb) { handle->dlcb = cb; }
|
||||
|
||||
void SYMEXPORT alpm_option_set_logmask(unsigned short mask) { handle->logmask = mask; }
|
||||
|
||||
void alpm_option_set_root(const char *root)
|
||||
void SYMEXPORT alpm_option_set_root(const char *root)
|
||||
{
|
||||
if(handle->root) FREE(handle->root);
|
||||
/* According to the man page, realpath is safe to use IFF the second arg is
|
||||
@ -196,7 +196,7 @@ void SYMEXPORT alpm_option_set_dbpath(const char *dbpath)
|
||||
}
|
||||
}
|
||||
|
||||
void alpm_option_set_cachedir(const char *cachedir)
|
||||
void SYMEXPORT alpm_option_set_cachedir(const char *cachedir)
|
||||
{
|
||||
if(handle->cachedir) FREE(handle->cachedir);
|
||||
if(cachedir) {
|
||||
|
@ -247,7 +247,7 @@ int _alpm_versioncmp(const char *a, const char *b)
|
||||
return(*one ? 1 : -1);
|
||||
}
|
||||
|
||||
int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
|
||||
int SYMEXPORT alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep)
|
||||
{
|
||||
int equal = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user