diff options
Diffstat (limited to 'lib/libalpm/package.h')
-rw-r--r-- | lib/libalpm/package.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h index fda10800..9a877ffd 100644 --- a/lib/libalpm/package.h +++ b/lib/libalpm/package.h @@ -25,9 +25,7 @@ #ifndef _ALPM_PACKAGE_H #define _ALPM_PACKAGE_H -#if defined(__APPLE__) || defined(__sun__) #include <time.h> -#endif #include "alpm.h" #include "db.h" @@ -48,7 +46,6 @@ typedef enum _pmpkgfrom_t { #define PKG_TYPE_LEN 32 #define PKG_PACKAGER_LEN 64 #define PKG_MD5SUM_LEN 33 -#define PKG_SHA1SUM_LEN 41 #define PKG_ARCH_LEN 32 struct __pmpkg_t { @@ -58,11 +55,9 @@ struct __pmpkg_t { char desc[PKG_DESC_LEN]; char url[PKG_URL_LEN]; char builddate[PKG_DATE_LEN]; - char buildtype[PKG_TYPE_LEN]; char installdate[PKG_DATE_LEN]; char packager[PKG_PACKAGER_LEN]; char md5sum[PKG_MD5SUM_LEN]; - char sha1sum[PKG_SHA1SUM_LEN]; char arch[PKG_ARCH_LEN]; unsigned long size; unsigned long isize; @@ -70,7 +65,6 @@ struct __pmpkg_t { unsigned short force; time_t date; pmpkgreason_t reason; - /* alpm_list_t *desc_localized;*/ alpm_list_t *licenses; alpm_list_t *replaces; alpm_list_t *groups; @@ -82,18 +76,18 @@ struct __pmpkg_t { alpm_list_t *provides; /* internal */ pmpkgfrom_t origin; - void *data; - /* TODO replace 'data' with this: + /* Replaced 'void *data' with this union as follows: origin == PKG_FROM_CACHE, use pkg->origin_data.db - origin == PKG_FROM_FILE, use pkg->origin_data.fd + origin == PKG_FROM_FILE, use pkg->origin_data.file + */ union { - int fd; pmdb_t *db; + char *file; } origin_data; - */ pmdbinfrq_t infolevel; }; +int _alpm_versioncmp(const char *a, const char *b); 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); |