X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm.h;h=05b8fe9bb7de58140bcf5912f2a9279ec3ab88ba;hb=343423780e984fd9188b55b688190decda19f94c;hp=c7144649940bfd6bbf8008732a480d4f646a85ef;hpb=b2a626cb29d4eb583353d8b6ba569e31e76619e5;p=zpackage diff --git a/zpm.h b/zpm.h index c714464..05b8fe9 100644 --- a/zpm.h +++ b/zpm.h @@ -6,6 +6,7 @@ #include #include #include +#include #include @@ -114,7 +115,7 @@ int zpm_tag(struct zpm *zp, char *path, char *tags); int zpm_md(struct zpm *zp, char *path, int mode, char *owner, char *group, time_t mtime); /* export hash to dest */ -int zpm_extract(struct zpm *pkg, char *hash, char *path, int mode); +int zpm_extract(struct zpm *pkg, char *hash, char *path, mode_t mode); /* export path to dest */ int zpm_export(struct zpm *zp, char *path, uint32_t flags, char *dest); @@ -156,10 +157,8 @@ int zpm_checkinstall(struct zpm *local); int zpm_merge(struct zpm *z, struct zpm *src, uint32_t flags); -#if 1 -void uncompresslzma(void *buf, size_t bufsize, FILE *out); +ssize_t uncompresslzma(void *buf, size_t bufsize, int outfd); void *compresslzma(void *buf, size_t bufsize, size_t *len); -#endif #define SQLERROR(x) fprintf(stderr, "%s %d: %s\n", __func__, __LINE__, (x)) int zpm_hash(char *path, char *hash, uint32_t flags);