- easy to spot, easy to change...
- time_t size can vary, header data needs fixed size
{
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;
&(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 {
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);
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);
* 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.
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;
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 */
rpmfileAttrs fflags;
unsigned short fmode;
unsigned short frdev;
- unsigned int fmtime;
+ rpm_time_t fmtime;
rpmfileState fstate;
rpm_off_t fsize;
const char * fn;
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 */
(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;
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)
* @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.
/*?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?*/
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;
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';
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;