summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/buildio.h2
-rw-r--r--build/files.c6
-rw-r--r--build/pack.c2
-rw-r--r--lib/formats.c4
-rw-r--r--lib/fsm.c8
-rw-r--r--lib/fsm.h4
-rw-r--r--lib/psm.c4
-rw-r--r--lib/query.c4
-rw-r--r--lib/rpmcallback.h4
-rw-r--r--lib/rpmcli.h4
-rw-r--r--lib/rpmfi.c4
-rw-r--r--lib/rpmfi.h2
-rw-r--r--lib/rpmfi_internal.h8
-rw-r--r--lib/rpminstall.c6
-rw-r--r--lib/rpmte.c2
-rw-r--r--lib/rpmte.h2
-rw-r--r--lib/rpmte_internal.h2
-rw-r--r--lib/rpmts.c4
-rw-r--r--lib/rpmts.h4
-rw-r--r--lib/rpmtypes.h2
-rw-r--r--lib/signature.c4
-rw-r--r--lib/tthread.c4
-rw-r--r--lib/verify.c2
-rw-r--r--python/rpmts-py.c2
-rw-r--r--rpmio/rpmfileutil.c4
-rw-r--r--rpmio/rpmfileutil.h2
-rw-r--r--rpmio/rpmio_internal.h4
27 files changed, 51 insertions, 49 deletions
diff --git a/build/buildio.h b/build/buildio.h
index 4750035cd..3608e1405 100644
--- a/build/buildio.h
+++ b/build/buildio.h
@@ -17,7 +17,7 @@ extern "C" {
/**
*/
typedef struct cpioSourceArchive_s {
- unsigned int cpioArchiveSize;
+ rpm_off_t cpioArchiveSize;
FD_t cpioFdIn;
rpmfi cpioList;
} * CSA_t;
diff --git a/build/files.c b/build/files.c
index 23f9e8c2b..c700a0399 100644
--- a/build/files.c
+++ b/build/files.c
@@ -97,7 +97,7 @@ typedef struct FileList_s {
char * prefix;
int fileCount;
- int totalFileSize;
+ rpm_off_t totalFileSize;
int processingFailed;
int passedSpecialDoc;
@@ -1125,8 +1125,8 @@ static void genCpioListAndHeader(FileList fl,
(void) headerAddOrAppendEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
&(flp->fileURL), 1);
- if (sizeof(flp->fl_size) != sizeof(uint32_t)) {
- uint32_t psize = (uint32_t)flp->fl_size;
+ if (sizeof(flp->fl_size) != sizeof(rpm_off_t)) {
+ rpm_off_t psize = (rpm_off_t)flp->fl_size;
(void) headerAddOrAppendEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
&(psize), 1);
} else {
diff --git a/build/pack.c b/build/pack.c
index ae09c27fe..fd727466e 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -463,7 +463,7 @@ rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName,
SHA1 = _free(SHA1);
}
- { uint32_t payloadSize = csa->cpioArchiveSize;
+ { rpm_off_t payloadSize = csa->cpioArchiveSize;
(void) headerAddEntry(sig, RPMSIGTAG_PAYLOADSIZE, RPM_INT32_TYPE,
&payloadSize, 1);
}
diff --git a/lib/formats.c b/lib/formats.c
index 545562a7a..eb9f965c1 100644
--- a/lib/formats.c
+++ b/lib/formats.c
@@ -555,8 +555,8 @@ static int fssizesTag(Header h, rpm_tagtype_t* type,
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
const char ** filenames;
- int32_t * filesizes;
- uint32_t * usages;
+ rpm_off_t * filesizes;
+ rpm_off_t * usages;
rpm_count_t numFiles;
if (!hge(h, RPMTAG_FILESIZES, NULL, (rpm_data_t *) &filesizes, &numFiles)) {
diff --git a/lib/fsm.c b/lib/fsm.c
index 192d344aa..bc11d0451 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -489,9 +489,9 @@ FSM_t freeFSM(FSM_t fsm)
int fsmSetup(FSM_t fsm, fileStage goal,
const rpmts ts, const rpmfi fi, FD_t cfd,
- unsigned int * archiveSize, char ** failedFile)
+ rpm_off_t * archiveSize, char ** failedFile)
{
- size_t pos = 0;
+ rpm_off_t pos = 0;
int rc, ec = 0;
fsm->goal = goal;
@@ -741,7 +741,7 @@ int fsmMapAttrs(FSM_t fsm)
static int expandRegular(FSM_t fsm)
{
const struct stat * st = &fsm->sb;
- int left = st->st_size;
+ rpm_off_t left = st->st_size;
int rc = 0;
rc = fsmNext(fsm, FSM_WOPEN);
@@ -1683,7 +1683,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
rpmts ts = fsmGetTs(fsm);
rpmfi fi = fsmGetFi(fsm);
void * ptr;
- unsigned int archivePos = fdGetCpioPos(fsm->cfd);
+ rpm_off_t archivePos = fdGetCpioPos(fsm->cfd);
if (archivePos > fi->archivePos) {
fi->archivePos = archivePos;
ptr = rpmtsNotify(ts, fi->te, RPMCALLBACK_INST_PROGRESS,
diff --git a/lib/fsm.h b/lib/fsm.h
index 9e7450324..a12607985 100644
--- a/lib/fsm.h
+++ b/lib/fsm.h
@@ -130,7 +130,7 @@ struct fsm_s {
int ix; /*!< Current file iterator index. */
hardLink_t links; /*!< Pending hard linked file(s). */
hardLink_t li; /*!< Current hard linked file(s). */
- unsigned int * archiveSize; /*!< Pointer to archive size. */
+ rpm_off_t * archiveSize; /*!< Pointer to archive size. */
char ** failedFile; /*!< First file name that failed. */
const char * subdir; /*!< Current file sub-directory. */
char subbuf[64]; /* XXX eliminate */
@@ -211,7 +211,7 @@ int fsmSetup(FSM_t fsm, fileStage goal,
const rpmts ts,
const rpmfi fi,
FD_t cfd,
- unsigned int * archiveSize,
+ rpm_off_t * archiveSize,
char ** failedFile);
/**
diff --git a/lib/psm.c b/lib/psm.c
index e88106cbd..273e9e316 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -62,8 +62,8 @@ struct rpmpsm_s {
int chrootDone; /*!< Was chroot(2) done by pkgStage? */
int unorderedSuccessor; /*!< Can the PSM be run asynchronously? */
rpmCallbackType what; /*!< Callback type. */
- unsigned long amount; /*!< Callback amount. */
- unsigned long total; /*!< Callback total. */
+ rpm_off_t amount; /*!< Callback amount. */
+ rpm_off_t total; /*!< Callback total. */
rpmRC rc;
pkgStage goal;
pkgStage stage; /*!< Current psm stage. */
diff --git a/lib/query.c b/lib/query.c
index c8644e179..75f512690 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -28,7 +28,7 @@
/**
*/
static void printFileInfo(char * te, const char * name,
- unsigned int size, unsigned short mode,
+ rpm_off_t size, unsigned short mode,
unsigned int mtime,
unsigned short rdev, unsigned int nlink,
const char * owner, const char * group,
@@ -185,7 +185,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
unsigned short frdev;
unsigned int fmtime;
rpmfileState fstate;
- size_t fsize;
+ rpm_off_t fsize;
const char * fn;
char fmd5[32+1];
const char * fuser;
diff --git a/lib/rpmcallback.h b/lib/rpmcallback.h
index 82ed68744..0a6c9ec9f 100644
--- a/lib/rpmcallback.h
+++ b/lib/rpmcallback.h
@@ -35,8 +35,8 @@ typedef enum rpmCallbackType_e {
typedef void * (*rpmCallbackFunction)
(const void * h,
const rpmCallbackType what,
- const unsigned long amount,
- const unsigned long total,
+ const rpm_off_t amount,
+ const rpm_off_t total,
fnpyKey key,
rpmCallbackData data);
diff --git a/lib/rpmcli.h b/lib/rpmcli.h
index 64700e759..425fde0ff 100644
--- a/lib/rpmcli.h
+++ b/lib/rpmcli.h
@@ -470,8 +470,8 @@ extern int rpmcliProgressTotal;
*/
void * rpmShowProgress(const void * arg,
const rpmCallbackType what,
- const unsigned long amount,
- const unsigned long total,
+ const rpm_off_t amount,
+ const rpm_off_t total,
fnpyKey key,
void * data);
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 5ad0053bf..fe75c6b61 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -193,9 +193,9 @@ const char * rpmfiFLink(rpmfi fi)
return flink;
}
-uint32_t rpmfiFSize(rpmfi fi)
+rpm_off_t rpmfiFSize(rpmfi fi)
{
- uint32_t fsize = 0;
+ rpm_off_t fsize = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fsizes != NULL)
diff --git a/lib/rpmfi.h b/lib/rpmfi.h
index 40262806f..d2237d6f5 100644
--- a/lib/rpmfi.h
+++ b/lib/rpmfi.h
@@ -223,7 +223,7 @@ extern const char * rpmfiFLink(rpmfi fi);
* @param fi file info set
* @return current file size, 0 on invalid
*/
-uint32_t rpmfiFSize(rpmfi fi);
+rpm_off_t rpmfiFSize(rpmfi fi);
/** \ingroup rpmfi
* Return current file rdev from file info set.
diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h
index 651110534..ce3aab279 100644
--- a/lib/rpmfi_internal.h
+++ b/lib/rpmfi_internal.h
@@ -43,7 +43,7 @@ struct rpmfi_s {
/*?null?*/
const uint32_t * fflags; /*!< File flag(s) (from header) */
/*?null?*/
- const uint32_t * fsizes; /*!< File size(s) (from header) */
+ const rpm_off_t * fsizes; /*!< File size(s) (from header) */
/*?null?*/
const uint32_t * fmtimes; /*!< File modification time(s) (from header) */
/*?null?*/
@@ -108,8 +108,8 @@ struct rpmfi_s {
size_t astriplen;
size_t striplen;
- unsigned int archivePos;
- unsigned int archiveSize;
+ rpm_off_t archivePos;
+ rpm_off_t archiveSize;
mode_t dperms; /*!< Directory perms (0755) if not mapped. */
mode_t fperms; /*!< File perms (0644) if not mapped. */
const char ** apath;
@@ -119,7 +119,7 @@ struct rpmfi_s {
int keep_header; /*!< Keep header? */
uint32_t color; /*!< Color bit(s) from file color union. */
sharedFileInfo replaced; /*!< (TR_ADDED) */
- uint32_t * replacedSizes; /*!< (TR_ADDED) */
+ rpm_off_t * replacedSizes; /*!< (TR_ADDED) */
unsigned int record; /*!< (TR_REMOVED) */
int magic;
#define RPMFIMAGIC 0x09697923
diff --git a/lib/rpminstall.c b/lib/rpminstall.c
index e0176344c..b9d7e8520 100644
--- a/lib/rpminstall.c
+++ b/lib/rpminstall.c
@@ -29,7 +29,7 @@ int rpmcliProgressTotal = 0;
* @param amount current
* @param total final
*/
-static void printHash(const unsigned long amount, const unsigned long total)
+static void printHash(const rpm_off_t amount, const rpm_off_t total)
{
int hashesNeeded;
@@ -74,8 +74,8 @@ static void printHash(const unsigned long amount, const unsigned long total)
void * rpmShowProgress(const void * arg,
const rpmCallbackType what,
- const unsigned long amount,
- const unsigned long total,
+ const rpm_off_t amount,
+ const rpm_off_t total,
fnpyKey key,
void * data)
{
diff --git a/lib/rpmte.c b/lib/rpmte.c
index 05ea8b943..48c172503 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -301,7 +301,7 @@ uint32_t rpmteSetColor(rpmte te, uint32_t color)
return ocolor;
}
-uint32_t rpmtePkgFileSize(rpmte te)
+rpm_off_t rpmtePkgFileSize(rpmte te)
{
return (te != NULL ? te->pkgFileSize : 0);
}
diff --git a/lib/rpmte.h b/lib/rpmte.h
index 82d7bcaca..fa426a6cf 100644
--- a/lib/rpmte.h
+++ b/lib/rpmte.h
@@ -165,7 +165,7 @@ void rpmteSetDBInstance(rpmte te, unsigned int instance);
* @param te transaction element
* @return size in bytes of package file.
*/
-uint32_t rpmtePkgFileSize(rpmte te);
+rpm_off_t rpmtePkgFileSize(rpmte te);
/** \ingroup rpmte
* Retrieve dependency tree depth of transaction element.
diff --git a/lib/rpmte_internal.h b/lib/rpmte_internal.h
index 7051bdcbb..95e43d94e 100644
--- a/lib/rpmte_internal.h
+++ b/lib/rpmte_internal.h
@@ -55,7 +55,7 @@ struct rpmte_s {
rpmfi fi; /*!< File information. */
uint32_t color; /*!< Color bit(s) from package dependencies. */
- uint32_t pkgFileSize; /*!< No. of bytes in package file (approx). */
+ rpm_off_t pkgFileSize; /*!< No. of bytes in package file (approx). */
fnpyKey key; /*!< (TR_ADDED) Retrieval key. */
rpmRelocation * relocs; /*!< (TR_ADDED) Payload file relocations. */
diff --git a/lib/rpmts.c b/lib/rpmts.c
index a4ba78dbb..bb83da35d 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -1297,7 +1297,7 @@ int rpmtsInitDSI(const rpmts ts)
}
void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
- uint32_t fileSize, uint32_t prevSize, uint32_t fixupSize,
+ rpm_off_t fileSize, rpm_off_t prevSize, rpm_off_t fixupSize,
rpmFileAction action)
{
rpmDiskSpaceInfo dsi;
@@ -1384,7 +1384,7 @@ void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
}
void * rpmtsNotify(rpmts ts, rpmte te,
- rpmCallbackType what, unsigned long amount, unsigned long total)
+ rpmCallbackType what, rpm_off_t amount, rpm_off_t total)
{
void * ptr = NULL;
if (ts && ts->notify && te) {
diff --git a/lib/rpmts.h b/lib/rpmts.h
index f9ebb8f0a..049629c6c 100644
--- a/lib/rpmts.h
+++ b/lib/rpmts.h
@@ -603,7 +603,7 @@ int rpmtsInitDSI(const rpmts ts);
* @param action file disposition
*/
void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
- uint32_t fileSize, uint32_t prevSize, uint32_t fixupSize,
+ rpm_off_t fileSize, rpm_off_t prevSize, rpm_off_t fixupSize,
rpmFileAction action);
/** \ingroup rpmts
@@ -623,7 +623,7 @@ void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te);
* @return callback dependent pointer
*/
void * rpmtsNotify(rpmts ts, rpmte te,
- rpmCallbackType what, unsigned long amount, unsigned long total);
+ rpmCallbackType what, rpm_off_t amount, rpm_off_t total);
/** \ingroup rpmts
* Return number of (ordered) transaction set elements.
diff --git a/lib/rpmtypes.h b/lib/rpmtypes.h
index 07ae98c14..3170b7baf 100644
--- a/lib/rpmtypes.h
+++ b/lib/rpmtypes.h
@@ -24,6 +24,8 @@ typedef uint32_t rpm_count_t;
typedef void * rpm_data_t;
typedef const void * rpm_constdata_t;
+typedef uint32_t rpm_off_t;
+
typedef struct headerToken_s * Header;
typedef struct headerIterator_s * HeaderIterator;
diff --git a/lib/signature.c b/lib/signature.c
index 7e19439b0..92fdc2a6b 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -106,7 +106,7 @@ const char * rpmDetectPGPVersion(pgpVersion * pgpVer)
* @param datalen length of header+payload
* @return rpmRC return code
*/
-static inline rpmRC printSize(FD_t fd, size_t siglen, size_t pad, size_t datalen)
+static inline rpmRC printSize(FD_t fd, size_t siglen, size_t pad, rpm_off_t datalen)
{
struct stat st;
int fdno = Fileno(fd);
@@ -273,7 +273,7 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type, char ** msg)
{ size_t sigSize = headerSizeof(sigh, HEADER_MAGIC_YES);
size_t pad = (8 - (sigSize % 8)) % 8; /* 8-byte pad */
ssize_t trc;
- uint32_t * archSize = NULL;
+ rpm_off_t * archSize = NULL;
/* Position at beginning of header. */
if (pad && (trc = timedRead(fd, (void *)block, pad)) != pad) {
diff --git a/lib/tthread.c b/lib/tthread.c
index bae934e2b..b20d03d45 100644
--- a/lib/tthread.c
+++ b/lib/tthread.c
@@ -15,8 +15,8 @@ extern int _psm_debug;
static void *other_notify(const void *h,
const rpmCallbackType what,
- const unsigned long amount,
- const unsigned long total,
+ const rpm_off_t amount,
+ const rpm_off_t total,
fnpyKey key,
rpmCallbackData data)
{
diff --git a/lib/verify.c b/lib/verify.c
index 8984d8437..dbdfeae11 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -112,7 +112,7 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
if (flags & RPMVERIFY_MD5) {
unsigned char md5sum[16];
- size_t fsize;
+ rpm_off_t fsize;
/* XXX If --nomd5, then prelinked library sizes are not corrected. */
rc = rpmDoDigest(PGPHASHALGO_MD5, fn, 0, md5sum, &fsize);
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index 4ff01ce65..dd6fb4727 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -957,7 +957,7 @@ fprintf(stderr, "*** rpmts_GetKeys(%p) ts %p\n", s, s->ts);
*/
static void *
rpmtsCallback(const void * hd, const rpmCallbackType what,
- const unsigned long amount, const unsigned long total,
+ const rpm_off_t amount, const rpm_off_t total,
const void * pkgKey, rpmCallbackData data)
{
Header h = (Header) hd;
diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c
index d4cc5b629..119607eb0 100644
--- a/rpmio/rpmfileutil.c
+++ b/rpmio/rpmfileutil.c
@@ -23,7 +23,7 @@
#include "debug.h"
-static int open_dso(const char * path, pid_t * pidp, size_t *fsizep)
+static int open_dso(const char * path, pid_t * pidp, rpm_off_t *fsizep)
{
static const char * cmd = NULL;
static int initted = 0;
@@ -122,7 +122,7 @@ exit:
}
int rpmDoDigest(pgpHashAlgo algo, const char * fn,int asAscii,
- unsigned char * digest, size_t * fsizep)
+ unsigned char * digest, rpm_off_t * fsizep)
{
const char * path;
urltype ut = urlPath(fn, &path);
diff --git a/rpmio/rpmfileutil.h b/rpmio/rpmfileutil.h
index dfeaaca6f..54d151ed9 100644
--- a/rpmio/rpmfileutil.h
+++ b/rpmio/rpmfileutil.h
@@ -29,7 +29,7 @@ typedef enum rpmCompressedMagic_e {
* @return 0 on success, 1 on error
*/
int rpmDoDigest(pgpHashAlgo algo, const char * fn,int asAscii,
- unsigned char * digest, size_t * fsizep);
+ unsigned char * digest, rpm_off_t * fsizep);
/** \ingroup rpmfileutil
diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h
index 10e6a02e0..753876b27 100644
--- a/rpmio/rpmio_internal.h
+++ b/rpmio/rpmio_internal.h
@@ -66,8 +66,8 @@ struct _FD_s {
struct _FDDIGEST_s digests[FDDIGEST_MAX];
unsigned int firstFree; /* fadio: */
- long int fileSize; /* fadio: */
- long int fd_cpioPos; /* cpio: */
+ rpm_off_t fileSize; /* fadio: */
+ rpm_off_t fd_cpioPos; /* cpio: */
};
/** \ingroup rpmio