diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-10-26 13:24:14 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-10-26 13:24:14 +0200 |
commit | bebeb89735f4927d33233d2c49e91919187f1c91 (patch) | |
tree | dab33f24de6f672de42e41af4787ceb8494a283c /lib | |
parent | bbce1581029dddbdcdd76a0b969fd8a8fe5614bf (diff) | |
download | rpm-bebeb89735f4927d33233d2c49e91919187f1c91.tar.gz rpm-bebeb89735f4927d33233d2c49e91919187f1c91.tar.bz2 rpm-bebeb89735f4927d33233d2c49e91919187f1c91.zip |
Eliminate [u|]int_[8|16|32]. Use c99 stdint.h types instead.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/depends.c | 24 | ||||
-rw-r--r-- | lib/formats.c | 70 | ||||
-rw-r--r-- | lib/fs.c | 6 | ||||
-rw-r--r-- | lib/fsm.c | 2 | ||||
-rw-r--r-- | lib/idtx.c | 8 | ||||
-rw-r--r-- | lib/idtx.h | 2 | ||||
-rw-r--r-- | lib/package.c | 40 | ||||
-rw-r--r-- | lib/psm.c | 22 | ||||
-rw-r--r-- | lib/query.c | 4 | ||||
-rw-r--r-- | lib/rpmal.c | 16 | ||||
-rw-r--r-- | lib/rpmal.h | 6 | ||||
-rw-r--r-- | lib/rpmchecksig.c | 18 | ||||
-rw-r--r-- | lib/rpmcli.h | 2 | ||||
-rw-r--r-- | lib/rpmds.c | 36 | ||||
-rw-r--r-- | lib/rpmds.h | 24 | ||||
-rw-r--r-- | lib/rpmfi.c | 76 | ||||
-rw-r--r-- | lib/rpmfi.h | 68 | ||||
-rw-r--r-- | lib/rpmlib.h | 12 | ||||
-rw-r--r-- | lib/rpmte.c | 18 | ||||
-rw-r--r-- | lib/rpmte.h | 10 | ||||
-rw-r--r-- | lib/rpmts.c | 54 | ||||
-rw-r--r-- | lib/rpmts.h | 36 | ||||
-rw-r--r-- | lib/signature.c | 50 | ||||
-rw-r--r-- | lib/signature.h | 2 | ||||
-rw-r--r-- | lib/tgi.c | 2 | ||||
-rw-r--r-- | lib/transaction.c | 40 | ||||
-rw-r--r-- | lib/verify.c | 4 |
27 files changed, 326 insertions, 326 deletions
diff --git a/lib/depends.c b/lib/depends.c index ebe8715bb..2e372fdbb 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -105,12 +105,12 @@ static int removePackage(rpmts ts, Header h, int dboffset, int rpmtsAddInstallElement(rpmts ts, Header h, fnpyKey key, int upgrade, rpmRelocation * relocs) { - uint_32 tscolor = rpmtsColor(ts); - uint_32 dscolor; - uint_32 hcolor; + uint32_t tscolor = rpmtsColor(ts); + uint32_t dscolor; + uint32_t hcolor; rpmdbMatchIterator mi; Header oh; - uint_32 ohcolor; + uint32_t ohcolor; int isSource; int duplicate = 0; rpmtsi pi = NULL; rpmte p; @@ -554,9 +554,9 @@ exit: */ static int checkPackageDeps(rpmts ts, const char * pkgNEVRA, rpmds requires, rpmds conflicts, - const char * depName, uint_32 tscolor, int adding) + const char * depName, uint32_t tscolor, int adding) { - uint_32 dscolor; + uint32_t dscolor; const char * Name; int rc; int ourrc = 0; @@ -818,7 +818,7 @@ static void markLoop(tsortInfo tsi, rpmte q) } } -static inline const char * identifyDepend(int_32 f) +static inline const char * identifyDepend(int32_t f) { if (isLegacyPreReq(f)) return "PreReq:"; @@ -866,7 +866,7 @@ zapRelation(rpmte q, rpmte p, /* XXX Note: the loop traverses "not found", break on "found". */ tsi_prev = tsi, tsi = tsi->tsi_next) { - int_32 Flags; + int32_t Flags; if (tsi->tsi_suc != p) continue; @@ -1007,7 +1007,7 @@ static int orderListIndexCmp(const void * one, const void * two) static void addQ(rpmte p, rpmte * qp, rpmte * rp, - uint_32 prefcolor) + uint32_t prefcolor) { rpmte q, qprev; @@ -1048,8 +1048,8 @@ static void addQ(rpmte p, int rpmtsOrder(rpmts ts) { rpmds requires; - int_32 Flags; - uint_32 prefcolor = rpmtsPrefColor(ts); + int32_t Flags; + uint32_t prefcolor = rpmtsPrefColor(ts); rpmtsi pi; rpmte p; rpmtsi qi; rpmte q; rpmtsi ri; rpmte r; @@ -1483,7 +1483,7 @@ assert(newOrderCount == ts->orderCount); int rpmtsCheck(rpmts ts) { - uint_32 tscolor = rpmtsColor(ts); + uint32_t tscolor = rpmtsColor(ts); rpmdbMatchIterator mi = NULL; rpmtsi pi = NULL; rpmte p; int closeatexit = 0; diff --git a/lib/formats.c b/lib/formats.c index b9699832d..76b3e337c 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -24,11 +24,11 @@ * @param element (unused) * @return formatted string */ -static char * triggertypeFormat(int_32 type, const void * data, +static char * triggertypeFormat(int32_t type, const void * data, char * formatPrefix, int padding, int element) { - const int_32 * item = data; + const int32_t * item = data; char * val; if (type != RPM_INT32_TYPE) @@ -55,7 +55,7 @@ static char * triggertypeFormat(int_32 type, const void * data, * @param element (unused) * @return formatted string */ -static char * permsFormat(int_32 type, const void * data, +static char * permsFormat(int32_t type, const void * data, char * formatPrefix, int padding, int element) { char * val; @@ -66,7 +66,7 @@ static char * permsFormat(int_32 type, const void * data, } else { val = xmalloc(15 + padding); strcat(formatPrefix, "s"); - buf = rpmPermsString(*((int_32 *) data)); + buf = rpmPermsString(*((int32_t *) data)); sprintf(val, formatPrefix, buf); buf = _free(buf); } @@ -83,12 +83,12 @@ static char * permsFormat(int_32 type, const void * data, * @param element (unused) * @return formatted string */ -static char * fflagsFormat(int_32 type, const void * data, +static char * fflagsFormat(int32_t type, const void * data, char * formatPrefix, int padding, int element) { char * val; char buf[15]; - int anint = *((int_32 *) data); + int anint = *((int32_t *) data); if (type != RPM_INT32_TYPE) { val = xstrdup(_("(not a number)")); @@ -129,7 +129,7 @@ static char * fflagsFormat(int_32 type, const void * data, * @param element no. bytes of binary data * @return formatted string */ -static char * armorFormat(int_32 type, const void * data, +static char * armorFormat(int32_t type, const void * data, char * formatPrefix, int padding, int element) { @@ -177,7 +177,7 @@ static char * armorFormat(int_32 type, const void * data, * @param element * @return formatted string */ -static char * base64Format(int_32 type, const void * data, +static char * base64Format(int32_t type, const void * data, char * formatPrefix, int padding, int element) { char * val; @@ -258,7 +258,7 @@ static char * xmlstrcpy(char * t, const char * s) * @param element (unused) * @return formatted string */ -static char * xmlFormat(int_32 type, const void * data, +static char * xmlFormat(int32_t type, const void * data, char * formatPrefix, int padding, int element) { @@ -285,13 +285,13 @@ static char * xmlFormat(int_32 type, const void * data, } break; case RPM_CHAR_TYPE: case RPM_INT8_TYPE: - anint = *((uint_8 *) data); + anint = *((uint8_t *) data); break; case RPM_INT16_TYPE: - anint = *((uint_16 *) data); + anint = *((uint16_t *) data); break; case RPM_INT32_TYPE: - anint = *((uint_32 *) data); + anint = *((uint32_t *) data); break; case RPM_NULL_TYPE: case RPM_STRING_ARRAY_TYPE: @@ -345,7 +345,7 @@ static char * xmlFormat(int_32 type, const void * data, * @param element (unused) * @return formatted string */ -static char * pgpsigFormat(int_32 type, const void * data, +static char * pgpsigFormat(int32_t type, const void * data, char * formatPrefix, int padding, int element) { @@ -421,7 +421,7 @@ static char * pgpsigFormat(int_32 type, const void * data, t = stpcpy(t, ", "); - /* this is important if sizeof(int_32) ! sizeof(time_t) */ + /* this is important if sizeof(int32_t) ! sizeof(time_t) */ { time_t dateint = pgpGrab(sigp->time, sizeof(sigp->time)); struct tm * tstruct = localtime(&dateint); if (tstruct) @@ -452,7 +452,7 @@ static char * pgpsigFormat(int_32 type, const void * data, * @param element (unused) * @return formatted string */ -static char * depflagsFormat(int_32 type, const void * data, +static char * depflagsFormat(int32_t type, const void * data, char * formatPrefix, int padding, int element) { char * val; @@ -462,7 +462,7 @@ static char * depflagsFormat(int_32 type, const void * data, if (type != RPM_INT32_TYPE) { val = xstrdup(_("(not a number)")); } else { - anint = *((int_32 *) data); + anint = *((int32_t *) data); buf[0] = '\0'; if (anint & RPMSENSE_LESS) @@ -489,8 +489,8 @@ static char * depflagsFormat(int_32 type, const void * data, * @retval *freeData data-was-malloc'ed indicator * @return 0 on success */ -static int fsnamesTag( Header h, int_32 * type, - void ** data, int_32 * count, +static int fsnamesTag( Header h, int32_t * type, + void ** data, int32_t * count, int * freeData) { const char ** list; @@ -516,7 +516,7 @@ static int fsnamesTag( Header h, int_32 * type, */ static int instprefixTag(Header h, rpmTagType * type, const void ** data, - int_32 * count, + int32_t * count, int * freeData) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; @@ -548,13 +548,13 @@ static int instprefixTag(Header h, rpmTagType * type, * @return 0 on success */ static int fssizesTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; const char ** filenames; - int_32 * filesizes; - uint_32 * usages; + int32_t * filesizes; + uint32_t * usages; int numFiles; if (!hge(h, RPMTAG_FILESIZES, NULL, (void **) &filesizes, &numFiles)) { @@ -598,13 +598,13 @@ static int fssizesTag(Header h, rpmTagType * type, * @return 0 on success */ static int triggercondsTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; HFD_t hfd = headerFreeData; rpmTagType tnt, tvt, tst; - int_32 * indices, * flags; + int32_t * indices, * flags; char ** names, ** versions; int numNames, numScripts; char ** conds, ** s; @@ -670,13 +670,13 @@ static int triggercondsTag(Header h, rpmTagType * type, * @return 0 on success */ static int triggertypeTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; HFD_t hfd = headerFreeData; rpmTagType tst; - int_32 * indices, * flags; + int32_t * indices, * flags; const char ** conds; const char ** s; int i, j, xx; @@ -727,7 +727,7 @@ static int triggertypeTag(Header h, rpmTagType * type, * @return 0 on success */ static int filenamesTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { *type = RPM_STRING_ARRAY_TYPE; @@ -746,7 +746,7 @@ static int filenamesTag(Header h, rpmTagType * type, * @return 0 on success */ static int fileclassTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { *type = RPM_STRING_ARRAY_TYPE; @@ -765,7 +765,7 @@ static int fileclassTag(Header h, rpmTagType * type, * @return 0 on success */ static int fileprovideTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { *type = RPM_STRING_ARRAY_TYPE; @@ -784,7 +784,7 @@ static int fileprovideTag(Header h, rpmTagType * type, * @return 0 on success */ static int filerequireTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { *type = RPM_STRING_ARRAY_TYPE; @@ -812,8 +812,8 @@ static const char * _macro_i18ndomains = "%{?_i18ndomains}"; * @retval *freeData data-was-malloc'ed indicator * @return 0 on success */ -static int i18nTag(Header h, int_32 tag, rpmTagType * type, - const void ** data, int_32 * count, +static int i18nTag(Header h, int32_t tag, rpmTagType * type, + const void ** data, int32_t * count, int * freeData) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; @@ -905,7 +905,7 @@ static int i18nTag(Header h, int_32 tag, rpmTagType * type, * @return 0 on success */ static int summaryTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { return i18nTag(h, RPMTAG_SUMMARY, type, data, count, freeData); @@ -921,7 +921,7 @@ static int summaryTag(Header h, rpmTagType * type, * @return 0 on success */ static int descriptionTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData); @@ -937,7 +937,7 @@ static int descriptionTag(Header h, rpmTagType * type, * @return 0 on success */ static int groupTag(Header h, rpmTagType * type, - const void ** data, int_32 * count, + const void ** data, int32_t * count, int * freeData) { return i18nTag(h, RPMTAG_GROUP, type, data, count, freeData); @@ -253,10 +253,10 @@ int rpmGetFilesystemList(const char *** listptr, int * num) return 0; } -int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles, - uint_32 ** usagesPtr, int flags) +int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes, int numFiles, + uint32_t ** usagesPtr, int flags) { - uint_32 * usages; + uint32_t * usages; int i, len, j; char * buf, * dirName; char * chptr; @@ -660,7 +660,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); - int_32 finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0); + int32_t finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0); uid_t uid = fi->uid; gid_t gid = fi->gid; diff --git a/lib/idtx.c b/lib/idtx.c index 0166aa1fd..6559ec0b7 100644 --- a/lib/idtx.c +++ b/lib/idtx.c @@ -77,8 +77,8 @@ IDTX IDTXload(rpmts ts, rpmTag tag) #endif while ((h = rpmdbNextIterator(mi)) != NULL) { rpmTagType type = RPM_NULL_TYPE; - int_32 count = 0; - int_32 * tidp; + int32_t count = 0; + int32_t * tidp; tidp = NULL; if (!hge(h, tag, &type, (void **)&tidp, &count) || tidp == NULL) @@ -112,7 +112,7 @@ IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag) IDTX idtx = NULL; HGE_t hge = (HGE_t) headerGetEntry; Header h; - int_32 * tidp; + int32_t * tidp; FD_t fd; const char ** av = NULL; int ac = 0; @@ -126,7 +126,7 @@ IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag) if (xx == 0) for (i = 0; i < ac; i++) { rpmTagType type; - int_32 count; + int32_t count; int isSource; fd = Fopen(av[i], "r.ufdio"); diff --git a/lib/idtx.h b/lib/idtx.h index dbe3b37b8..e9c9a85c9 100644 --- a/lib/idtx.h +++ b/lib/idtx.h @@ -15,7 +15,7 @@ typedef struct IDT_s { const char * key; /*! removed package file name. */ Header h; /*!< removed package header. */ union { - uint_32 u32; /*!< install/remove transaction id */ + uint32_t u32; /*!< install/remove transaction id */ } val; } * IDT; diff --git a/lib/package.c b/lib/package.c index 3aa0fc523..00f3aa622 100644 --- a/lib/package.c +++ b/lib/package.c @@ -87,7 +87,7 @@ void headerMergeLegacySigs(Header h, const Header sigh) HFD_t hfd = (HFD_t) headerFreeData; HAE_t hae = (HAE_t) headerAddEntry; HeaderIterator hi; - int_32 tag, type, count; + int32_t tag, type, count; const void * ptr; int xx; @@ -167,7 +167,7 @@ Header headerRegenSigHeader(const Header h, int noArchiveSize) HFD_t hfd = (HFD_t) headerFreeData; Header sigh = rpmNewSignature(); HeaderIterator hi; - int_32 tag, stag, type, count; + int32_t tag, stag, type, count; const void * ptr; int xx; @@ -303,12 +303,12 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg) { pgpDig dig; char buf[8*BUFSIZ]; - int_32 * ei = (int_32 *) uh; - int_32 il = ntohl(ei[0]); - int_32 dl = ntohl(ei[1]); + int32_t * ei = (int32_t *) uh; + int32_t il = ntohl(ei[0]); + int32_t dl = ntohl(ei[1]); entryInfo pe = (entryInfo) &ei[2]; - int_32 ildl[2]; - int_32 pvlen = sizeof(ildl) + (il * sizeof(*pe)) + dl; + int32_t ildl[2]; + int32_t pvlen = sizeof(ildl) + (il * sizeof(*pe)) + dl; unsigned char * dataStart = (unsigned char *) (pe + il); indexEntry entry = memset(alloca(sizeof(*entry)), 0, sizeof(*entry)); entryInfo info = memset(alloca(sizeof(*info)), 0, sizeof(*info)); @@ -318,7 +318,7 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg) int siglen = 0; int blen; size_t nb; - int_32 ril = 0; + int32_t ril = 0; unsigned char * regionEnd = NULL; rpmRC rc = RPMRC_FAIL; /* assume failure */ int xx; @@ -592,12 +592,12 @@ verifyinfo_exit: rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, const char ** msg) { char buf[BUFSIZ]; - int_32 block[4]; - int_32 il; - int_32 dl; - int_32 * ei = NULL; + int32_t block[4]; + int32_t il; + int32_t dl; + int32_t * ei = NULL; size_t uc; - int_32 nb; + int32_t nb; Header h = NULL; rpmRC rc = RPMRC_FAIL; /* assume failure */ int xx; @@ -679,10 +679,10 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) ssize_t count; struct rpmlead * l = alloca(sizeof(*l)); Header sigh = NULL; - int_32 sigtag; - int_32 sigtype; + int32_t sigtag; + int32_t sigtype; const void * sig; - int_32 siglen; + int32_t siglen; rpmtsOpX opx; size_t nb; Header h = NULL; @@ -848,8 +848,8 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) goto exit; } { void * uh = NULL; - int_32 uht; - int_32 uhc; + int32_t uht; + int32_t uhc; if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)) break; @@ -875,8 +875,8 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) } case RPMSIGTAG_SHA1: { void * uh = NULL; - int_32 uht; - int_32 uhc; + int32_t uht; + int32_t uhc; if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)) break; @@ -46,8 +46,8 @@ extern unsigned int myinstall_instance; int rpmVersionCompare(Header first, Header second) { const char * one, * two; - int_32 * epochOne, * epochTwo; - static int_32 zero = 0; + int32_t * epochOne, * epochTwo; + static int32_t zero = 0; int rc; if (!headerGetEntry(first, RPMTAG_EPOCH, NULL, (void **) &epochOne, NULL)) @@ -102,7 +102,7 @@ static int rpmInstallLoadMacros(rpmfi fi, Header h) void * ptr; const char ** argv; const char * str; - int_32 * i32p; + int32_t * i32p; } body; char numbuf[32]; rpmTagType type; @@ -946,7 +946,7 @@ static rpmRC handleOneTrigger(const rpmpsm psm, rpmds trigger = NULL; const char ** triggerScripts; const char ** triggerProgs; - int_32 * triggerIndices; + int32_t * triggerIndices; const char * sourceName; const char * triggerName; rpmRC rc = RPMRC_OK; @@ -965,7 +965,7 @@ static rpmRC handleOneTrigger(const rpmpsm psm, while ((i = rpmdsNext(trigger)) >= 0) { rpmTagType tit, tst, tpt; const char * Name; - int_32 Flags = rpmdsFlags(trigger); + int32_t Flags = rpmdsFlags(trigger); if ((Name = rpmdsN(trigger)) == NULL) continue; /* XXX can't happen */ @@ -1079,7 +1079,7 @@ static rpmRC runImmedTriggers(rpmpsm psm) HFD_t hfd = (fi->hfd ? fi->hfd : headerFreeData); const char ** triggerNames; int numTriggers; - int_32 * triggerIndices; + int32_t * triggerIndices; rpmTagType tnt, tit; int numTriggerIndices; unsigned char * triggersRun; @@ -1242,7 +1242,7 @@ static int rpmpsmNext(rpmpsm psm, pkgStage nstage) rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage) { const rpmts ts = psm->ts; - uint_32 tscolor = rpmtsColor(ts); + uint32_t tscolor = rpmtsColor(ts); rpmfi fi = psm->fi; HGE_t hge = fi->hge; HFD_t hfd = (fi->hfd ? fi->hfd : headerFreeData); @@ -1462,7 +1462,7 @@ assert(psm->mi == NULL); /* Regenerate original header. */ { void * uh = NULL; - int_32 uht, uhc; + int32_t uht, uhc; if (headerGetEntry(fi->h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc)) { psm->oh = headerCopyLoad(uh); @@ -1471,7 +1471,7 @@ assert(psm->mi == NULL); if (headerGetEntry(fi->h, RPMTAG_HEADERIMAGE, &uht, &uh, &uhc)) { HeaderIterator hi; - int_32 tag, type, count; + int32_t tag, type, count; hPTR_t ptr; Header oh; @@ -1547,7 +1547,7 @@ assert(psm->mi == NULL); /* Add remove transaction id to header. */ if (psm->oh != NULL) - { int_32 tid = rpmtsGetTid(ts); + { int32_t tid = rpmtsGetTid(ts); xx = headerAddEntry(psm->oh, RPMTAG_REMOVETID, RPM_INT32_TYPE, &tid, 1); } @@ -1701,7 +1701,7 @@ assert(psm->mi == NULL); if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) break; if (psm->goal == PSM_PKGINSTALL) { - int_32 installTime = (int_32) time(NULL); + int32_t installTime = (int32_t) time(NULL); int fc = rpmfiFC(fi); if (fi->h == NULL) break; /* XXX can't happen */ diff --git a/lib/query.c b/lib/query.c index 79609fbe6..4c241ab77 100644 --- a/lib/query.c +++ b/lib/query.c @@ -37,7 +37,7 @@ static void printFileInfo(char * te, const char * name, char sizefield[15]; char ownerfield[8+1], groupfield[8+1]; char timefield[100]; - time_t when = mtime; /* important if sizeof(int_32) ! sizeof(time_t) */ + time_t when = mtime; /* important if sizeof(int32_t) ! sizeof(time_t) */ struct tm * tm; static time_t now; static struct tm nowtm; @@ -191,7 +191,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h) const char * fuser; const char * fgroup; const char * flink; - int_32 fnlink; + int32_t fnlink; fflags = rpmfiFFlags(fi); fmode = rpmfiFMode(fi); diff --git a/lib/rpmal.c b/lib/rpmal.c index bde77a019..fcfc60451 100644 --- a/lib/rpmal.c +++ b/lib/rpmal.c @@ -24,7 +24,7 @@ struct availablePackage_s { rpmds provides; /*!< Provides: dependencies. */ rpmfi fi; /*!< File info set. */ - uint_32 tscolor; /*!< Transaction color bits. */ + uint32_t tscolor; /*!< Transaction color bits. */ fnpyKey key; /*!< Associated file name/python object */ @@ -65,7 +65,7 @@ struct fileIndexEntry_s { const char * baseName; /*!< File basename. */ int baseNameLen; rpmalNum pkgNum; /*!< Containing package index. */ - uint_32 ficolor; + uint32_t ficolor; }; typedef struct dirInfo_s * dirInfo; @@ -89,7 +89,7 @@ struct rpmal_s { int delta; /*!< Delta for pkg list reallocation. */ int size; /*!< No. of pkgs in list. */ int alloced; /*!< No. of pkgs allocated for list. */ - uint_32 tscolor; /*!< Transaction color. */ + uint32_t tscolor; /*!< Transaction color. */ int numDirs; /*!< No. of directories. */ dirInfo dirs; /*!< Set of directories. */ }; @@ -321,7 +321,7 @@ fprintf(stderr, " die[%5d] memset(%p,0,0x%lx)\n", al->numDirs, al->dirs + al- } rpmalKey rpmalAdd(rpmal * alistp, rpmalKey pkgKey, fnpyKey key, - rpmds provides, rpmfi fi, uint_32 tscolor) + rpmds provides, rpmfi fi, uint32_t tscolor) { rpmalNum pkgNum; rpmal al; @@ -510,9 +510,9 @@ static int indexcmp(const void * one, const void * two) return strcmp(a->entry, b->entry); } -void rpmalAddProvides(rpmal al, rpmalKey pkgKey, rpmds provides, uint_32 tscolor) +void rpmalAddProvides(rpmal al, rpmalKey pkgKey, rpmds provides, uint32_t tscolor) { - uint_32 dscolor; + uint32_t dscolor; const char * Name; rpmalNum pkgNum = alKey2Num(al, pkgKey); availableIndex ai = &al->index; @@ -583,8 +583,8 @@ void rpmalMakeIndex(rpmal al) fnpyKey * rpmalAllFileSatisfiesDepend(const rpmal al, const rpmds ds, rpmalKey * keyp) { - uint_32 tscolor; - uint_32 ficolor; + uint32_t tscolor; + uint32_t ficolor; int found = 0; const char * dirName; const char * baseName; diff --git a/lib/rpmal.h b/lib/rpmal.h index 68a5db94e..4627f3201 100644 --- a/lib/rpmal.h +++ b/lib/rpmal.h @@ -6,7 +6,7 @@ * Structures used for managing added/available package lists. */ -#include "rpmlib.h" /* for rpmds, rpmfi, uint_32 */ +#include "rpmlib.h" /* for rpmds, rpmfi, uint32_t */ #include "rpmmessages.h" /* for fnpyKey */ #ifdef __cplusplus @@ -65,7 +65,7 @@ rpmalKey rpmalAdd(rpmal * alistp, rpmalKey pkgKey, fnpyKey key, rpmds provides, rpmfi fi, - uint_32 tscolor); + uint32_t tscolor); /** * Add package provides to available list index. @@ -76,7 +76,7 @@ rpmalKey rpmalAdd(rpmal * alistp, */ void rpmalAddProvides(rpmal al, rpmalKey pkgKey, - rpmds provides, uint_32 tscolor); + rpmds provides, uint32_t tscolor); /** * Generate index for available list. diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index 996497de9..6e2b66ca4 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -123,8 +123,8 @@ exit: static int getSignid(Header sig, int sigtag, unsigned char * signid) { void * pkt = NULL; - int_32 pkttyp = 0; - int_32 pktlen = 0; + int32_t pkttyp = 0; + int32_t pktlen = 0; int rc = 1; if (headerGetEntry(sig, sigtag, &pkttyp, &pkt, &pktlen) && pkt != NULL) { @@ -154,14 +154,14 @@ static int rpmReSign(rpmts ts, FD_t fd = NULL; FD_t ofd = NULL; struct rpmlead lead, *l = &lead; - int_32 sigtag; + int32_t sigtag; const char *rpm, *trpm; const char *sigtarget = NULL; char tmprpm[1024+1]; Header sigh = NULL; const char * msg; void * uh = NULL; - int_32 uht, uhc; + int32_t uht, uhc; int res = EXIT_FAILURE; int deleting = (qva->qva_mode == RPMSIGN_DEL_SIGNATURE); rpmRC rc; @@ -224,7 +224,7 @@ static int rpmReSign(rpmts ts, /* Dump the immutable region (if present). */ if (headerGetEntry(sigh, RPMTAG_HEADERSIGNATURES, &uht, &uh, &uhc)) { HeaderIterator hi; - int_32 tag, type, count; + int32_t tag, type, count; hPTR_t ptr; Header oh; Header nh; @@ -479,7 +479,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig) if (headerIsEntry(h, RPMTAG_HEADERIMMUTABLE)) { void * uh; - int_32 uht, uhc; + int32_t uht, uhc; if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc) || uh == NULL) @@ -547,12 +547,12 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd, char buf[8192], * b; char missingKeys[7164], * m; char untrustedKeys[7164], * u; - int_32 sigtag; - int_32 sigtype; + int32_t sigtag; + int32_t sigtype; const void * sig; pgpDig dig; pgpDigParams sigp; - int_32 siglen; + int32_t siglen; Header sigh = NULL; HeaderIterator hi; const char * msg; diff --git a/lib/rpmcli.h b/lib/rpmcli.h index ea66da652..c02cd1e8a 100644 --- a/lib/rpmcli.h +++ b/lib/rpmcli.h @@ -494,7 +494,7 @@ struct rpmInstallArguments_s { rpmInstallInterfaceFlags installInterfaceFlags; rpmEraseInterfaceFlags eraseInterfaceFlags; rpmQueryFlags qva_flags; /*!< from --nodigest/--nosignature */ - uint_32 rbtid; /*!< from --rollback */ + uint32_t rbtid; /*!< from --rollback */ int numRelocations; int noDeps; int incldocs; diff --git a/lib/rpmds.c b/lib/rpmds.c index d6946a9e9..407d56bb6 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -101,13 +101,13 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int flags) (scareMem ? (HGE_t) headerGetEntryMinMemory : (HGE_t) headerGetEntry); rpmTag tagBT = RPMTAG_BUILDTIME; rpmTagType BTt; - int_32 * BTp; + int32_t * BTp; rpmTag tagEVR, tagF; rpmds ds = NULL; const char * Type; const char ** N; rpmTagType Nt; - int_32 Count; + int32_t Count; if (tagN == RPMTAG_PROVIDENAME) { Type = "Provides"; @@ -218,13 +218,13 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds) return tbuf; } -rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags) +rpmds rpmdsThis(Header h, rpmTag tagN, int32_t Flags) { HGE_t hge = (HGE_t) headerGetEntryMinMemory; rpmds ds = NULL; const char * Type; const char * n, * v, * r; - int_32 * ep; + int32_t * ep; const char ** N, ** EVR; char * t; int xx; @@ -291,7 +291,7 @@ exit: return rpmdsLink(ds, (ds ? ds->Type : NULL)); } -rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int_32 Flags) +rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int32_t Flags) { rpmds ds = NULL; const char * Type; @@ -391,9 +391,9 @@ const char * rpmdsEVR(const rpmds ds) return EVR; } -int_32 rpmdsFlags(const rpmds ds) +int32_t rpmdsFlags(const rpmds ds) { - int_32 Flags = 0; + int32_t Flags = 0; if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) { if (ds->Flags != NULL) @@ -449,9 +449,9 @@ int rpmdsSetNoPromote(rpmds ds, int nopromote) return onopromote; } -uint_32 rpmdsColor(const rpmds ds) +uint32_t rpmdsColor(const rpmds ds) { - uint_32 Color = 0; + uint32_t Color = 0; if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) { if (ds->Color != NULL) @@ -460,9 +460,9 @@ uint_32 rpmdsColor(const rpmds ds) return Color; } -uint_32 rpmdsSetColor(const rpmds ds, uint_32 color) +uint32_t rpmdsSetColor(const rpmds ds, uint32_t color) { - uint_32 ocolor = 0; + uint32_t ocolor = 0; if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) { if (ds->Color != NULL) { @@ -473,9 +473,9 @@ uint_32 rpmdsSetColor(const rpmds ds, uint_32 color) return ocolor; } -int_32 rpmdsRefs(const rpmds ds) +int32_t rpmdsRefs(const rpmds ds) { - int_32 Refs = 0; + int32_t Refs = 0; if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) { if (ds->Refs != NULL) @@ -484,9 +484,9 @@ int_32 rpmdsRefs(const rpmds ds) return Refs; } -int_32 rpmdsSetRefs(const rpmds ds, int_32 refs) +int32_t rpmdsSetRefs(const rpmds ds, int32_t refs) { - int_32 orefs = 0; + int32_t orefs = 0; if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) { if (ds->Refs != NULL) { @@ -642,7 +642,7 @@ int rpmdsMerge(rpmds * dsp, rpmds ods) rpmds ds; const char ** N; const char ** EVR; - int_32 * Flags; + int32_t * Flags; int j; int save; @@ -921,10 +921,10 @@ int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; const char * pkgN, * v, * r; - int_32 * epoch; + int32_t * epoch; const char * pkgEVR; char * t; - int_32 pkgFlags = RPMSENSE_EQUAL; + int32_t pkgFlags = RPMSENSE_EQUAL; rpmds pkg; int rc = 1; /* XXX assume match, names already match here */ diff --git a/lib/rpmds.h b/lib/rpmds.h index de51afc05..8984aae41 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -31,13 +31,13 @@ struct rpmds_s { Header h; /*!< Header for dependency set (or NULL) */ const char ** N; /*!< Name. */ const char ** EVR; /*!< Epoch-Version-Release. */ - int_32 * Flags; /*!< Bit(s) identifying context/comparison. */ - uint_32 * Color; /*!< Bit(s) calculated from file color(s). */ - int_32 * Refs; /*!< No. of file refs. */ - int_32 BT; /*!< Package build time tie breaker. */ + int32_t * 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. */ rpmTag tagN; /*!< Header tag. */ rpmTagType Nt, EVRt, Ft; /*!< Tag data types. */ - int_32 Count; /*!< No. of elements */ + int32_t Count; /*!< No. of elements */ int i; /*!< Element index. */ unsigned l; /*!< Low element (bsearch). */ unsigned u; /*!< High element (bsearch). */ @@ -104,7 +104,7 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds); * @param Flags comparison flags * @return new dependency set */ -rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags); +rpmds rpmdsThis(Header h, rpmTag tagN, int32_t Flags); /** * Create, load and initialize a dependency set of size 1. @@ -114,7 +114,7 @@ rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags); * @param Flags comparison flags * @return new dependency set */ -rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int_32 Flags); +rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int32_t Flags); /** * Return dependency set count. @@ -164,7 +164,7 @@ extern const char * rpmdsEVR(const rpmds ds); * @param ds dependency set * @return current dependency flags, 0 on invalid */ -int_32 rpmdsFlags(const rpmds ds); +int32_t rpmdsFlags(const rpmds ds); /** * Return current dependency type. @@ -216,7 +216,7 @@ int rpmdsSetNoPromote(rpmds ds, int nopromote); * @param ds dependency set * @return current dependency color */ -uint_32 rpmdsColor(const rpmds ds); +uint32_t rpmdsColor(const rpmds ds); /** * Return current dependency color. @@ -224,14 +224,14 @@ uint_32 rpmdsColor(const rpmds ds); * @param color new dependency color * @return previous dependency color */ -uint_32 rpmdsSetColor(const rpmds ds, uint_32 color); +uint32_t rpmdsSetColor(const rpmds ds, uint32_t color); /** * Return current dependency file refs. * @param ds dependency set * @return current dependency file refs, -1 on global */ -int_32 rpmdsRefs(const rpmds ds); +int32_t rpmdsRefs(const rpmds ds); /** * Return current dependency color. @@ -239,7 +239,7 @@ int_32 rpmdsRefs(const rpmds ds); * @param refs new dependency refs * @return previous dependency refs */ -int_32 rpmdsSetRefs(const rpmds ds, int_32 refs); +int32_t rpmdsSetRefs(const rpmds ds, int32_t refs); /** * Notify of results of dependency match. diff --git a/lib/rpmfi.c b/lib/rpmfi.c index de04533c3..abbd1a551 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -134,9 +134,9 @@ const char * rpmfiFN(rpmfi fi) return FN; } -uint_32 rpmfiFFlags(rpmfi fi) +uint32_t rpmfiFFlags(rpmfi fi) { - int_32 FFlags = 0; + int32_t FFlags = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->fflags != NULL) @@ -145,9 +145,9 @@ uint_32 rpmfiFFlags(rpmfi fi) return FFlags; } -uint_32 rpmfiVFlags(rpmfi fi) +uint32_t rpmfiVFlags(rpmfi fi) { - int_32 VFlags = 0; + int32_t VFlags = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->vflags != NULL) @@ -156,9 +156,9 @@ uint_32 rpmfiVFlags(rpmfi fi) return VFlags; } -int_16 rpmfiFMode(rpmfi fi) +int16_t rpmfiFMode(rpmfi fi) { - int_16 fmode = 0; + int16_t fmode = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->fmodes != NULL) @@ -200,9 +200,9 @@ const char * rpmfiFLink(rpmfi fi) return flink; } -int_32 rpmfiFSize(rpmfi fi) +int32_t rpmfiFSize(rpmfi fi) { - int_32 fsize = 0; + int32_t fsize = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->fsizes != NULL) @@ -211,9 +211,9 @@ int_32 rpmfiFSize(rpmfi fi) return fsize; } -int_16 rpmfiFRdev(rpmfi fi) +int16_t rpmfiFRdev(rpmfi fi) { - int_16 frdev = 0; + int16_t frdev = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->frdevs != NULL) @@ -222,9 +222,9 @@ int_16 rpmfiFRdev(rpmfi fi) return frdev; } -int_32 rpmfiFInode(rpmfi fi) +int32_t rpmfiFInode(rpmfi fi) { - int_32 finode = 0; + int32_t finode = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->finodes != NULL) @@ -233,9 +233,9 @@ int_32 rpmfiFInode(rpmfi fi) return finode; } -uint_32 rpmfiColor(rpmfi fi) +uint32_t rpmfiColor(rpmfi fi) { - uint_32 color = 0; + uint32_t color = 0; if (fi != NULL) /* XXX ignore all but lsnibble for now. */ @@ -243,9 +243,9 @@ uint_32 rpmfiColor(rpmfi fi) return color; } -uint_32 rpmfiFColor(rpmfi fi) +uint32_t rpmfiFColor(rpmfi fi) { - uint_32 fcolor = 0; + uint32_t fcolor = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->fcolors != NULL) @@ -279,11 +279,11 @@ const char * rpmfiFContext(rpmfi fi) return fcontext; } -int_32 rpmfiFDepends(rpmfi fi, const uint_32 ** fddictp) +int32_t rpmfiFDepends(rpmfi fi, const uint32_t ** fddictp) { int fddictx = -1; int fddictn = 0; - const uint_32 * fddict = NULL; + const uint32_t * fddict = NULL; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->fddictn != NULL) @@ -298,15 +298,15 @@ int_32 rpmfiFDepends(rpmfi fi, const uint_32 ** fddictp) return fddictn; } -int_32 rpmfiFNlink(rpmfi fi) +int32_t rpmfiFNlink(rpmfi fi) { - int_32 nlink = 0; + int32_t nlink = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { /* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */ if (fi->finodes && fi->frdevs) { - int_32 finode = fi->finodes[fi->i]; - int_16 frdev = fi->frdevs[fi->i]; + int32_t finode = fi->finodes[fi->i]; + int16_t frdev = fi->frdevs[fi->i]; int j; for (j = 0; j < fi->fc; j++) { @@ -318,9 +318,9 @@ int_32 rpmfiFNlink(rpmfi fi) return nlink; } -int_32 rpmfiFMtime(rpmfi fi) +int32_t rpmfiFMtime(rpmfi fi) { - int_32 fmtime = 0; + int32_t fmtime = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->fmtimes != NULL) @@ -435,7 +435,7 @@ const char * ftstring (rpmFileTypes ft) } } -rpmFileTypes rpmfiWhatis(uint_16 mode) +rpmFileTypes rpmfiWhatis(uint16_t mode) { if (S_ISDIR(mode)) return XDIR; if (S_ISCHR(mode)) return CDEV; @@ -495,7 +495,7 @@ rpmFileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing) } } - diskWhat = rpmfiWhatis((int_16)sb.st_mode); + diskWhat = rpmfiWhatis((int16_t)sb.st_mode); dbWhat = rpmfiWhatis(rpmfiFMode(ofi)); newWhat = rpmfiWhatis(rpmfiFMode(nfi)); @@ -567,7 +567,7 @@ int rpmfiConfigConflict(const rpmfi fi) return 0; } - diskWhat = rpmfiWhatis((int_16)sb.st_mode); + diskWhat = rpmfiWhatis((int16_t)sb.st_mode); newWhat = rpmfiWhatis(rpmfiFMode(fi)); if (newWhat != LINK && newWhat != REG) @@ -634,15 +634,15 @@ Header relocateFileList(const rpmts ts, rpmfi fi, int numValid; const char ** baseNames; const char ** dirNames; - uint_32 * dirIndexes; - uint_32 * newDirIndexes; - int_32 fileCount; - int_32 dirCount; - uint_32 mydColor = rpmExpandNumeric("%{?_autorelocate_dcolor}"); - uint_32 * fFlags = NULL; - uint_32 * fColors = NULL; - uint_32 * dColors = NULL; - uint_16 * fModes = NULL; + uint32_t * dirIndexes; + uint32_t * newDirIndexes; + int32_t fileCount; + int32_t dirCount; + uint32_t mydColor = rpmExpandNumeric("%{?_autorelocate_dcolor}"); + uint32_t * fFlags = NULL; + uint32_t * fColors = NULL; + uint32_t * dColors = NULL; + uint16_t * fModes = NULL; Header h; int nrelocated = 0; int fileAlloced = 0; @@ -1156,7 +1156,7 @@ rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, int scareMem) rpmte p; rpmfi fi = NULL; const char * Type; - uint_32 * uip; + uint32_t * uip; int dnlmax, bnlmax; unsigned char * t; int len; @@ -1458,7 +1458,7 @@ void rpmfiBuildFDeps(Header h, rpmTag tagN, char deptype = 'R'; char mydt; const char * DNEVR; - const uint_32 * ddict; + const uint32_t * ddict; unsigned ix; int ndx; diff --git a/lib/rpmfi.h b/lib/rpmfi.h index 8984cd77e..f2e54ea8c 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -49,43 +49,43 @@ struct rpmfi_s { const char ** flinks; /*!< File link(s) (from header) */ const char ** flangs; /*!< File lang(s) (from header) */ - uint_32 * dil; /*!< Directory indice(s) (from header) */ + uint32_t * dil; /*!< Directory indice(s) (from header) */ /*?null?*/ - const uint_32 * fflags; /*!< File flag(s) (from header) */ + const uint32_t * fflags; /*!< File flag(s) (from header) */ /*?null?*/ - const uint_32 * fsizes; /*!< File size(s) (from header) */ + const uint32_t * fsizes; /*!< File size(s) (from header) */ /*?null?*/ - const uint_32 * fmtimes; /*!< File modification time(s) (from header) */ + const uint32_t * fmtimes; /*!< File modification time(s) (from header) */ /*?null?*/ - uint_16 * fmodes; /*!< File mode(s) (from header) */ + uint16_t * fmodes; /*!< File mode(s) (from header) */ /*?null?*/ - const uint_16 * frdevs; /*!< File rdev(s) (from header) */ + const uint16_t * frdevs; /*!< File rdev(s) (from header) */ /*?null?*/ - const uint_32 * finodes; /*!< File inodes(s) (from header) */ + const uint32_t * finodes; /*!< File inodes(s) (from header) */ const char ** fuser; /*!< File owner(s) (from header) */ const char ** fgroup; /*!< File group(s) (from header) */ char * fstates; /*!< File state(s) (from header) */ - const uint_32 * fcolors; /*!< File color bits (header) */ + const uint32_t * fcolors; /*!< File color bits (header) */ const char ** fcontexts; /*! FIle security contexts. */ const char ** cdict; /*!< File class dictionary (header) */ - int_32 ncdict; /*!< No. of class entries. */ - const uint_32 * fcdictx; /*!< File class dictionary index (header) */ + int32_t ncdict; /*!< No. of class entries. */ + const uint32_t * fcdictx; /*!< File class dictionary index (header) */ - const uint_32 * ddict; /*!< File depends dictionary (header) */ - int_32 nddict; /*!< No. of depends entries. */ - const uint_32 * fddictx; /*!< File depends dictionary start (header) */ - const uint_32 * fddictn; /*!< File depends dictionary count (header) */ + const uint32_t * ddict; /*!< File depends dictionary (header) */ + int32_t nddict; /*!< No. of depends entries. */ + const uint32_t * fddictx; /*!< File depends dictionary start (header) */ + const uint32_t * fddictn; /*!< File depends dictionary count (header) */ /*?null?*/ - const uint_32 * vflags; /*!< File verify flag(s) (from header) */ + const uint32_t * vflags; /*!< File verify flag(s) (from header) */ - int_32 dc; /*!< No. of directories. */ - int_32 fc; /*!< No. of files. */ + int32_t dc; /*!< No. of directories. */ + int32_t fc; /*!< No. of files. */ /*=============================*/ rpmte te; @@ -98,13 +98,13 @@ struct rpmfi_s { /*-----------------------------*/ uid_t uid; /*!< File uid (default). */ gid_t gid; /*!< File gid (default). */ - uint_32 flags; /*!< File flags (default). */ + uint32_t flags; /*!< File flags (default). */ rpmFileAction action; /*!< File disposition (default). */ rpmFileAction * actions; /*!< File disposition(s). */ struct fingerPrint_s * fps; /*!< File fingerprint(s). */ const char ** obnl; /*!< Original basename(s) (from header) */ const char ** odnl; /*!< Original dirname(s) (from header) */ - int_32 * odil; /*!< Original dirindex(s) (from header) */ + int32_t * odil; /*!< Original dirindex(s) (from header) */ unsigned char * md5s; /*!< File md5 sums in binary. */ @@ -127,9 +127,9 @@ struct rpmfi_s { int * fmapflags; FSM_t fsm; /*!< File state machine data. */ int keep_header; /*!< Keep header? */ - uint_32 color; /*!< Color bit(s) from file color union. */ + uint32_t color; /*!< Color bit(s) from file color union. */ sharedFileInfo replaced; /*!< (TR_ADDED) */ - uint_32 * replacedSizes; /*!< (TR_ADDED) */ + uint32_t * replacedSizes; /*!< (TR_ADDED) */ unsigned int record; /*!< (TR_REMOVED) */ int magic; #define RPMFIMAGIC 0x09697923 @@ -249,21 +249,21 @@ extern const char * rpmfiFN(rpmfi fi); * @param fi file info set * @return current file flags, 0 on invalid */ -uint_32 rpmfiFFlags(rpmfi fi); +uint32_t rpmfiFFlags(rpmfi fi); /** * Return current file verify flags from file info set. * @param fi file info set * @return current file verify flags, 0 on invalid */ -uint_32 rpmfiVFlags(rpmfi fi); +uint32_t rpmfiVFlags(rpmfi fi); /** * Return current file mode from file info set. * @param fi file info set * @return current file mode, 0 on invalid */ -int_16 rpmfiFMode(rpmfi fi); +int16_t rpmfiFMode(rpmfi fi); /** * Return current file state from file info set. @@ -291,35 +291,35 @@ extern const char * rpmfiFLink(rpmfi fi); * @param fi file info set * @return current file size, 0 on invalid */ -int_32 rpmfiFSize(rpmfi fi); +int32_t rpmfiFSize(rpmfi fi); /** * Return current file rdev from file info set. * @param fi file info set * @return current file rdev, 0 on invalid */ -int_16 rpmfiFRdev(rpmfi fi); +int16_t rpmfiFRdev(rpmfi fi); /** * Return current file inode from file info set. * @param fi file info set * @return current file inode, 0 on invalid */ -int_32 rpmfiFInode(rpmfi fi); +int32_t rpmfiFInode(rpmfi fi); /** * Return union of all file color bits from file info set. * @param fi file info set * @return current color */ -uint_32 rpmfiColor(rpmfi fi); +uint32_t rpmfiColor(rpmfi fi); /** * Return current file color bits from file info set. * @param fi file info set * @return current file color */ -uint_32 rpmfiFColor(rpmfi fi); +uint32_t rpmfiFColor(rpmfi fi); /** * Return current file class from file info set. @@ -341,22 +341,22 @@ extern const char * rpmfiFContext(rpmfi fi); * @retval *fddictp file depends dictionary array (or NULL) * @return no. of file depends entries, 0 on invalid */ -int_32 rpmfiFDepends(rpmfi fi, - const uint_32 ** fddictp); +int32_t rpmfiFDepends(rpmfi fi, + const uint32_t ** fddictp); /** * Return (calculated) current file nlink count from file info set. * @param fi file info set * @return current file nlink count, 0 on invalid */ -int_32 rpmfiFNlink(rpmfi fi); +int32_t rpmfiFNlink(rpmfi fi); /** * Return current file modify time from file info set. * @param fi file info set * @return current file modify time, 0 on invalid */ -int_32 rpmfiFMtime(rpmfi fi); +int32_t rpmfiFMtime(rpmfi fi); /** * Return current file owner from file info set. @@ -451,7 +451,7 @@ void rpmfiBuildFDeps(Header h, rpmTag tagN, * @param mode file mode bits (from header) * @return file type */ -rpmFileTypes rpmfiWhatis(uint_16 mode); +rpmFileTypes rpmfiWhatis(uint16_t mode); /** * Return file info comparison. diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 2e7758f16..1a88cec3b 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -657,7 +657,7 @@ typedef typedef int (*HGE_t) (Header h, rpmTag tag, rpmTagType * type, void ** p, - int_32 * c); + int32_t * c); /** * Prototype for headerAddEntry() vector. @@ -675,7 +675,7 @@ typedef int (*HGE_t) (Header h, rpmTag tag, * @return 1 on success, 0 on failure */ typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type, - const void * p, int_32 c); + const void * p, int32_t c); /** * Prototype for headerModifyEntry() vector. @@ -689,7 +689,7 @@ typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type, * @return 1 on success, 0 on failure */ typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type, - const void * p, int_32 c); + const void * p, int32_t c); /** * Prototype for headerRemoveEntry() vector. @@ -701,7 +701,7 @@ typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type, * @param tag tag * @return 0 on success, 1 on failure (INCONSISTENT) */ -typedef int (*HRE_t) (Header h, int_32 tag); +typedef int (*HRE_t) (Header h, int32_t tag); /** * @todo Generalize filter mechanism. @@ -974,8 +974,8 @@ int rpmGetFilesystemList( const char *** listptr, * @param flags (unused) * @return 0 on success, 1 on error */ -int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, - int numFiles, uint_32 ** usagesPtr, +int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes, + int numFiles, uint32_t ** usagesPtr, int flags); /* ==================================================================== */ diff --git a/lib/rpmte.c b/lib/rpmte.c index b7f8271cc..36ec669e6 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -80,7 +80,7 @@ static void addTE(rpmts ts, rpmte p, Header h, int scareMem = 0; HGE_t hge = (HGE_t)headerGetEntryMinMemory; rpmte savep; - int_32 * ep; + int32_t * ep; const char * arch, * os; char * t; size_t nb; @@ -197,7 +197,7 @@ rpmte rpmteNew(const rpmts ts, Header h, rpmalKey pkgKey) { rpmte p = xcalloc(1, sizeof(*p)); - int_32 * ep; + int32_t * ep; int xx; p->type = type; @@ -287,12 +287,12 @@ int rpmteIsSource(rpmte te) return (te != NULL ? te->isSource : 0); } -uint_32 rpmteColor(rpmte te) +uint32_t rpmteColor(rpmte te) { return (te != NULL ? te->color : 0); } -uint_32 rpmteSetColor(rpmte te, uint_32 color) +uint32_t rpmteSetColor(rpmte te, uint32_t color) { int ocolor = 0; if (te != NULL) { @@ -302,7 +302,7 @@ uint_32 rpmteSetColor(rpmte te, uint_32 color) return ocolor; } -uint_32 rpmtePkgFileSize(rpmte te) +uint32_t rpmtePkgFileSize(rpmte te) { return (te != NULL ? te->pkgFileSize : 0); } @@ -513,10 +513,10 @@ void rpmteColorDS(rpmte te, rpmTag tag) rpmds ds = rpmteDS(te, tag); char deptype = 'R'; char mydt; - const uint_32 * ddict; - int_32 * colors; - int_32 * refs; - int_32 val; + const uint32_t * ddict; + int32_t * colors; + int32_t * refs; + int32_t val; int Count; size_t nb; unsigned ix; diff --git a/lib/rpmte.h b/lib/rpmte.h index 476841e69..233fea8b7 100644 --- a/lib/rpmte.h +++ b/lib/rpmte.h @@ -86,8 +86,8 @@ struct rpmte_s { rpmds obsoletes; /*!< Obsoletes: dependencies. */ rpmfi fi; /*!< File information. */ - uint_32 color; /*!< Color bit(s) from package dependencies. */ - uint_32 pkgFileSize; /*!< No. of bytes in package file (approx). */ + uint32_t color; /*!< Color bit(s) from package dependencies. */ + uint32_t pkgFileSize; /*!< No. of bytes in package file (approx). */ fnpyKey key; /*!< (TR_ADDED) Retrieval key. */ rpmRelocation * relocs; /*!< (TR_ADDED) Payload file relocations. */ @@ -217,7 +217,7 @@ extern int rpmteIsSource(rpmte te); * @param te transaction element * @return color bits */ -uint_32 rpmteColor(rpmte te); +uint32_t rpmteColor(rpmte te); /** * Set color bits of transaction element. @@ -225,7 +225,7 @@ uint_32 rpmteColor(rpmte te); * @param color new color bits * @return previous color bits */ -uint_32 rpmteSetColor(rpmte te, uint_32 color); +uint32_t rpmteSetColor(rpmte te, uint32_t color); /** * Retrieve last instance installed to the database. @@ -248,7 +248,7 @@ void rpmteSetDBInstance(rpmte te, unsigned int instance); * @param te transaction element * @return size in bytes of package file. */ -uint_32 rpmtePkgFileSize(rpmte te); +uint32_t rpmtePkgFileSize(rpmte te); /** * Retrieve dependency tree depth of transaction element. diff --git a/lib/rpmts.c b/lib/rpmts.c index 930a229ad..10da272d4 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -85,12 +85,12 @@ char * hGetNEVRA(Header h, const char ** np) return NVRA; } -uint_32 hGetColor(Header h) +uint32_t hGetColor(Header h) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; - uint_32 hcolor = 0; - uint_32 * fcolors; - int_32 ncolors; + uint32_t hcolor = 0; + uint32_t * fcolors; + int32_t ncolors; int i; fcolors = NULL; @@ -356,7 +356,7 @@ fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, p mi = rpmtsInitIterator(ts, RPMTAG_PUBKEYS, sigp->signid, sizeof(sigp->signid)); while ((h = rpmdbNextIterator(mi)) != NULL) { const char ** pubkeys; - int_32 pt, pc; + int32_t pt, pc; if (!headerGetEntry(h, RPMTAG_PUBKEYS, &pt, (void **)&pubkeys, &pc)) continue; @@ -464,8 +464,8 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, ssize_t pktle const char * group = "Public Keys"; const char * license = "pubkey"; const char * buildhost = "localhost"; - int_32 pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL); - int_32 zero = 0; + int32_t pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL); + int32_t zero = 0; pgpDig dig = NULL; pgpDigParams pubp = NULL; const char * d = NULL; @@ -556,7 +556,7 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, ssize_t pktle /* XXX W2DO: tag value inheirited from parent? */ xx = headerAddEntry(h, RPMTAG_BUILDHOST, RPM_STRING_TYPE, buildhost, 1); - { int_32 tid = rpmtsGetTid(ts); + { int32_t tid = rpmtsGetTid(ts); xx = headerAddEntry(h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE, &tid, 1); /* XXX W2DO: tag value inheirited from parent? */ xx = headerAddEntry(h, RPMTAG_BUILDTIME, RPM_INT32_TYPE, &tid, 1); @@ -691,7 +691,7 @@ int rpmtsSolve(rpmts ts, rpmds ds, const void * data) const char * hname; size_t hnamelen; time_t htime; - int_32 * ip; + int32_t * ip; if (rpmtag == RPMTAG_PROVIDENAME && !rpmdsAnyMatchesDep(h, ds, 1)) continue; @@ -1152,18 +1152,18 @@ int rpmtsSetChrootDone(rpmts ts, int chrootDone) return ochrootDone; } -int_32 rpmtsGetTid(rpmts ts) +int32_t rpmtsGetTid(rpmts ts) { - int_32 tid = 0; + int32_t tid = 0; if (ts != NULL) { tid = ts->tid; } return tid; } -int_32 rpmtsSetTid(rpmts ts, int_32 tid) +int32_t rpmtsSetTid(rpmts ts, int32_t tid) { - int_32 otid = 0; + int32_t otid = 0; if (ts != NULL) { otid = ts->tid; ts->tid = tid; @@ -1171,17 +1171,17 @@ int_32 rpmtsSetTid(rpmts ts, int_32 tid) return otid; } -int_32 rpmtsSigtag(const rpmts ts) +int32_t rpmtsSigtag(const rpmts ts) { - int_32 sigtag = 0; + int32_t sigtag = 0; if (ts != NULL) sigtag = ts->sigtag; return sigtag; } -int_32 rpmtsSigtype(const rpmts ts) +int32_t rpmtsSigtype(const rpmts ts) { - int_32 sigtype = 0; + int32_t sigtype = 0; if (ts != NULL) sigtype = ts->sigtype; return sigtype; @@ -1195,16 +1195,16 @@ const void * rpmtsSig(const rpmts ts) return sig; } -int_32 rpmtsSiglen(const rpmts ts) +int32_t rpmtsSiglen(const rpmts ts) { - int_32 siglen = 0; + int32_t siglen = 0; if (ts != NULL) siglen = ts->siglen; return siglen; } int rpmtsSetSig(rpmts ts, - int_32 sigtag, int_32 sigtype, const void * sig, int_32 siglen) + int32_t sigtag, int32_t sigtype, const void * sig, int32_t siglen) { if (ts != NULL) { if (ts->sig && ts->sigtype) @@ -1327,11 +1327,11 @@ int rpmtsInitDSI(const rpmts ts) } void rpmtsUpdateDSI(const rpmts ts, dev_t dev, - uint_32 fileSize, uint_32 prevSize, uint_32 fixupSize, + uint32_t fileSize, uint32_t prevSize, uint32_t fixupSize, rpmFileAction action) { rpmDiskSpaceInfo dsi; - uint_32 bneeded; + uint32_t bneeded; dsi = ts->dsi; if (dsi) { @@ -1490,14 +1490,14 @@ rpmte rpmtsSetRelocateElement(rpmts ts, rpmte relocateElement) return orelocateElement; } -uint_32 rpmtsColor(rpmts ts) +uint32_t rpmtsColor(rpmts ts) { return (ts != NULL ? ts->color : 0); } -uint_32 rpmtsSetColor(rpmts ts, uint_32 color) +uint32_t rpmtsSetColor(rpmts ts, uint32_t color) { - uint_32 ocolor = 0; + uint32_t ocolor = 0; if (ts != NULL) { ocolor = ts->color; ts->color = color; @@ -1505,7 +1505,7 @@ uint_32 rpmtsSetColor(rpmts ts, uint_32 color) return ocolor; } -uint_32 rpmtsPrefColor(rpmts ts) +uint32_t rpmtsPrefColor(rpmts ts) { return (ts != NULL ? ts->prefcolor : 0); } @@ -1581,7 +1581,7 @@ rpmts rpmtsCreate(void) ts->dbmode = O_RDONLY; ts->scriptFd = NULL; - ts->tid = (int_32) time(NULL); + ts->tid = (int32_t) time(NULL); ts->delta = 5; ts->color = rpmExpandNumeric("%{?_transaction_color}"); diff --git a/lib/rpmts.h b/lib/rpmts.h index 44a779283..88f160135 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -271,18 +271,18 @@ struct rpmts_s { const char * currDir; /*!< Current working directory. */ FD_t scriptFd; /*!< Scriptlet stdout/stderr. */ int delta; /*!< Delta for reallocation. */ - int_32 tid; /*!< Transaction id. */ + int32_t tid; /*!< Transaction id. */ - uint_32 color; /*!< Transaction color bits. */ - uint_32 prefcolor; /*!< Preferred file color. */ + uint32_t color; /*!< Transaction color bits. */ + uint32_t prefcolor; /*!< Preferred file color. */ rpmVSFlags vsflags; /*!< Signature/digest verification flags. */ const char * fn; /*!< Current package fn. */ - int_32 sigtag; /*!< Current package signature tag. */ - int_32 sigtype; /*!< Current package signature data type. */ + int32_t sigtag; /*!< Current package signature tag. */ + int32_t sigtype; /*!< Current package signature data type. */ const void * sig; /*!< Current package signature. */ - int_32 siglen; /*!< Current package signature length. */ + int32_t siglen; /*!< Current package signature length. */ const unsigned char * pkpkt;/*!< Current pubkey packet. */ size_t pkpktlen; /*!< Current pubkey packet length. */ @@ -646,7 +646,7 @@ int rpmtsSetChrootDone(rpmts ts, int chrootDone); * @param ts transaction set * @return transaction id */ -int_32 rpmtsGetTid(rpmts ts); +int32_t rpmtsGetTid(rpmts ts); /** \ingroup rpmts * Set transaction id, i.e. transaction time stamp. @@ -654,21 +654,21 @@ int_32 rpmtsGetTid(rpmts ts); * @param tid new transaction id * @return previous transaction id */ -int_32 rpmtsSetTid(rpmts ts, int_32 tid); +int32_t rpmtsSetTid(rpmts ts, int32_t tid); /** \ingroup rpmts * Get signature tag. * @param ts transaction set * @return signature tag */ -int_32 rpmtsSigtag(const rpmts ts); +int32_t rpmtsSigtag(const rpmts ts); /** \ingroup rpmts * Get signature tag type. * @param ts transaction set * @return signature tag type */ -int_32 rpmtsSigtype(const rpmts ts); +int32_t rpmtsSigtype(const rpmts ts); /** \ingroup rpmts * Get signature tag data, i.e. from header. @@ -682,7 +682,7 @@ extern const void * rpmtsSig(const rpmts ts); * @param ts transaction set * @return signature tag data length */ -int_32 rpmtsSiglen(const rpmts ts); +int32_t rpmtsSiglen(const rpmts ts); /** \ingroup rpmts * Set signature tag info, i.e. from header. @@ -694,8 +694,8 @@ int_32 rpmtsSiglen(const rpmts ts); * @return 0 always */ int rpmtsSetSig(rpmts ts, - int_32 sigtag, int_32 sigtype, - const void * sig, int_32 siglen); + int32_t sigtag, int32_t sigtype, + const void * sig, int32_t siglen); /** \ingroup rpmts * Get OpenPGP packet parameters, i.e. signature/pubkey constants. @@ -742,7 +742,7 @@ int rpmtsInitDSI(const rpmts ts); * @param action file disposition */ void rpmtsUpdateDSI(const rpmts ts, dev_t dev, - uint_32 fileSize, uint_32 prevSize, uint_32 fixupSize, + uint32_t fileSize, uint32_t prevSize, uint32_t fixupSize, rpmFileAction action); /** \ingroup rpmts @@ -836,14 +836,14 @@ rpmte rpmtsSetRelocateElement(rpmts ts, rpmte relocateElement); * @param ts transaction set * @return color bits */ -uint_32 rpmtsColor(rpmts ts); +uint32_t rpmtsColor(rpmts ts); /** * Retrieve prefered file color * @param ts transaction set * @return color bits */ -uint_32 rpmtsPrefColor(rpmts ts); +uint32_t rpmtsPrefColor(rpmts ts); /** * Set color bits of transaction set. @@ -851,7 +851,7 @@ uint_32 rpmtsPrefColor(rpmts ts); * @param color new color bits * @return previous color bits */ -uint_32 rpmtsSetColor(rpmts ts, uint_32 color); +uint32_t rpmtsSetColor(rpmts ts, uint32_t color); /** * Retrieve operation timestamp from a transaction set. @@ -941,7 +941,7 @@ char * hGetNEVRA(Header h, const char ** np ); * @param h header * @return header color */ -uint_32 hGetColor(Header h); +uint32_t hGetColor(Header h); #ifdef __cplusplus } diff --git a/lib/signature.c b/lib/signature.c index 0d5dbfbb0..89a33cde9 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -132,13 +132,13 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type, const char ** msg) { char buf[BUFSIZ]; - int_32 block[4]; - int_32 il; - int_32 dl; - int_32 * ei = NULL; + int32_t block[4]; + int32_t il; + int32_t dl; + int32_t * ei = NULL; entryInfo pe; size_t nb; - int_32 ril = 0; + int32_t ril = 0; indexEntry entry = memset(alloca(sizeof(*entry)), 0, sizeof(*entry)); entryInfo info = memset(alloca(sizeof(*info)), 0, sizeof(*info)); unsigned char * dataStart; @@ -221,7 +221,7 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type, (void) memcpy(info, dataEnd, REGION_TAG_COUNT); /* XXX Really old packages have HEADER_IMAGE, not HEADER_SIGNATURES. */ if (info->tag == htonl(RPMTAG_HEADERIMAGE)) { - int_32 stag = htonl(RPMTAG_HEADERSIGNATURES); + int32_t stag = htonl(RPMTAG_HEADERSIGNATURES); info->tag = stag; memcpy(dataEnd, &stag, sizeof(stag)); } @@ -273,7 +273,7 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type, { int sigSize = headerSizeof(sigh, HEADER_MAGIC_YES); int pad = (8 - (sigSize % 8)) % 8; /* 8-byte pad */ - int_32 * archSize = NULL; + int32_t * archSize = NULL; /* Position at beginning of header. */ if (pad && (xx = timedRead(fd, (void *)block, pad)) != pad) { @@ -344,8 +344,8 @@ Header rpmFreeSignature(Header sigh) * @param passPhrase private key pass phrase * @return 0 on success, 1 on failure */ -static int makePGPSignature(const char * file, int_32 * sigTagp, - byte ** pktp, int_32 * pktlenp, +static int makePGPSignature(const char * file, int32_t * sigTagp, + byte ** pktp, int32_t * pktlenp, const char * passPhrase) { char * sigfile = alloca(1024); @@ -475,8 +475,8 @@ static int makePGPSignature(const char * file, int_32 * sigTagp, * @param passPhrase private key pass phrase * @return 0 on success, 1 on failure */ -static int makeGPGSignature(const char * file, int_32 * sigTagp, - byte ** pktp, int_32 * pktlenp, +static int makeGPGSignature(const char * file, int32_t * sigTagp, + byte ** pktp, int32_t * pktlenp, const char * passPhrase) { char * sigfile = alloca(strlen(file)+sizeof(".sig")); @@ -610,13 +610,13 @@ static int makeGPGSignature(const char * file, int_32 * sigTagp, * @param passPhrase private key pass phrase * @return 0 on success, -1 on failure */ -static int makeHDRSignature(Header sigh, const char * file, int_32 sigTag, +static int makeHDRSignature(Header sigh, const char * file, int32_t sigTag, const char * passPhrase) { Header h = NULL; FD_t fd = NULL; byte * pkt; - int_32 pktlen; + int32_t pktlen; const char * fn = NULL; const char * SHA1 = NULL; int ret = -1; /* assume failure. */ @@ -641,7 +641,7 @@ static int makeHDRSignature(Header sigh, const char * file, int_32 sigTag, if (headerIsEntry(h, RPMTAG_HEADERIMMUTABLE)) { DIGEST_CTX ctx; void * uh; - int_32 uht, uhc; + int32_t uht, uhc; if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc) || uh == NULL) @@ -712,12 +712,12 @@ exit: return ret; } -int rpmAddSignature(Header sigh, const char * file, int_32 sigTag, +int rpmAddSignature(Header sigh, const char * file, int32_t sigTag, const char * passPhrase) { struct stat st; byte * pkt; - int_32 pktlen; + int32_t pktlen; int ret = -1; /* assume failure. */ switch (sigTag) { @@ -929,7 +929,7 @@ verifySizeSignature(const rpmts ts, char * t) const void * sig = rpmtsSig(ts); pgpDig dig = rpmtsDig(ts); rpmRC res; - int_32 size = 0x7fffffff; + int32_t size = 0x7fffffff; *t = '\0'; t = stpcpy(t, _("Header+Payload size: ")); @@ -962,7 +962,7 @@ verifyMD5Signature(const rpmts ts, char * t, DIGEST_CTX md5ctx) { const void * sig = rpmtsSig(ts); - int_32 siglen = rpmtsSiglen(ts); + int32_t siglen = rpmtsSiglen(ts); pgpDig dig = rpmtsDig(ts); rpmRC res; byte * md5sum = NULL; @@ -1018,7 +1018,7 @@ verifySHA1Signature(const rpmts ts, char * t, { const void * sig = rpmtsSig(ts); #ifdef NOTYET - int_32 siglen = rpmtsSiglen(ts); + int32_t siglen = rpmtsSiglen(ts); #endif pgpDig dig = rpmtsDig(ts); rpmRC res; @@ -1088,9 +1088,9 @@ verifyRSASignature(rpmts ts, char * t, { const void * sig = rpmtsSig(ts); #ifdef NOTYET - int_32 siglen = rpmtsSiglen(ts); + int32_t siglen = rpmtsSiglen(ts); #endif - int_32 sigtag = rpmtsSigtag(ts); + int32_t sigtag = rpmtsSigtag(ts); pgpDig dig = rpmtsDig(ts); pgpDigParams sigp = rpmtsSignature(ts); const char * prefix = NULL; @@ -1267,9 +1267,9 @@ verifyDSASignature(rpmts ts, char * t, { const void * sig = rpmtsSig(ts); #ifdef NOTYET - int_32 siglen = rpmtsSiglen(ts); + int32_t siglen = rpmtsSiglen(ts); #endif - int_32 sigtag = rpmtsSigtag(ts); + int32_t sigtag = rpmtsSigtag(ts); pgpDig dig = rpmtsDig(ts); pgpDigParams sigp = rpmtsSignature(ts); rpmRC res; @@ -1358,8 +1358,8 @@ rpmRC rpmVerifySignature(const rpmts ts, char * result) { const void * sig = rpmtsSig(ts); - int_32 siglen = rpmtsSiglen(ts); - int_32 sigtag = rpmtsSigtag(ts); + int32_t siglen = rpmtsSiglen(ts); + int32_t sigtag = rpmtsSigtag(ts); pgpDig dig = rpmtsDig(ts); rpmRC res; diff --git a/lib/signature.h b/lib/signature.h index be869480f..ce2fed7f6 100644 --- a/lib/signature.h +++ b/lib/signature.h @@ -65,7 +65,7 @@ int rpmWriteSignature(FD_t fd, Header h); * @return 0 on success, -1 on failure */ int rpmAddSignature(Header sigh, const char * file, - int_32 sigTag, const char * passPhrase); + int32_t sigTag, const char * passPhrase); /******************************************************************/ @@ -119,7 +119,7 @@ main(int argc, char *argv[]) vsflags |= RPMVSF_NOHDRCHK; (void) rpmtsSetVSFlags(ts, vsflags); - { int_32 tid = (int_32) time(NULL); + { int32_t tid = (int32_t) time(NULL); (void) rpmtsSetTid(ts, tid); } diff --git a/lib/transaction.c b/lib/transaction.c index 63a11456d..5d33d73bb 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -94,10 +94,10 @@ static int handleInstInstalledFiles(const rpmts ts, sharedFileInfo shared, int sharedCount, int reportConflicts) { - uint_32 tscolor = rpmtsColor(ts); - uint_32 prefcolor = rpmtsPrefColor(ts); - uint_32 otecolor, tecolor; - uint_32 oFColor, FColor; + uint32_t tscolor = rpmtsColor(ts); + uint32_t prefcolor = rpmtsPrefColor(ts); + uint32_t otecolor, tecolor; + uint32_t oFColor, FColor; const char * altNEVR = NULL; rpmfi otherFi = NULL; int numReplaced = 0; @@ -162,7 +162,7 @@ static int handleInstInstalledFiles(const rpmts ts, continue; if (!(fi->mapflags & CPIO_SBIT_CHECK)) { - int_16 omode = rpmfiFMode(otherFi); + int16_t omode = rpmfiFMode(otherFi); if (S_ISREG(omode) && (omode & 06000) != 0) { fi->mapflags |= CPIO_SBIT_CHECK; } @@ -392,7 +392,7 @@ bingoFps->baseName); static void handleOverlappedFiles(const rpmts ts, const rpmte p, rpmfi fi) { - uint_32 fixupSize = 0; + uint32_t fixupSize = 0; rpmps ps; const char * fn; int i, j; @@ -401,14 +401,14 @@ static void handleOverlappedFiles(const rpmts ts, fi = rpmfiInit(fi, 0); if (fi != NULL) while ((i = rpmfiNext(fi)) >= 0) { - uint_32 tscolor = rpmtsColor(ts); - uint_32 prefcolor = rpmtsPrefColor(ts); - uint_32 oFColor, FColor; + uint32_t tscolor = rpmtsColor(ts); + uint32_t prefcolor = rpmtsPrefColor(ts); + uint32_t oFColor, FColor; struct fingerPrint_s * fiFps; int otherPkgNum, otherFileNum; rpmfi otherFi; - int_32 FFlags; - int_16 FMode; + int32_t FFlags; + int16_t FMode; const rpmfi * recs; int numRecs; @@ -614,7 +614,7 @@ assert(otherFi != NULL); static int ensureOlder(rpmts ts, const rpmte p, const Header h) { - int_32 reqFlags = (RPMSENSE_LESS | RPMSENSE_EQUAL); + int32_t reqFlags = (RPMSENSE_LESS | RPMSENSE_EQUAL); const char * reqEVR; rpmds req; char * t; @@ -662,8 +662,8 @@ static int ensureOlder(rpmts ts, /* FIX: fi->actions is modified. */ static void skipFiles(const rpmts ts, rpmfi fi) { - uint_32 tscolor = rpmtsColor(ts); - uint_32 FColor; + uint32_t tscolor = rpmtsColor(ts); + uint32_t FColor; int noConfigs = (rpmtsFlags(ts) & RPMTRANS_FLAG_NOCONFIGS); int noDocs = (rpmtsFlags(ts) & RPMTRANS_FLAG_NODOCS); char ** netsharedPaths = NULL; @@ -842,7 +842,7 @@ static void skipFiles(const rpmts ts, rpmfi fi) if (fi != NULL) /* XXX lclint */ while ((i = rpmfiNext(fi)) >= 0) { const char * fdn, * fbn; - int_16 fFMode; + int16_t fFMode; if (XFA_SKIPPING(fi->actions[i])) continue; @@ -906,7 +906,7 @@ static rpmRC _rpmtsRollback(rpmts rollbackTransaction) int rc = 0; int numAdded = 0; int numRemoved = 0; - int_32 tid; + int32_t tid; rpmtsi tsi; rpmte te; rpmps ps; @@ -1027,7 +1027,7 @@ static rpmRC getRepackageHeaderFromTE(rpmts ts, rpmte te, Header *hdrp, const char **fnp) { - int_32 tid; + int32_t tid; const char * name; const char * rpname = NULL; const char * _repackage_dir = NULL; @@ -1306,7 +1306,7 @@ cleanup: int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) { - uint_32 tscolor = rpmtsColor(ts); + uint32_t tscolor = rpmtsColor(ts); int i, j; int ourrc = 0; int totalFileCount = 0; @@ -1393,7 +1393,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) (void) rpmtsSetChrootDone(ts, 0); - { int_32 tid = (int_32) time(NULL); + { int32_t tid = (int32_t) time(NULL); (void) rpmtsSetTid(ts, tid); } @@ -1760,7 +1760,7 @@ rpmlog(RPMLOG_DEBUG, _("computing file dispositions\n")); if (rpmteType(p) == TR_REMOVED) { fi = rpmfiInit(fi, 0); while ((i = rpmfiNext(fi)) >= 0) { - int_16 mode; + int16_t mode; if (XFA_SKIPPING(fi->actions[i])) continue; (void) rpmfiSetFX(fi, i); diff --git a/lib/verify.c b/lib/verify.c index 17022eb9e..a04ae38a5 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -171,8 +171,8 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi, { *res |= RPMVERIFY_RDEV; } else if (S_ISDEV(fmode) && S_ISDEV(sb.st_mode)) { - uint_16 st_rdev = (sb.st_rdev & 0xffff); - uint_16 frdev = (rpmfiFRdev(fi) & 0xffff); + uint16_t st_rdev = (sb.st_rdev & 0xffff); + uint16_t frdev = (rpmfiFRdev(fi) & 0xffff); if (st_rdev != frdev) *res |= RPMVERIFY_RDEV; } |