diff options
Diffstat (limited to 'lib/libalpm/util.h')
-rw-r--r-- | lib/libalpm/util.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h index c66e9881..c1a92a08 100644 --- a/lib/libalpm/util.h +++ b/lib/libalpm/util.h @@ -27,6 +27,7 @@ #include "config.h" #include "alpm_list.h" +#include "alpm.h" #include "package.h" /* pmpkg_t */ #include <stdio.h> @@ -36,6 +37,8 @@ #include <time.h> #include <sys/stat.h> /* struct stat */ #include <archive.h> /* struct archive */ +#include <math.h> /* fabs */ +#include <float.h> /* DBL_EPSILON */ #ifdef ENABLE_NLS #include <libintl.h> /* here so it doesn't need to be included elsewhere */ @@ -63,7 +66,9 @@ #define RET_ERR(err, ret) do { pm_errno = (err); \ _alpm_log(PM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerrorlast()); \ - return(ret); } while(0) + return (ret); } while(0) + +#define DOUBLE_EQ(x, y) (fabs((x) - (y)) < DBL_EPSILON) /** * Used as a buffer/state holder for _alpm_archive_fgets(). @@ -89,8 +94,8 @@ int _alpm_unpack_single(const char *archive, const char *prefix, const char *fn) int _alpm_unpack(const char *archive, const char *prefix, alpm_list_t *list, int breakfirst); int _alpm_rmrf(const char *path); int _alpm_logaction(int usesyslog, FILE *f, const char *fmt, va_list args); -int _alpm_run_chroot(const char *root, const char *path, char *const argv[]); -int _alpm_ldconfig(const char *root); +int _alpm_run_chroot(pmhandle_t *handle, const char *path, char *const argv[]); +int _alpm_ldconfig(pmhandle_t *handle); int _alpm_str_cmp(const void *s1, const void *s2); char *_alpm_filecache_find(const char *filename); const char *_alpm_filecache_setup(void); @@ -113,6 +118,8 @@ char *strndup(const char *s, size_t n); #define SYMEXPORT __attribute__((visibility("default"))) #define SYMHIDDEN __attribute__((visibility("internal"))) +#define UNUSED __attribute__((unused)) + #endif /* _ALPM_UTIL_H */ /* vim: set ts=2 sw=2 noet: */ |