diff options
-rw-r--r-- | build/files.c | 6 | ||||
-rw-r--r-- | build/names.c | 4 | ||||
-rw-r--r-- | build/parseChangelog.c | 2 | ||||
-rw-r--r-- | build/rpmbuild.h | 2 | ||||
-rw-r--r-- | lib/fsm.c | 2 | ||||
-rw-r--r-- | lib/psm.c | 2 | ||||
-rw-r--r-- | lib/query.c | 2 | ||||
-rw-r--r-- | lib/rpmds.c | 4 | ||||
-rw-r--r-- | lib/rpmfi.c | 4 | ||||
-rw-r--r-- | lib/rpmfi.h | 2 | ||||
-rw-r--r-- | lib/rpmfi_internal.h | 2 | ||||
-rw-r--r-- | lib/rpmtypes.h | 1 | ||||
-rw-r--r-- | rpmdb/header.c | 4 | ||||
-rw-r--r-- | tools/rpmcache.c | 4 |
14 files changed, 21 insertions, 20 deletions
diff --git a/build/files.c b/build/files.c index c700a0399..1c99c123a 100644 --- a/build/files.c +++ b/build/files.c @@ -233,7 +233,7 @@ static void timeCheck(int tc, Header h) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; HFD_t hfd = headerFreeData; - int * mtime; + rpm_time_t * mtime; const char ** files; rpm_tagtype_t fnt; rpm_count_t count, x; @@ -1137,8 +1137,8 @@ static void genCpioListAndHeader(FileList fl, &(flp->uname), 1); (void) headerAddOrAppendEntry(h, RPMTAG_FILEGROUPNAME, RPM_STRING_ARRAY_TYPE, &(flp->gname), 1); - if (sizeof(flp->fl_mtime) != sizeof(uint32_t)) { - uint32_t mtime = (uint32_t)flp->fl_mtime; + if (sizeof(flp->fl_mtime) != sizeof(rpm_time_t)) { + rpm_time_t mtime = (rpm_time_t)flp->fl_mtime; (void) headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE, &(mtime), 1); } else { diff --git a/build/names.c b/build/names.c index ccbeb29b9..0917a3c19 100644 --- a/build/names.c +++ b/build/names.c @@ -175,9 +175,9 @@ gid_t getGidS(const char *gname) return gids[gid_used++]; } -int32_t * getBuildTime(void) +rpm_time_t * getBuildTime(void) { - static int32_t buildTime[1]; + static rpm_time_t buildTime[1]; if (buildTime[0] == 0) buildTime[0] = (int32_t) time(NULL); diff --git a/build/parseChangelog.c b/build/parseChangelog.c index 15734b86d..740ef2292 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -15,7 +15,7 @@ void addChangelogEntry(Header h, time_t time, const char *name, const char *text) { - int32_t mytime = time; /* XXX convert to header representation */ + rpm_time_t mytime = time; /* XXX convert to header representation */ if (headerIsEntry(h, RPMTAG_CHANGELOGTIME)) { (void) headerAppendEntry(h, RPMTAG_CHANGELOGTIME, RPM_INT32_TYPE, &mytime, 1); diff --git a/build/rpmbuild.h b/build/rpmbuild.h index 3913f67c3..17e84d514 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -143,7 +143,7 @@ extern const char * buildHost(void) ; * Return build time stamp. * @return build time stamp */ -extern int32_t * getBuildTime(void) ; +extern rpm_time_t * getBuildTime(void) ; /** \ingroup rpmbuild * Read next line from spec file. @@ -680,7 +680,7 @@ int fsmMapAttrs(FSM_t fsm) mode_t perms = (S_ISDIR(st->st_mode) ? fi->dperms : fi->fperms); mode_t finalMode = (fi->fmodes ? fi->fmodes[i] : perms); dev_t finalRdev = (fi->frdevs ? fi->frdevs[i] : 0); - int32_t finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0); + rpm_time_t finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0); uid_t uid = fi->uid; gid_t gid = fi->gid; @@ -1775,7 +1775,7 @@ assert(psm->mi == NULL); if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) break; if (psm->goal == PSM_PKGINSTALL) { - int32_t installTime = (int32_t) time(NULL); + rpm_time_t installTime = (rpm_time_t) time(NULL); rpm_count_t fc = rpmfiFC(fi); if (fi->h == NULL) break; /* XXX can't happen */ diff --git a/lib/query.c b/lib/query.c index 75f512690..8e774fbd5 100644 --- a/lib/query.c +++ b/lib/query.c @@ -183,7 +183,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h) rpmfileAttrs fflags; unsigned short fmode; unsigned short frdev; - unsigned int fmtime; + rpm_time_t fmtime; rpmfileState fstate; rpm_off_t fsize; const char * fn; diff --git a/lib/rpmds.c b/lib/rpmds.c index 0d79e981f..2f14d1f8b 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -34,7 +34,7 @@ struct rpmds_s { rpmsenseFlags * Flags; /*!< Bit(s) identifying context/comparison. */ uint32_t * Color; /*!< Bit(s) calculated from file color(s). */ int32_t * Refs; /*!< No. of file refs. */ - int32_t BT; /*!< Package build time tie breaker. */ + time_t BT; /*!< Package build time tie breaker. */ rpm_tag_t tagN; /*!< Header tag. */ rpm_tagtype_t Nt, EVRt, Ft; /*!< Tag data types. */ int32_t Count; /*!< No. of elements */ @@ -124,7 +124,7 @@ rpmds rpmdsNew(Header h, rpm_tag_t tagN, int flags) (scareMem ? (HGE_t) headerGetEntryMinMemory : (HGE_t) headerGetEntry); rpm_tag_t tagBT = RPMTAG_BUILDTIME; rpm_tagtype_t BTt; - int32_t * BTp; + rpm_time_t * BTp; rpm_tag_t tagEVR, tagF; rpmds ds = NULL; const char * Type; diff --git a/lib/rpmfi.c b/lib/rpmfi.c index fe75c6b61..155201d65 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -311,9 +311,9 @@ uint32_t rpmfiFNlink(rpmfi fi) return nlink; } -uint32_t rpmfiFMtime(rpmfi fi) +rpm_time_t rpmfiFMtime(rpmfi fi) { - uint32_t fmtime = 0; + rpm_time_t fmtime = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->fmtimes != NULL) diff --git a/lib/rpmfi.h b/lib/rpmfi.h index d2237d6f5..690b03592 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -288,7 +288,7 @@ uint32_t rpmfiFNlink(rpmfi fi); * @param fi file info set * @return current file modify time, 0 on invalid */ -uint32_t rpmfiFMtime(rpmfi fi); +rpm_time_t rpmfiFMtime(rpmfi fi); /** \ingroup rpmfi * Return current file owner from file info set. diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h index ce3aab279..30124fd09 100644 --- a/lib/rpmfi_internal.h +++ b/lib/rpmfi_internal.h @@ -45,7 +45,7 @@ struct rpmfi_s { /*?null?*/ const rpm_off_t * fsizes; /*!< File size(s) (from header) */ /*?null?*/ - const uint32_t * fmtimes; /*!< File modification time(s) (from header) */ + const rpm_time_t * fmtimes; /*!< File modification time(s) (from header) */ /*?null?*/ uint16_t * fmodes; /*!< File mode(s) (from header) */ /*?null?*/ diff --git a/lib/rpmtypes.h b/lib/rpmtypes.h index 3170b7baf..a535b3b6b 100644 --- a/lib/rpmtypes.h +++ b/lib/rpmtypes.h @@ -25,6 +25,7 @@ typedef void * rpm_data_t; typedef const void * rpm_constdata_t; typedef uint32_t rpm_off_t; +typedef uint32_t rpm_time_t; typedef struct headerToken_s * Header; typedef struct headerIterator_s * HeaderIterator; diff --git a/rpmdb/header.c b/rpmdb/header.c index 2f791a827..3b2a0de65 100644 --- a/rpmdb/header.c +++ b/rpmdb/header.c @@ -3178,8 +3178,8 @@ static char * realDateFormat(rpm_tagtype_t type, rpm_constdata_t data, val = xmalloc(50 + padding); strcat(formatPrefix, "s"); - /* this is important if sizeof(int32_t) ! sizeof(time_t) */ - { time_t dateint = *((const int32_t *) data); + /* this is important if sizeof(rpm_time_t) ! sizeof(time_t) */ + { time_t dateint = *((const rpm_time_t *) data); tstruct = localtime(&dateint); } buf[0] = '\0'; diff --git a/tools/rpmcache.c b/tools/rpmcache.c index ccafe491c..43bb2bf8c 100644 --- a/tools/rpmcache.c +++ b/tools/rpmcache.c @@ -45,8 +45,8 @@ static int indent = 2; typedef struct Item_s { char * path; - int32_t size; - int32_t mtime; + rpm_off_t size; + rpm_time_t mtime; rpmds this; Header h; } * Item; |