(void) headerAddOrAppendEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
&(flp->fileURL), 1);
- if (sizeof(flp->fl_size) != sizeof(uint_32)) {
- uint_32 psize = (uint_32)flp->fl_size;
+ if (sizeof(flp->fl_size) != sizeof(uint32_t)) {
+ uint32_t psize = (uint32_t)flp->fl_size;
(void) headerAddOrAppendEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
&(psize), 1);
} else {
&(flp->uname), 1);
(void) headerAddOrAppendEntry(h, RPMTAG_FILEGROUPNAME, RPM_STRING_ARRAY_TYPE,
&(flp->gname), 1);
- if (sizeof(flp->fl_mtime) != sizeof(uint_32)) {
- uint_32 mtime = (uint_32)flp->fl_mtime;
+ if (sizeof(flp->fl_mtime) != sizeof(uint32_t)) {
+ uint32_t mtime = (uint32_t)flp->fl_mtime;
(void) headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE,
&(mtime), 1);
} else {
(void) headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE,
&(flp->fl_mtime), 1);
}
- if (sizeof(flp->fl_mode) != sizeof(uint_16)) {
- uint_16 pmode = (uint_16)flp->fl_mode;
+ if (sizeof(flp->fl_mode) != sizeof(uint16_t)) {
+ uint16_t pmode = (uint16_t)flp->fl_mode;
(void) headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
&(pmode), 1);
} else {
(void) headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
&(flp->fl_mode), 1);
}
- if (sizeof(flp->fl_rdev) != sizeof(uint_16)) {
- uint_16 prdev = (uint_16)flp->fl_rdev;
+ if (sizeof(flp->fl_rdev) != sizeof(uint16_t)) {
+ uint16_t prdev = (uint16_t)flp->fl_rdev;
(void) headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
&(prdev), 1);
} else {
(void) headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
&(flp->fl_rdev), 1);
}
- if (sizeof(flp->fl_dev) != sizeof(uint_32)) {
- uint_32 pdevice = (uint_32)flp->fl_dev;
+ if (sizeof(flp->fl_dev) != sizeof(uint32_t)) {
+ uint32_t pdevice = (uint32_t)flp->fl_dev;
(void) headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
&(pdevice), 1);
} else {
(void) headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
&(flp->fl_dev), 1);
}
- if (sizeof(flp->fl_ino) != sizeof(uint_32)) {
- uint_32 ino = (uint_32)flp->fl_ino;
+ if (sizeof(flp->fl_ino) != sizeof(uint32_t)) {
+ uint32_t ino = (uint32_t)flp->fl_ino;
(void) headerAddOrAppendEntry(h, RPMTAG_FILEINODES, RPM_INT32_TYPE,
&(ino), 1);
} else {
void initSourceHeader(rpmSpec spec)
{
HeaderIterator hi;
- int_32 tag, type, count;
+ int32_t tag, type, count;
const void * ptr;
spec->sourceHeader = headerNew();
return gids[gid_used++];
}
-int_32 * getBuildTime(void)
+int32_t * getBuildTime(void)
{
- static int_32 buildTime[1];
+ static int32_t buildTime[1];
if (buildTime[0] == 0)
- buildTime[0] = (int_32) time(NULL);
+ buildTime[0] = (int32_t) time(NULL);
return buildTime;
}
{
FD_t fd = NULL;
FD_t ifd = NULL;
- int_32 count, sigtag;
+ int32_t count, sigtag;
const char * sigtarget;
const char * rpmio_flags = NULL;
const char * SHA1 = NULL;
*/
if (Fileno(csa->cpioFdIn) < 0) {
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
- int_32 * archiveSize;
+ int32_t * archiveSize;
if (hge(h, RPMTAG_ARCHIVESIZE, NULL, (void *)&archiveSize, NULL))
*archiveSize = csa->cpioArchiveSize;
}
SHA1 = _free(SHA1);
}
- { int_32 payloadSize = csa->cpioArchiveSize;
+ { int32_t payloadSize = csa->cpioArchiveSize;
(void) headerAddEntry(sig, RPMSIGTAG_PAYLOADSIZE, RPM_INT32_TYPE,
&payloadSize, 1);
}
/* XXX Fish the pkgid out of the signature header. */
if (sig != NULL && pkgidp != NULL) {
- int_32 tagType;
+ int32_t tagType;
unsigned char * MD5 = NULL;
- int_32 c;
+ int32_t c;
int xx;
xx = headerGetEntry(sig, RPMSIGTAG_MD5, &tagType, (void **)&MD5, &c);
if (tagType == RPM_BIN_TYPE && MD5 != NULL && c == 16)
return rc;
}
-static int_32 copyTags[] = {
+static int32_t copyTags[] = {
RPMTAG_CHANGELOGTIME,
RPMTAG_CHANGELOGNAME,
RPMTAG_CHANGELOGTEXT,
void addChangelogEntry(Header h, time_t time, const char *name, const char *text)
{
- int_32 mytime = time; /* XXX convert to header representation */
+ int32_t mytime = time; /* XXX convert to header representation */
if (headerIsEntry(h, RPMTAG_CHANGELOGTIME)) {
(void) headerAppendEntry(h, RPMTAG_CHANGELOGTIME, RPM_INT32_TYPE,
&mytime, 1);
/**
*/
-static void addOrAppendListEntry(Header h, int_32 tag, char * line)
+static void addOrAppendListEntry(Header h, int32_t tag, char * line)
{
int xx;
int argc;
if (pkg != spec->packages)
headerCopyTags(spec->packages->header, pkg->header,
- (int_32 *)copyTagsDuringParse);
+ (int32_t *)copyTagsDuringParse);
if (checkForRequired(pkg->header, NVR))
return RPMERR_BADSPEC;
* Return build time stamp.
* @return build time stamp
*/
-extern int_32 * getBuildTime(void) ;
+extern int32_t * getBuildTime(void) ;
/** \ingroup rpmbuild
* Read next line from spec file.
static char * rpmfcFileDep(char * buf, int ix,
rpmds ds)
{
- int_32 tagN = rpmdsTagN(ds);
+ int32_t tagN = rpmdsTagN(ds);
char deptype = 'X';
buf[0] = '\0';
rpmds * depsp, ds;
const char * N;
const char * EVR;
- int_32 Flags, dsContext, tagN;
+ int32_t Flags, dsContext, tagN;
ARGV_t pav;
const char * s;
int pac;
struct stat sb, * st = &sb;
const char * soname = NULL;
rpmds * depsp, ds;
- int_32 tagN, dsContext;
+ int32_t tagN, dsContext;
char * t;
int xx;
int isElf64;
rpmds ds;
const char * N;
const char * EVR;
- int_32 Flags;
+ int32_t Flags;
unsigned char deptype;
int nddict;
int previx;
return 0;
}
-int rpmfcClassify(rpmfc fc, ARGV_t argv, int_16 * fmode)
+int rpmfcClassify(rpmfc fc, ARGV_t argv, int16_t * fmode)
{
ARGV_t fcav = NULL;
ARGV_t dav;
for (fc->ix = 0; fc->ix < fc->nfiles; fc->ix++) {
const char * ftype;
- int_16 mode = (fmode ? fmode[fc->ix] : 0);
+ int16_t mode = (fmode ? fmode[fc->ix] : 0);
s = argv[fc->ix];
assert(s != NULL);
rpmds ds = NULL;
int flags = 0; /* XXX !scareMem */
const char * DNEVR;
- int_32 Flags;
+ int32_t Flags;
int bingo = 0;
for (dm = DepMsgs; dm->msg != NULL; dm++) {
rpmds ds;
int flags = 0; /* XXX !scareMem */
ARGV_t av;
- int_16 * fmode;
+ int16_t * fmode;
int ac = rpmfiFC(fi);
const void ** p;
char buf[BUFSIZ];
c = argiCount(fc->fcolor);
assert(ac == c);
if (p != NULL && c > 0) {
- int_32 * fcolors = (int_32 *)p;
+ int32_t * fcolors = (int32_t *)p;
int i;
/* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */
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;
*/
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;
}
}
-static inline const char * identifyDepend(int_32 f)
+static inline const char * identifyDepend(int32_t f)
{
if (isLegacyPreReq(f))
return "PreReq:";
/* 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;
static void addQ(rpmte p,
rpmte * qp,
rpmte * rp,
- uint_32 prefcolor)
+ uint32_t prefcolor)
{
rpmte q, qprev;
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;
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;
* @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)
* @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;
} 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);
}
* @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)"));
* @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)
{
* @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;
* @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)
{
} 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:
* @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)
{
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)
* @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;
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)
* @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;
*/
static int instprefixTag(Header h, rpmTagType * type,
const void ** data,
- int_32 * count,
+ int32_t * count,
int * freeData)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
* @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)) {
* @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;
* @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;
* @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;
* @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;
* @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;
* @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;
* @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;
* @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);
* @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);
* @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);
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;
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;
#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)
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;
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");
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;
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;
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;
{
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));
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;
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;
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;
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;
}
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;
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))
void * ptr;
const char ** argv;
const char * str;
- int_32 * i32p;
+ int32_t * i32p;
} body;
char numbuf[32];
rpmTagType type;
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;
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 */
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;
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);
/* 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);
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;
/* 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);
}
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 */
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;
const char * fuser;
const char * fgroup;
const char * flink;
- int_32 fnlink;
+ int32_t fnlink;
fflags = rpmfiFFlags(fi);
fmode = rpmfiFMode(fi);
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 */
const char * baseName; /*!< File basename. */
int baseNameLen;
rpmalNum pkgNum; /*!< Containing package index. */
- uint_32 ficolor;
+ uint32_t ficolor;
};
typedef struct dirInfo_s * dirInfo;
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. */
};
}
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;
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;
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;
* 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
rpmalKey pkgKey,
fnpyKey key,
rpmds provides, rpmfi fi,
- uint_32 tscolor);
+ uint32_t tscolor);
/**
* Add package provides to available list index.
*/
void rpmalAddProvides(rpmal al,
rpmalKey pkgKey,
- rpmds provides, uint_32 tscolor);
+ rpmds provides, uint32_t tscolor);
/**
* Generate index for available list.
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) {
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;
/* 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;
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)
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;
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;
(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";
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;
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;
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)
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)
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) {
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)
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) {
rpmds ds;
const char ** N;
const char ** EVR;
- int_32 * Flags;
+ int32_t * Flags;
int j;
int save;
{
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 */
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). */
* @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.
* @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.
* @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.
* @param ds dependency set
* @return current dependency color
*/
-uint_32 rpmdsColor(const rpmds ds);
+uint32_t rpmdsColor(const rpmds ds);
/**
* Return current dependency color.
* @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.
* @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.
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)
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)
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)
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)
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)
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)
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. */
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)
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)
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++) {
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)
}
}
-rpmFileTypes rpmfiWhatis(uint_16 mode)
+rpmFileTypes rpmfiWhatis(uint16_t mode)
{
if (S_ISDIR(mode)) return XDIR;
if (S_ISCHR(mode)) return CDEV;
}
}
- diskWhat = rpmfiWhatis((int_16)sb.st_mode);
+ diskWhat = rpmfiWhatis((int16_t)sb.st_mode);
dbWhat = rpmfiWhatis(rpmfiFMode(ofi));
newWhat = rpmfiWhatis(rpmfiFMode(nfi));
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)
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;
rpmte p;
rpmfi fi = NULL;
const char * Type;
- uint_32 * uip;
+ uint32_t * uip;
int dnlmax, bnlmax;
unsigned char * t;
int len;
char deptype = 'R';
char mydt;
const char * DNEVR;
- const uint_32 * ddict;
+ const uint32_t * ddict;
unsigned ix;
int ndx;
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;
/*-----------------------------*/
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. */
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
* @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.
* @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.
* @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.
* @param mode file mode bits (from header)
* @return file type
*/
-rpmFileTypes rpmfiWhatis(uint_16 mode);
+rpmFileTypes rpmfiWhatis(uint16_t mode);
/**
* Return file info comparison.
typedef int (*HGE_t) (Header h, rpmTag tag,
rpmTagType * type,
void ** p,
- int_32 * c);
+ int32_t * c);
/**
* Prototype for headerAddEntry() vector.
* @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.
* @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.
* @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.
* @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);
/* ==================================================================== */
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;
rpmalKey pkgKey)
{
rpmte p = xcalloc(1, sizeof(*p));
- int_32 * ep;
+ int32_t * ep;
int xx;
p->type = type;
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) {
return ocolor;
}
-uint_32 rpmtePkgFileSize(rpmte te)
+uint32_t rpmtePkgFileSize(rpmte te)
{
return (te != NULL ? te->pkgFileSize : 0);
}
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;
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. */
* @param te transaction element
* @return color bits
*/
-uint_32 rpmteColor(rpmte te);
+uint32_t rpmteColor(rpmte te);
/**
* Set color bits of transaction element.
* @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.
* @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.
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;
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;
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;
/* 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);
const char * hname;
size_t hnamelen;
time_t htime;
- int_32 * ip;
+ int32_t * ip;
if (rpmtag == RPMTAG_PROVIDENAME && !rpmdsAnyMatchesDep(h, ds, 1))
continue;
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;
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;
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)
}
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) {
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;
return ocolor;
}
-uint_32 rpmtsPrefColor(rpmts ts)
+uint32_t rpmtsPrefColor(rpmts ts)
{
return (ts != NULL ? ts->prefcolor : 0);
}
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}");
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. */
* @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.
* @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.
* @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.
* @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.
* @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
* @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.
* @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.
* @param h header
* @return header color
*/
-uint_32 hGetColor(Header h);
+uint32_t hGetColor(Header h);
#ifdef __cplusplus
}
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;
(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));
}
{ 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) {
* @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);
* @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"));
* @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. */
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)
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) {
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: "));
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;
{
const void * sig = rpmtsSig(ts);
#ifdef NOTYET
- int_32 siglen = rpmtsSiglen(ts);
+ int32_t siglen = rpmtsSiglen(ts);
#endif
pgpDig dig = rpmtsDig(ts);
rpmRC res;
{
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;
{
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;
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;
* @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);
/******************************************************************/
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);
}
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;
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;
}
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;
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;
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;
/* 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;
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;
int rc = 0;
int numAdded = 0;
int numRemoved = 0;
- int_32 tid;
+ int32_t tid;
rpmtsi tsi;
rpmte te;
rpmps ps;
Header *hdrp,
const char **fnp)
{
- int_32 tid;
+ int32_t tid;
const char * name;
const char * rpname = NULL;
const char * _repackage_dir = NULL;
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;
(void) rpmtsSetChrootDone(ts, 0);
- { int_32 tid = (int_32) time(NULL);
+ { int32_t tid = (int32_t) time(NULL);
(void) rpmtsSetTid(ts, tid);
}
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);
{
*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;
}
char ** md5list;
char ** fileList;
char ** linkList;
- int_32 * fileSizes;
- int_32 * mtimes;
- int_32 * uids, * gids; /* XXX these tags are not used anymore */
+ int32_t * fileSizes;
+ int32_t * mtimes;
+ int32_t * uids, * gids; /* XXX these tags are not used anymore */
unsigned short * rdevs;
unsigned short * modes;
} ;
* @retval c address of number of values
* @return 0 on success, 1 on bad magic, 2 on error
*/
-static int dressedHeaderGetEntry(Header h, int_32 tag, int_32 *type,
- void **p, int_32 *c)
+static int dressedHeaderGetEntry(Header h, int32_t tag, int32_t *type,
+ void **p, int32_t *c)
{
switch (tag) {
case RPMTAG_OLDFILENAMES:
{
Header h;
HeaderIterator hi;
- int_32 * newMatch;
- int_32 * oldMatch;
+ int32_t * newMatch;
+ int32_t * oldMatch;
hdrObject * hdr;
int count = 0;
int type, c, tag;
mi = rpmdbFreeIterator(mi);
} else
if (PyInt_Check(o)) {
- uint_32 instance = PyInt_AsLong(o);
+ uint32_t instance = PyInt_AsLong(o);
mi = rpmtsInitIterator(s->ts, RPMDBI_PACKAGES, &instance, sizeof(instance));
if (instance == 0 || mi == NULL) {
} else {
Header h;
while ((h = rpmdbNextIterator(mi)) != NULL) {
- uint_32 recOffset = rpmdbGetIteratorOffset(mi);
+ uint32_t recOffset = rpmdbGetIteratorOffset(mi);
if (recOffset)
rpmtsAddEraseElement(s->ts, h, recOffset);
break;
struct rpmInstallArguments_s * ia = alloca(sizeof(*ia));
rpmtransFlags transFlags;
const char ** av = NULL;
- uint_32 rbtid;
+ uint32_t rbtid;
int rc;
char * kwlist[] = {"transactionId", NULL};
static PyObject *
rpmts_SetColor(rpmtsObject * s, PyObject * args, PyObject * kwds)
{
- uint_32 tscolor;
+ uint32_t tscolor;
char * kwlist[] = {"color", NULL};
if (_rpmts_debug)
switch (rpmtag) {
case RPMDBI_PACKAGES:
case RPMDBI_DEPENDS:
- dbi->dbi_jlen = 1 * sizeof(int_32);
+ dbi->dbi_jlen = 1 * sizeof(int32_t);
break;
default:
- dbi->dbi_jlen = 2 * sizeof(int_32);
+ dbi->dbi_jlen = 2 * sizeof(int32_t);
break;
}
}
void fpLookupList(fingerPrintCache cache, const char ** dirNames,
- const char ** baseNames, const uint_32 * dirIndexes,
+ const char ** baseNames, const uint32_t * dirIndexes,
int fileCount, fingerPrint * fpList)
{
int i;
HFD_t hfd = headerFreeData;
const char ** baseNames, ** dirNames;
rpmTagType bnt, dnt;
- uint_32 * dirIndexes;
+ uint32_t * dirIndexes;
int fileCount;
int xx;
* @retval fpList pointer to array of finger prints
*/
void fpLookupList(fingerPrintCache cache, const char ** dirNames,
- const char ** baseNames, const uint_32 * dirIndexes,
+ const char ** baseNames, const uint32_t * dirIndexes,
int fileCount, fingerPrint * fpList);
#ifdef __cplusplus
for (i = 0; i < h->indexUsed; i++, entry++) {
if ((h->flags & HEADERFLAG_ALLOCATED) && ENTRY_IS_REGION(entry)) {
if (entry->length > 0) {
- int_32 * ei = entry->data;
+ int32_t * ei = entry->data;
if ((ei - 2) == h->blob) h->blob = _free(h->blob);
entry->data = NULL;
}
break;
}
- size += 2 * sizeof(int_32); /* count of index entries */
+ size += 2 * sizeof(int32_t); /* count of index entries */
for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) {
unsigned diff;
- int_32 type;
+ int32_t type;
/* Regions go in as is ... */
if (ENTRY_IS_REGION(entry)) {
* @param pend pointer to end of data (or NULL)
* @return no. bytes in data, -1 on failure
*/
-static int dataLength(int_32 type, hPTR_t p, int_32 count, int onDisk,
+static int dataLength(int32_t type, hPTR_t p, int32_t count, int onDisk,
hPTR_t pend)
{
const unsigned char * s = p;
}
/** \ingroup header
- * Swap int_32 and int_16 arrays within header region.
+ * Swap int32_t and int16_t arrays within header region.
*
* This code is way more twisty than I would like.
*
memset(&ieprev, 0, sizeof(ieprev));
for (; il > 0; il--, pe++) {
struct indexEntry_s ie;
- int_32 type;
+ int32_t type;
ie.info.tag = ntohl(pe->tag);
ie.info.type = ntohl(pe->type);
/* Perform endian conversions */
switch (ntohl(pe->type)) {
case RPM_INT32_TYPE:
- { int_32 * it = (int_32 *)t;
+ { int32_t * it = (int32_t *)t;
for (; ie.info.count > 0; ie.info.count--, it += 1) {
if (dataEnd && ((unsigned char *)it) >= dataEnd)
return -1;
t = (unsigned char *) it;
} break;
case RPM_INT16_TYPE:
- { int_16 * it = (int_16 *) t;
+ { int16_t * it = (int16_t *) t;
for (; ie.info.count > 0; ie.info.count--, it += 1) {
if (dataEnd && ((unsigned char *)it) >= dataEnd)
return -1;
static void * doHeaderUnload(Header h,
size_t * lengthPtr)
{
- int_32 * ei = NULL;
+ int32_t * ei = NULL;
entryInfo pe;
char * dataStart;
char * te;
unsigned pad;
unsigned len;
- int_32 il = 0;
- int_32 dl = 0;
+ int32_t il = 0;
+ int32_t dl = 0;
indexEntry entry;
- int_32 type;
+ int32_t type;
int i;
int drlen, ndribbles;
int driplen, ndrips;
drlen = ndribbles = driplen = ndrips = 0;
for (i = 0, entry = h->index; i < h->indexUsed; i++, entry++) {
if (ENTRY_IS_REGION(entry)) {
- int_32 rdl = -entry->info.offset; /* negative offset */
- int_32 ril = rdl/sizeof(*pe);
+ int32_t rdl = -entry->info.offset; /* negative offset */
+ int32_t ril = rdl/sizeof(*pe);
int rid = entry->info.offset;
il += ril;
pe->count = htonl(entry->info.count);
if (ENTRY_IS_REGION(entry)) {
- int_32 rdl = -entry->info.offset; /* negative offset */
- int_32 ril = rdl/sizeof(*pe) + ndribbles;
+ int32_t rdl = -entry->info.offset; /* negative offset */
+ int32_t ril = rdl/sizeof(*pe) + ndribbles;
int rid = entry->info.offset;
src = (char *)entry->data;
/* XXX Legacy regions do not include the region tag and data. */
if (i == 0 && (h->flags & HEADERFLAG_LEGACY)) {
- int_32 stei[4];
+ int32_t stei[4];
legacy = 1;
memcpy(pe+1, src, rdl);
count = entry->info.count;
src = entry->data;
while (count--) {
- *((int_32 *)te) = htonl(*((int_32 *)src));
- te += sizeof(int_32);
- src += sizeof(int_32);
+ *((int32_t *)te) = htonl(*((int32_t *)src));
+ te += sizeof(int32_t);
+ src += sizeof(int32_t);
}
break;
count = entry->info.count;
src = entry->data;
while (count--) {
- *((int_16 *)te) = htons(*((int_16 *)src));
- te += sizeof(int_16);
- src += sizeof(int_16);
+ *((int16_t *)te) = htons(*((int16_t *)src));
+ te += sizeof(int16_t);
+ src += sizeof(int16_t);
}
break;
* @return header entry
*/
static
-indexEntry findEntry(Header h, int_32 tag, int_32 type)
+indexEntry findEntry(Header h, int32_t tag, int32_t type)
{
indexEntry entry, entry2, last;
struct indexEntry_s key;
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
static
-int _headerRemoveEntry(Header h, int_32 tag)
+int _headerRemoveEntry(Header h, int32_t tag)
{
indexEntry last = h->index + h->indexUsed;
indexEntry entry, first;
static
Header _headerLoad(void * uh)
{
- int_32 * ei = (int_32 *) uh;
- int_32 il = ntohl(ei[0]); /* index length */
- int_32 dl = ntohl(ei[1]); /* data length */
+ int32_t * ei = (int32_t *) uh;
+ int32_t il = ntohl(ei[0]); /* index length */
+ int32_t dl = ntohl(ei[1]); /* data length */
size_t pvlen = sizeof(il) + sizeof(dl) +
(il * sizeof(struct entryInfo_s)) + dl;
void * pv = uh;
if (hdrchkTags(il) || hdrchkData(dl))
goto errxit;
- ei = (int_32 *) pv;
+ ei = (int32_t *) pv;
pe = (entryInfo) &ei[2];
dataStart = (unsigned char *) (pe + il);
dataEnd = dataStart + dl;
entry++;
h->indexUsed++;
} else {
- int_32 rdl;
- int_32 ril;
+ int32_t rdl;
+ int32_t ril;
h->flags &= ~HEADERFLAG_LEGACY;
goto errxit;
if (off) {
size_t nb = REGION_TAG_COUNT;
- int_32 * stei = memcpy(alloca(nb), dataStart + off, nb);
+ int32_t * stei = memcpy(alloca(nb), dataStart + off, nb);
rdl = -ntohl(stei[2]); /* negative offset */
ril = rdl/sizeof(*pe);
if (hdrchkTags(ril) || hdrchkData(rdl))
static
Header _headerCopyLoad(const void * uh)
{
- int_32 * ei = (int_32 *) uh;
- int_32 il = ntohl(ei[0]); /* index length */
- int_32 dl = ntohl(ei[1]); /* data length */
+ int32_t * ei = (int32_t *) uh;
+ int32_t il = ntohl(ei[0]); /* index length */
+ int32_t dl = ntohl(ei[1]); /* data length */
size_t pvlen = sizeof(il) + sizeof(dl) +
(il * sizeof(struct entryInfo_s)) + dl;
void * nuh = NULL;
static
Header _headerRead(FD_t fd, enum hMagic magicp)
{
- int_32 block[4];
- int_32 reserved;
- int_32 * ei = NULL;
- int_32 il;
- int_32 dl;
- int_32 magic;
+ int32_t block[4];
+ int32_t reserved;
+ int32_t * ei = NULL;
+ int32_t il;
+ int32_t dl;
+ int32_t magic;
Header h = NULL;
size_t len;
int i;
* @return 1 on success, 0 on failure
*/
static
-int _headerIsEntry(Header h, int_32 tag)
+int _headerIsEntry(Header h, int32_t tag)
{
/* FIX: h modified by sort. */
return (findEntry(h, tag, RPM_NULL_TYPE) ? 1 : 0);
hCNT_t c,
int minMem)
{
- int_32 count = entry->info.count;
+ int32_t count = entry->info.count;
int rc = 1; /* XXX 1 on success. */
if (p)
* XXX a legacy header freshly read, but not yet unloaded to the rpmdb).
*/
if (ENTRY_IS_REGION(entry)) {
- int_32 * ei = ((int_32 *)entry->data) - 2;
+ int32_t * ei = ((int32_t *)entry->data) - 2;
entryInfo pe = (entryInfo) (ei + 2);
unsigned char * dataStart = (unsigned char *) (pe + ntohl(ei[0]));
- int_32 rdl = -entry->info.offset; /* negative offset */
- int_32 ril = rdl/sizeof(*pe);
+ int32_t rdl = -entry->info.offset; /* negative offset */
+ int32_t ril = rdl/sizeof(*pe);
rdl = entry->rdlen;
count = 2 * sizeof(*ei) + (ril * sizeof(*pe)) + rdl;
}
*p = xmalloc(count);
- ei = (int_32 *) *p;
+ ei = (int32_t *) *p;
ei[0] = htonl(ril);
ei[1] = htonl(rdl);
* @param minMem string pointers reference header memory?
* @return 1 on success, 0 on not found
*/
-static int intGetEntry(Header h, int_32 tag,
+static int intGetEntry(Header h, int32_t tag,
hTAG_t type,
hPTR_t * p,
hCNT_t c,
* @return 1 on success, 0 on failure
*/
static
-int _headerGetEntry(Header h, int_32 tag,
+int _headerGetEntry(Header h, int32_t tag,
hTYP_t type,
void ** p,
hCNT_t c)
* @return 1 on success, 0 on failure
*/
static
-int _headerGetEntryMinMemory(Header h, int_32 tag,
+int _headerGetEntryMinMemory(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
hCNT_t c)
return intGetEntry(h, tag, type, p, c, 1);
}
-int headerGetRawEntry(Header h, int_32 tag, int_32 * type, hPTR_t * p,
- int_32 * c)
+int headerGetRawEntry(Header h, int32_t tag, int32_t * type, hPTR_t * p,
+ int32_t * c)
{
indexEntry entry;
int rc;
/**
*/
-static void copyData(int_32 type, void * dstPtr, const void * srcPtr,
- int_32 cnt, int dataLength)
+static void copyData(int32_t type, void * dstPtr, const void * srcPtr,
+ int32_t cnt, int dataLength)
{
switch (type) {
case RPM_STRING_ARRAY_TYPE:
* @return (malloc'ed) copy of entry data, NULL on error
*/
static void *
-grabData(int_32 type, hPTR_t p, int_32 c, int * lengthPtr)
+grabData(int32_t type, hPTR_t p, int32_t c, int * lengthPtr)
{
void * data = NULL;
int length;
* @return 1 on success, 0 on failure
*/
static
-int _headerAddEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int _headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, int32_t c)
{
indexEntry entry;
void * data;
* @return 1 on success, 0 on failure
*/
static
-int _headerAppendEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c)
+int _headerAppendEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c)
{
indexEntry entry;
int length;
* @return 1 on success, 0 on failure
*/
static
-int _headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c)
+int _headerAddOrAppendEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c)
{
return (findEntry(h, tag, type)
? _headerAppendEntry(h, tag, type, p, c)
* @return 1 on success, 0 on failure
*/
static
-int _headerAddI18NString(Header h, int_32 tag, const char * string,
+int _headerAddI18NString(Header h, int32_t tag, const char * string,
const char * lang)
{
indexEntry table, entry;
* @return 1 on success, 0 on failure
*/
static
-int _headerModifyEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c)
+int _headerModifyEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c)
{
indexEntry entry;
void * oldData;
{
Header nh = _headerNew();
HeaderIterator hi;
- int_32 tag, type, count;
+ int32_t tag, type, count;
hPTR_t ptr;
for (hi = _headerInitIterator(h);
if (hsa->hi == NULL) {
hsa->i++;
} else {
- int_32 tagno;
- int_32 type;
- int_32 count;
+ int32_t tagno;
+ int32_t type;
+ int32_t count;
if (!_headerNextIterator(hsa->hi, &tagno, &type, NULL, &count))
fmt = NULL;
size_t need = 0;
char * t, * te;
char buf[20];
- int_32 count, type;
+ int32_t count, type;
hPTR_t data;
unsigned int intVal;
const char ** strarray;
switch (type) {
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- intVal = *(((int_8 *) data) + element);
+ intVal = *(((int8_t *) data) + element);
break;
case RPM_INT16_TYPE:
- intVal = *(((uint_16 *) data) + element);
+ intVal = *(((uint16_t *) data) + element);
break;
default: /* keep -Wall quiet */
case RPM_INT32_TYPE:
- intVal = *(((int_32 *) data) + element);
+ intVal = *(((int32_t *) data) + element);
break;
}
char * t, * te;
int i, j;
int numElements;
- int_32 type;
- int_32 count;
+ int32_t type;
+ int32_t count;
sprintfToken spft;
int condNumFormats;
size_t need;
* @param element (unused)
* @return formatted string
*/
-static char * octalFormat(int_32 type, hPTR_t data,
+static char * octalFormat(int32_t type, hPTR_t data,
char * formatPrefix, int padding,int element)
{
char * val;
} else {
val = xmalloc(20 + padding);
strcat(formatPrefix, "o");
- sprintf(val, formatPrefix, *((int_32 *) data));
+ sprintf(val, formatPrefix, *((int32_t *) data));
}
return val;
* @param element (unused)
* @return formatted string
*/
-static char * hexFormat(int_32 type, hPTR_t data,
+static char * hexFormat(int32_t type, hPTR_t data,
char * formatPrefix, int padding,int element)
{
char * val;
} else {
val = xmalloc(20 + padding);
strcat(formatPrefix, "x");
- sprintf(val, formatPrefix, *((int_32 *) data));
+ sprintf(val, formatPrefix, *((int32_t *) data));
}
return val;
/**
*/
-static char * realDateFormat(int_32 type, hPTR_t data,
+static char * realDateFormat(int32_t type, hPTR_t data,
char * formatPrefix, int padding,int element,
const char * strftimeFormat)
{
val = xmalloc(50 + padding);
strcat(formatPrefix, "s");
- /* this is important if sizeof(int_32) ! sizeof(time_t) */
- { time_t dateint = *((int_32 *) data);
+ /* this is important if sizeof(int32_t) ! sizeof(time_t) */
+ { time_t dateint = *((int32_t *) data);
tstruct = localtime(&dateint);
}
buf[0] = '\0';
* @param element (unused)
* @return formatted string
*/
-static char * dateFormat(int_32 type, hPTR_t data,
+static char * dateFormat(int32_t type, hPTR_t data,
char * formatPrefix, int padding, int element)
{
return realDateFormat(type, data, formatPrefix, padding, element,
* @param element (unused)
* @return formatted string
*/
-static char * dayFormat(int_32 type, hPTR_t data,
+static char * dayFormat(int32_t type, hPTR_t data,
char * formatPrefix, int padding, int element)
{
return realDateFormat(type, data, formatPrefix, padding, element,
* @param element (unused)
* @return formatted string
*/
-static char * shescapeFormat(int_32 type, hPTR_t data,
+static char * shescapeFormat(int32_t type, hPTR_t data,
char * formatPrefix, int padding,int element)
{
char * result, * dst, * src, * buf;
if (type == RPM_INT32_TYPE) {
result = xmalloc(padding + 20);
strcat(formatPrefix, "d");
- sprintf(result, formatPrefix, *((int_32 *) data));
+ sprintf(result, formatPrefix, *((int32_t *) data));
} else {
buf = alloca(strlen(data) + padding + 2);
strcat(formatPrefix, "s");
for (p = tagstocopy; *p != 0; p++) {
char *s;
- int_32 type;
- int_32 count;
+ int32_t type;
+ int32_t count;
if (_headerIsEntry(headerTo, *p))
continue;
if (!_headerGetEntryMinMemory(headerFrom, *p, &type,
/** \ingroup header
*/
-typedef int_32 * hTAG_t;
-typedef int_32 * hTYP_t;
+typedef int32_t * hTAG_t;
+typedef int32_t * hTYP_t;
typedef const void * hPTR_t;
-typedef int_32 * hCNT_t;
+typedef int32_t * hCNT_t;
/** \ingroup header
*/
* @param element RPM_BIN_TYPE: no. bytes of data
* @return formatted string
*/
-typedef char * (*headerTagFormatFunction)(int_32 type,
+typedef char * (*headerTagFormatFunction)(int32_t type,
const void * data, char * formatPrefix,
int padding, int element);
const void * ptr;
const char ** argv;
const char * str;
- uint_32 * ui32p;
- uint_16 * ui16p;
- int_32 * i32p;
- int_16 * i16p;
- int_8 * i8p;
+ uint32_t * ui32p;
+ uint16_t * ui16p;
+ int32_t * i32p;
+ int16_t * i16p;
+ int8_t * i8p;
} * hRET_t;
/**
*/
typedef struct HE_s {
- int_32 tag;
+ int32_t tag;
hTYP_t typ;
union {
hPTR_t * ptr;
* @param tag tag
* @return 1 on success, 0 on failure
*/
-int headerIsEntry(Header h, int_32 tag);
+int headerIsEntry(Header h, int32_t tag);
/** \ingroup header
* Free data allocated when retrieved from header.
* @retval *c number of values (or NULL)
* @return 1 on success, 0 on failure
*/
-int headerGetEntry(Header h, int_32 tag,
+int headerGetEntry(Header h, int32_t tag,
hTYP_t type,
void ** p,
hCNT_t c);
* @retval *c number of values (or NULL)
* @return 1 on success, 0 on failure
*/
-int headerGetEntryMinMemory(Header h, int_32 tag,
+int headerGetEntryMinMemory(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
hCNT_t c);
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerAddEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c);
+int headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, int32_t c);
/** \ingroup header
* Append element to tag array in header.
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerAppendEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c);
+int headerAppendEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c);
/** \ingroup header
* Add or append element to tag array in header.
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c);
+int headerAddOrAppendEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c);
/** \ingroup header
* Add locale specific tag to header.
* @param lang locale
* @return 1 on success, 0 on failure
*/
-int headerAddI18NString(Header h, int_32 tag, const char * string,
+int headerAddI18NString(Header h, int32_t tag, const char * string,
const char * lang);
/** \ingroup header
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerModifyEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c);
+int headerModifyEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c);
/** \ingroup header
* Delete tag in header.
* @param tag tag
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
-int headerRemoveEntry(Header h, int_32 tag);
+int headerRemoveEntry(Header h, int32_t tag);
/** \ingroup header
* Return formatted output string from header tags.
* @param tag tag
* @return 1 on success, 0 on failure
*/
-int headerIsEntry(Header h, int_32 tag)
+int headerIsEntry(Header h, int32_t tag)
{
if (h == NULL) return 0;
return (h2hv(h)->hdrisentry) (h, tag);
* @retval *c number of values (or NULL)
* @return 1 on success, 0 on failure
*/
-int headerGetEntry(Header h, int_32 tag,
+int headerGetEntry(Header h, int32_t tag,
hTYP_t type,
void ** p,
hCNT_t c)
* @retval *c number of values (or NULL)
* @return 1 on success, 0 on failure
*/
-int headerGetEntryMinMemory(Header h, int_32 tag,
+int headerGetEntryMinMemory(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
hCNT_t c)
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerAddEntry(Header h, int_32 tag, int_32 type, const void * p, int_32 c)
+int headerAddEntry(Header h, int32_t tag, int32_t type, const void * p, int32_t c)
{
return (h2hv(h)->hdradd) (h, tag, type, p, c);
}
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerAppendEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c)
+int headerAppendEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c)
{
return (h2hv(h)->hdrappend) (h, tag, type, p, c);
}
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerAddOrAppendEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c)
+int headerAddOrAppendEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c)
{
return (h2hv(h)->hdraddorappend) (h, tag, type, p, c);
}
* @param lang locale
* @return 1 on success, 0 on failure
*/
-int headerAddI18NString(Header h, int_32 tag, const char * string,
+int headerAddI18NString(Header h, int32_t tag, const char * string,
const char * lang)
{
return (h2hv(h)->hdraddi18n) (h, tag, string, lang);
* @param c number of values
* @return 1 on success, 0 on failure
*/
-int headerModifyEntry(Header h, int_32 tag, int_32 type,
- const void * p, int_32 c)
+int headerModifyEntry(Header h, int32_t tag, int32_t type,
+ const void * p, int32_t c)
{
return (h2hv(h)->hdrmodify) (h, tag, type, p, c);
}
* @param tag tag
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
-int headerRemoveEntry(Header h, int_32 tag)
+int headerRemoveEntry(Header h, int32_t tag)
{
return (h2hv(h)->hdrremove) (h, tag);
}
case RPM_INT32_TYPE:
while (c--) {
fprintf(f, " Data: %.3d 0x%08x (%d)\n", ct++,
- (unsigned) *((int_32 *) dp),
- (int) *((int_32 *) dp));
- dp += sizeof(int_32);
+ (unsigned) *((int32_t *) dp),
+ (int) *((int32_t *) dp));
+ dp += sizeof(int32_t);
}
break;
case RPM_INT16_TYPE:
while (c--) {
fprintf(f, " Data: %.3d 0x%04x (%d)\n", ct++,
- (unsigned) (*((int_16 *) dp) & 0xffff),
- (int) *((int_16 *) dp));
- dp += sizeof(int_16);
+ (unsigned) (*((int16_t *) dp) & 0xffff),
+ (int) *((int16_t *) dp));
+ dp += sizeof(int16_t);
}
break;
case RPM_INT8_TYPE:
while (c--) {
fprintf(f, " Data: %.3d 0x%02x (%d)\n", ct++,
- (unsigned) (*((int_8 *) dp) & 0xff),
- (int) *((int_8 *) dp));
- dp += sizeof(int_8);
+ (unsigned) (*((int8_t *) dp) & 0xff),
+ (int) *((int8_t *) dp));
+ dp += sizeof(int8_t);
}
break;
case RPM_BIN_TYPE:
while (c > 0) {
fprintf(f, " Data: %.3d ", ct);
while (c--) {
- fprintf(f, "%02x ", (unsigned) (*(int_8 *)dp & 0xff));
+ fprintf(f, "%02x ", (unsigned) (*(int8_t *)dp & 0xff));
ct++;
- dp += sizeof(int_8);
+ dp += sizeof(int8_t);
if (! (ct % 8)) {
break;
}
*/
typedef struct entryInfo_s * entryInfo;
struct entryInfo_s {
- int_32 tag; /*!< Tag identifier. */
- int_32 type; /*!< Tag data type. */
- int_32 offset; /*!< Offset into data segment (ondisk only). */
- int_32 count; /*!< Number of tag elements. */
+ int32_t tag; /*!< Tag identifier. */
+ int32_t type; /*!< Tag data type. */
+ int32_t offset; /*!< Offset into data segment (ondisk only). */
+ int32_t count; /*!< Number of tag elements. */
};
#define REGION_TAG_TYPE RPM_BIN_TYPE
headerTagFormatFunction fmt;
headerTagTagFunction ext; /*!< NULL if tag element is invalid */
int extNum;
- int_32 tag;
+ int32_t tag;
int justOne;
int arrayCount;
char * format;
*/
typedef struct rpmec_s * rpmec;
struct rpmec_s {
- int_32 type;
- int_32 count;
+ int32_t type;
+ int32_t count;
int avail;
int freeit;
const void * data;
* @retval c address of number of values (or NULL)
* @return 1 on success, 0 on failure
*/
-int headerGetRawEntry(Header h, int_32 tag,
+int headerGetRawEntry(Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
hCNT_t c);
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRisentry) (Header h, int_32 tag);
+int (*HDRisentry) (Header h, int32_t tag);
/** \ingroup header
* Free data allocated when retrieved from header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRget) (Header h, int_32 tag,
+int (*HDRget) (Header h, int32_t tag,
hTYP_t type,
void ** p,
hCNT_t c);
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRgetmin) (Header h, int_32 tag,
+int (*HDRgetmin) (Header h, int32_t tag,
hTYP_t type,
hPTR_t * p,
hCNT_t c);
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRadd) (Header h, int_32 tag, int_32 type, const void * p, int_32 c);
+int (*HDRadd) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
/** \ingroup header
* Append element to tag array in header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRappend) (Header h, int_32 tag, int_32 type, const void * p, int_32 c);
+int (*HDRappend) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
/** \ingroup header
* Add or append element to tag array in header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRaddorappend) (Header h, int_32 tag, int_32 type, const void * p, int_32 c);
+int (*HDRaddorappend) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
/** \ingroup header
* Add locale specific tag to header.
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRaddi18n) (Header h, int_32 tag, const char * string,
+int (*HDRaddi18n) (Header h, int32_t tag, const char * string,
const char * lang);
/** \ingroup header
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRmodify) (Header h, int_32 tag, int_32 type, const void * p, int_32 c);
+int (*HDRmodify) (Header h, int32_t tag, int32_t type, const void * p, int32_t c);
/** \ingroup header
* Delete tag in header.
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
typedef
-int (*HDRremove) (Header h, int_32 tag);
+int (*HDRremove) (Header h, int32_t tag);
/** \ingroup header
* Return formatted output string from header tags.
char ** fileNames;
const char ** dirNames;
const char ** baseNames;
- uint_32 * dirIndexes;
+ uint32_t * dirIndexes;
rpmTagType fnt;
int count;
int i, xx;
HFD_t hfd = headerFreeData;
const char ** baseNames;
const char ** dirNames;
- uint_32 * dirIndexes;
+ uint32_t * dirIndexes;
int count;
const char ** fileNames;
int size;
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
HFD_t hfd = headerFreeData;
const char *name, *version, *release;
- int_32 * epoch;
+ int32_t * epoch;
const char *pEVR;
char *p;
- int_32 pFlags = RPMSENSE_EQUAL;
+ int32_t pFlags = RPMSENSE_EQUAL;
const char ** provides = NULL;
const char ** providesEVR = NULL;
rpmTagType pnt, pvt;
- int_32 * provideFlags = NULL;
+ int32_t * provideFlags = NULL;
int providesCount;
int i, xx;
int bingo = 1;
if (!hge(h, RPMTAG_PROVIDEVERSION, &pvt, (void **) &providesEVR, NULL)) {
for (i = 0; i < providesCount; i++) {
char * vdummy = "";
- int_32 fdummy = RPMSENSE_ANY;
+ int32_t fdummy = RPMSENSE_ANY;
xx = headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE,
&vdummy, 1);
xx = headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE,
/* XXX binary rpms always have RPMTAG_SOURCERPM, source rpms do not */
if (lead->type == RPMLEAD_SOURCE) {
- int_32 one = 1;
+ int32_t one = 1;
if (!headerIsEntry(h, RPMTAG_SOURCEPACKAGE))
(void) headerAddEntry(h, RPMTAG_SOURCEPACKAGE, RPM_INT32_TYPE,
&one, 1);
switch (dbi->dbi_jlen) {
default:
- case 2*sizeof(int_32):
+ case 2*sizeof(int32_t):
for (i = 0; i < set->count; i++) {
union _dbswap hdrNum, tagNum;
set->recs[i].fpNum = 0;
}
break;
- case 1*sizeof(int_32):
+ case 1*sizeof(int32_t):
for (i = 0; i < set->count; i++) {
union _dbswap hdrNum;
switch (dbi->dbi_jlen) {
default:
- case 2*sizeof(int_32):
+ case 2*sizeof(int32_t):
for (i = 0; i < set->count; i++) {
union _dbswap hdrNum, tagNum;
tdbir += sizeof(tagNum.ui);
}
break;
- case 1*sizeof(int_32):
+ case 1*sizeof(int32_t):
for (i = 0; i < set->count; i++) {
union _dbswap hdrNum;
if (allMatches != NULL)
while (i < allMatches->count) {
const char ** baseNames, ** dirNames;
- uint_32 * dirIndexes;
+ uint32_t * dirIndexes;
unsigned int offset = dbiIndexRecordOffset(allMatches, i);
unsigned int prevoff;
Header h;
void * ptr;
const char ** argv;
const char * str;
- int_32 * i32p;
- int_16 * i16p;
- int_8 * i8p;
+ int32_t * i32p;
+ int16_t * i16p;
+ int8_t * i8p;
} u;
char numbuf[32];
rpmTagType t;
- int_32 c;
+ int32_t c;
miRE mire;
- static int_32 zero = 0;
+ static int32_t zero = 0;
int ntags = 0;
int nmatches = 0;
int i, j;
#ifdef DYING
/* Add remove transaction id to header. */
if (rid != 0 && rid != -1) {
- int_32 tid = rid;
+ int32_t tid = rid;
(void) headerAddEntry(h, RPMTAG_REMOVETID, RPM_INT32_TYPE, &tid, 1);
}
#endif
key->data = rpmvals + i;
break;
case RPM_INT16_TYPE:
- key->size = sizeof(int_16);
+ key->size = sizeof(int16_t);
key->data = rpmvals + i;
break;
case RPM_INT32_TYPE:
- key->size = sizeof(int_32);
+ key->size = sizeof(int32_t);
key->data = rpmvals + i;
break;
case RPM_BIN_TYPE:
xx = headerRemoveEntry(h, RPMTAG_REMOVETID);
#endif
if (iid != 0 && iid != -1) {
- int_32 tid = iid;
+ int32_t tid = iid;
if (!headerIsEntry(h, RPMTAG_INSTALLTID))
xx = headerAddEntry(h, RPMTAG_INSTALLTID, RPM_INT32_TYPE, &tid, 1);
}
rpmTagType rpmtype = 0;
int rpmcnt = 0;
int rpmtag;
- int_32 * requireFlags;
+ int32_t * requireFlags;
rpmRC rpmrc;
int i, j;
switch (rpmtype) {
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- key->size = sizeof(int_8);
+ key->size = sizeof(int8_t);
key->data = rpmvals + i;
break;
case RPM_INT16_TYPE:
- key->size = sizeof(int_16);
+ key->size = sizeof(int16_t);
key->data = rpmvals + i;
break;
case RPM_INT32_TYPE:
- key->size = sizeof(int_32);
+ key->size = sizeof(int32_t);
key->data = rpmvals + i;
break;
case RPM_BIN_TYPE:
const char ** baseNames;
const char ** fullBaseNames;
rpmTagType bnt, dnt;
- uint_32 * dirIndexes;
- uint_32 * fullDirIndexes;
+ uint32_t * dirIndexes;
+ uint32_t * fullDirIndexes;
fingerPrint * fps;
dbiIndexItem im;
int start;
switch (dbi->dbi_rpmtag) {
case RPMDBI_PACKAGES:
{ unsigned int hnum;
-assert(key->size == sizeof(int_32));
+assert(key->size == sizeof(int32_t));
memcpy(&hnum, key->data, sizeof(hnum));
if (dbiByteSwapped(dbi) == 1)
} break;
case RPM_INT16_TYPE:
{ unsigned short i;
-assert(key->size == sizeof(int_16));
+assert(key->size == sizeof(int16_t));
assert(dbiByteSwapped(dbi) == 0); /* Byte swap?! */
memcpy(&i, key->data, sizeof(i));
rc = sqlite3_bind_int(scp->pStmt, pos, i);
/* case RPM_INT64_TYPE: */
default:
{ unsigned int i;
-assert(key->size == sizeof(int_32));
+assert(key->size == sizeof(int32_t));
memcpy(&i, key->data, sizeof(i));
if (dbiByteSwapped(dbi) == 1)
int list_file_fd = -1;
int do_build_id = 0;
-typedef unsigned int uint_32;
-typedef unsigned short uint_16;
+typedef unsigned int uint32_t;
+typedef unsigned short uint16_t;
typedef struct
{
typedef struct
{
unsigned char *ptr;
- uint_32 addend;
+ uint32_t addend;
} REL;
#define read_uleb128(ptr) ({ \
ret; \
})
-static uint_16 (*do_read_16) (unsigned char *ptr);
-static uint_32 (*do_read_32) (unsigned char *ptr);
+static uint16_t (*do_read_16) (unsigned char *ptr);
+static uint32_t (*do_read_32) (unsigned char *ptr);
static void (*write_32) (unsigned char *ptr, GElf_Addr val);
static int ptr_size;
-static inline uint_16
+static inline uint16_t
buf_read_ule16 (unsigned char *data)
{
return data[0] | (data[1] << 8);
}
-static inline uint_16
+static inline uint16_t
buf_read_ube16 (unsigned char *data)
{
return data[1] | (data[0] << 8);
}
-static inline uint_32
+static inline uint32_t
buf_read_ule32 (unsigned char *data)
{
return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
}
-static inline uint_32
+static inline uint32_t
buf_read_ube32 (unsigned char *data)
{
return data[3] | (data[2] << 8) | (data[1] << 16) | (data[0] << 24);
#define read_1(ptr) *ptr++
#define read_16(ptr) ({ \
- uint_16 ret = do_read_16 (ptr); \
+ uint16_t ret = do_read_16 (ptr); \
ptr += 2; \
ret; \
})
#define read_32(ptr) ({ \
- uint_32 ret = do_read_32 (ptr); \
+ uint32_t ret = do_read_32 (ptr); \
ptr += 4; \
ret; \
})
int reltype;
#define do_read_32_relocated(ptr) ({ \
- uint_32 dret = do_read_32 (ptr); \
+ uint32_t dret = do_read_32 (ptr); \
if (relptr) \
{ \
while (relptr < relend && relptr->ptr < ptr) \
})
#define read_32_relocated(ptr) ({ \
- uint_32 ret = do_read_32_relocated (ptr); \
+ uint32_t ret = do_read_32_relocated (ptr); \
ptr += 4; \
ret; \
})
static void
dwarf2_write_le32 (unsigned char *p, GElf_Addr val)
{
- uint_32 v = (uint_32) val;
+ uint32_t v = (uint32_t) val;
p[0] = v;
p[1] = v >> 8;
static void
dwarf2_write_be32 (unsigned char *p, GElf_Addr val)
{
- uint_32 v = (uint_32) val;
+ uint32_t v = (uint32_t) val;
p[3] = v;
p[2] = v >> 8;
}
static int
-edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase)
+edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase)
{
unsigned char *ptr = debug_sections[DEBUG_LINE].data, *dir;
unsigned char **dirt;
unsigned char *endsec = ptr + debug_sections[DEBUG_LINE].size;
unsigned char *endcu, *endprol;
unsigned char opcode_base;
- uint_32 value, dirt_cnt;
+ uint32_t value, dirt_cnt;
size_t comp_dir_len = strlen (comp_dir);
size_t abs_file_cnt = 0, abs_dir_cnt = 0;
edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
{
int i;
- uint_32 list_offs;
+ uint32_t list_offs;
int found_list_offs;
char *comp_dir;
found_list_offs = 0;
for (i = 0; i < t->nattr; ++i)
{
- uint_32 form = t->attr[i].form;
- uint_32 len = 0;
+ uint32_t form = t->attr[i].form;
+ uint32_t len = 0;
int base_len, dest_len;
if (debug_sections[DEBUG_INFO].data != NULL)
{
unsigned char *ptr, *endcu, *endsec;
- uint_32 value;
+ uint32_t value;
htab_t abbrev;
struct abbrev_tag tag, *t;
int phase;
typedef struct Item_s {
const char * path;
- int_32 size;
- int_32 mtime;
+ int32_t size;
+ int32_t mtime;
rpmds this;
Header h;
} * Item;
static int ftsCacheUpdate(rpmts ts)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
- int_32 tid = rpmtsGetTid(ts);
+ int32_t tid = rpmtsGetTid(ts);
rpmdbMatchIterator mi;
unsigned char * md5;
int rc = 0;
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);
}
static rpmVSFlags vsflags = 0;
-static inline const char * identifyDepend(int_32 f)
+static inline const char * identifyDepend(int32_t f)
{
if (isLegacyPreReq(f))
return "PreReq:";
typedef struct cmd_s {
injmode_t injmode;
char * tag;
- int_32 tagval;
+ int32_t tagval;
int done;
int oldcnt;
int nvals;
enum cvtaction {CA_OLD, CA_NEW, CA_OMIT, CA_ERR};
-static enum cvtaction convertAMD(enum cvtaction ca, int_32 type,
- void ** nvalsp, int_32 *ncountp, cmd_t *newc)
+static enum cvtaction convertAMD(enum cvtaction ca, int32_t type,
+ void ** nvalsp, int32_t *ncountp, cmd_t *newc)
{
int i;
case CA_NEW:
switch (type) {
case RPM_INT32_TYPE:
- { int_32 *intp = xmalloc(newc->nvals * sizeof(*intp));
+ { int32_t *intp = xmalloc(newc->nvals * sizeof(*intp));
for (i = 0; i < newc->nvals; i++) {
long ival;
char *end;
return ca;
}
-static enum cvtaction convertExistingAMD(int_32 tag, int_32 type,
- hPTR_t valsp, int_32 *countp, void ** nvalsp, int_32 *ncountp,
+static enum cvtaction convertExistingAMD(int32_t tag, int32_t type,
+ hPTR_t valsp, int32_t *countp, void ** nvalsp, int32_t *ncountp,
cmd_t *cmds[], int ncmds)
{
cmd_t *newc = NULL;
static
Header headerCopyWithConvert(Header h, cmd_t *cmds[], int ncmds)
{
- int_32 tag, type, count;
+ int32_t tag, type, count;
hPTR_t vals;
HeaderIterator headerIter;
Header res = headerNew();
while (headerNextIterator(headerIter, &tag, &type, &vals, &count)) {
enum cvtaction ca;
void *nvals;
- int_32 ncount;
+ int32_t ncount;
nvals = NULL;
ncount = 0;
rc = headerIsEntry(h, c->tagval);
if (!rc && !c->done && c->injmode != INJ_DELETE) {
- int_32 type, ncount;
+ int32_t type, ncount;
void *nvals;
enum cvtaction ca;
#endif
static int noDeps = 0;
-static inline const char * identifyDepend(int_32 f)
+static inline const char * identifyDepend(int32_t f)
{
if (isLegacyPreReq(f))
return "PreReq:";