summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-02-04 11:27:00 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-02-04 11:27:00 +0200
commite886043a1027fabf975f5e6542437e412a137e67 (patch)
treee393703802e01c444fac13b4a7d18297567b3bd3 /build
parentf53c32337238b84bb2c555ca12cdc07f6a963361 (diff)
downloadlibrpm-tizen-e886043a1027fabf975f5e6542437e412a137e67.tar.gz
librpm-tizen-e886043a1027fabf975f5e6542437e412a137e67.tar.bz2
librpm-tizen-e886043a1027fabf975f5e6542437e412a137e67.zip
Add rpm_off_t type for file size types, use where spotted
- preliminaries for bumping up the max size, use rpm-specific type as off_t size varies, header data needs fixed size
Diffstat (limited to 'build')
-rw-r--r--build/buildio.h2
-rw-r--r--build/files.c6
-rw-r--r--build/pack.c2
3 files changed, 5 insertions, 5 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);
}