Date: Sunday, March 11, 2007 @ 17:10:03 Author: dan Path: /home/cvs-pacman/pacman-lib/lib/libalpm Modified: Makefile.am (1.18 -> 1.19) add.c (1.126 -> 1.127) alpm.c (1.126 -> 1.127) alpm_list.c (1.10 -> 1.11) cache.c (1.39 -> 1.40) deps.c (1.77 -> 1.78) handle.c (1.37 -> 1.38) versioncmp.c (1.18 -> 1.19) * 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. --------------+ Makefile.am | 2 +- add.c | 2 +- alpm.c | 2 +- alpm_list.c | 4 ++-- cache.c | 8 +++++--- deps.c | 2 +- handle.c | 8 ++++---- versioncmp.c | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-) Index: pacman-lib/lib/libalpm/Makefile.am diff -u pacman-lib/lib/libalpm/Makefile.am:1.18 pacman-lib/lib/libalpm/Makefile.am:1.19 --- pacman-lib/lib/libalpm/Makefile.am:1.18 Thu Feb 22 16:34:51 2007 +++ pacman-lib/lib/libalpm/Makefile.am Sun Mar 11 17:10:02 2007 @@ -8,7 +8,7 @@ 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 Index: pacman-lib/lib/libalpm/add.c diff -u pacman-lib/lib/libalpm/add.c:1.126 pacman-lib/lib/libalpm/add.c:1.127 --- pacman-lib/lib/libalpm/add.c:1.126 Tue Mar 6 14:38:04 2007 +++ pacman-lib/lib/libalpm/add.c Sun Mar 11 17:10:03 2007 @@ -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; Index: pacman-lib/lib/libalpm/alpm.c diff -u pacman-lib/lib/libalpm/alpm.c:1.126 pacman-lib/lib/libalpm/alpm.c:1.127 --- pacman-lib/lib/libalpm/alpm.c:1.126 Mon Mar 5 20:21:41 2007 +++ pacman-lib/lib/libalpm/alpm.c Sun Mar 11 17:10:03 2007 @@ -1071,7 +1071,7 @@ /* 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; Index: pacman-lib/lib/libalpm/alpm_list.c diff -u pacman-lib/lib/libalpm/alpm_list.c:1.10 pacman-lib/lib/libalpm/alpm_list.c:1.11 --- pacman-lib/lib/libalpm/alpm_list.c:1.10 Mon Mar 5 17:13:33 2007 +++ pacman-lib/lib/libalpm/alpm_list.c Sun Mar 11 17:10:03 2007 @@ -427,7 +427,7 @@ * @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 @@ * @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) { Index: pacman-lib/lib/libalpm/cache.c diff -u pacman-lib/lib/libalpm/cache.c:1.39 pacman-lib/lib/libalpm/cache.c:1.40 --- pacman-lib/lib/libalpm/cache.c:1.39 Fri Mar 9 18:26:33 2007 +++ pacman-lib/lib/libalpm/cache.c Sun Mar 11 17:10:03 2007 @@ -213,8 +213,8 @@ 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 @@ 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); } } } Index: pacman-lib/lib/libalpm/deps.c diff -u pacman-lib/lib/libalpm/deps.c:1.77 pacman-lib/lib/libalpm/deps.c:1.78 --- pacman-lib/lib/libalpm/deps.c:1.77 Wed Mar 7 02:45:30 2007 +++ pacman-lib/lib/libalpm/deps.c Sun Mar 11 17:10:03 2007 @@ -424,7 +424,7 @@ return(baddeps); } -pmdepend_t *alpm_splitdep(const char *depstring) +pmdepend_t SYMEXPORT *alpm_splitdep(const char *depstring) { pmdepend_t *depend; char *ptr = NULL; Index: pacman-lib/lib/libalpm/handle.c diff -u pacman-lib/lib/libalpm/handle.c:1.37 pacman-lib/lib/libalpm/handle.c:1.38 --- pacman-lib/lib/libalpm/handle.c:1.37 Mon Mar 5 17:13:34 2007 +++ pacman-lib/lib/libalpm/handle.c Sun Mar 11 17:10:03 2007 @@ -123,7 +123,7 @@ 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 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_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 alpm_option_set_cachedir(const char *cachedir) +void SYMEXPORT alpm_option_set_cachedir(const char *cachedir) { if(handle->cachedir) FREE(handle->cachedir); if(cachedir) { Index: pacman-lib/lib/libalpm/versioncmp.c diff -u pacman-lib/lib/libalpm/versioncmp.c:1.18 pacman-lib/lib/libalpm/versioncmp.c:1.19 --- pacman-lib/lib/libalpm/versioncmp.c:1.18 Wed Mar 7 02:45:30 2007 +++ pacman-lib/lib/libalpm/versioncmp.c Sun Mar 11 17:10:03 2007 @@ -247,7 +247,7 @@ 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;