RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 04-Nov-2007 00:44:04
Branch: HEAD Handle: 2007110323435905
Modified files:
rpm CHANGES
rpm/build files.c misc.c pack.c parsePreamble.c parsePrep.c
reqprov.c rpmbuild.h spec.c
rpm/lib depends.c fs.c fs.h fsm.c psm.c rpmal.h
rpmchecksig.c rpmcli.h rpmds.c rpmds.h rpmfc.c
rpmfi.c rpmfi.h rpminstall.c rpmps.c rpmrollback.c
rpmte.c rpmte.h rpmts.c rpmts.h transaction.c
rpm/python header-py.c rpmts-py.c
rpm/rpmdb hdrNVR.c hdrfmt.c hdrinline.h header.c header.h
header_internal.h rpmdb.c
rpm/rpmio argv.h rpmsw.c
Log:
- jbj: access all tag data integers as "unsigned", using <stdint.h>
types.
Summary:
Revision Changes Path
1.1766 +1 -0 rpm/CHANGES
1.280 +7 -7 rpm/build/files.c
2.23 +1 -1 rpm/build/misc.c
2.242 +6 -6 rpm/build/pack.c
2.141 +23 -12 rpm/build/parsePreamble.c
2.91 +3 -3 rpm/build/parsePrep.c
1.77 +4 -4 rpm/build/reqprov.c
2.72 +1 -1 rpm/build/rpmbuild.h
2.159 +2 -2 rpm/build/spec.c
1.357 +1 -1 rpm/lib/depends.c
2.59 +1 -1 rpm/lib/fs.c
1.4 +3 -3 rpm/lib/fs.h
2.133 +1 -1 rpm/lib/fsm.c
2.254 +21 -21 rpm/lib/psm.c
2.35 +2 -2 rpm/lib/rpmal.h
1.164 +10 -10 rpm/lib/rpmchecksig.c
2.72 +6 -6 rpm/lib/rpmcli.h
2.77 +15 -15 rpm/lib/rpmds.c
2.60 +14 -14 rpm/lib/rpmds.h
1.31 +8 -8 rpm/lib/rpmfc.c
2.95 +50 -50 rpm/lib/rpmfi.c
2.45 +44 -44 rpm/lib/rpmfi.h
1.179 +5 -5 rpm/lib/rpminstall.c
2.15 +1 -1 rpm/lib/rpmps.c
1.24 +10 -10 rpm/lib/rpmrollback.c
2.64 +9 -9 rpm/lib/rpmte.c
2.39 +5 -5 rpm/lib/rpmte.h
2.116 +14 -14 rpm/lib/rpmts.c
2.83 +13 -13 rpm/lib/rpmts.h
1.348 +3 -3 rpm/lib/transaction.c
1.70 +11 -11 rpm/python/header-py.c
1.77 +1 -1 rpm/python/rpmts-py.c
1.23 +27 -7 rpm/rpmdb/hdrNVR.c
1.27 +27 -27 rpm/rpmdb/hdrfmt.c
1.25 +9 -9 rpm/rpmdb/hdrinline.h
1.113 +34 -35 rpm/rpmdb/header.c
1.57 +21 -25 rpm/rpmdb/header.h
1.27 +1 -1 rpm/rpmdb/header_internal.h
1.198 +27 -27 rpm/rpmdb/rpmdb.c
1.5 +1 -1 rpm/rpmio/argv.h
2.13 +2 -2 rpm/rpmio/rpmsw.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1765 -r1.1766 CHANGES
--- rpm/CHANGES 3 Nov 2007 16:01:26 -0000 1.1765
+++ rpm/CHANGES 3 Nov 2007 23:43:59 -0000 1.1766
@@ -1,4 +1,5 @@
4.5 -> 5.0:
+ - jbj: access all tag data integers as "unsigned", using <stdint.h> types.
- rpm.org: fix segfault in %{lua: ...}'s rpm_print, no newline.
- jbj: add lua/python getMacros bindings (mostly from <pjones@redhat.com>).
- jbj: add a getter to retrieve macros with used and/or pattern filtering.
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/files.c
============================================================================
$ cvs diff -u -r1.279 -r1.280 files.c
--- rpm/build/files.c 22 Oct 2007 02:48:40 -0000 1.279
+++ rpm/build/files.c 3 Nov 2007 23:43:59 -0000 1.280
@@ -273,14 +273,14 @@
{
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
- int_32 currentTime = time(NULL);
- int_32 * mtime;
+ uint32_t currentTime = time(NULL);
+ uint32_t * mtime;
int xx;
int i;
he->tag = RPMTAG_FILEMTIMES;
xx = hge(h, he, 0);
- mtime = he->p.i32p;
+ mtime = he->p.ui32p;
he->tag = RPMTAG_OLDFILENAMES;
xx = hge(h, he, 0);
@@ -1174,7 +1174,7 @@
const char * fn;
const char ** dirNames;
const char ** baseNames;
- int_32 * dirIndexes;
+ uint32_t * dirIndexes;
int count;
int dirIndex = -1;
int xx;
@@ -1249,7 +1249,7 @@
if (count > 0) {
he->tag = RPMTAG_DIRINDEXES;
he->t = RPM_INT32_TYPE;
- he->p.i32p = dirIndexes;
+ he->p.ui32p = dirIndexes;
he->c = count;
xx = hae(h, he, 0);
he->tag = RPMTAG_BASENAMES;
@@ -2438,9 +2438,9 @@
int initSourceHeader(Spec spec, StringBuf *sfp)
{
HeaderIterator hi;
- int_32 tag;
+ rpmTag tag;
rpmTagType type;
- int_32 count;
+ rpmTagCount count;
const void * ptr;
StringBuf sourceFiles;
struct Source *srcPtr;
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/misc.c
============================================================================
$ cvs diff -u -r2.22 -r2.23 misc.c
--- rpm/build/misc.c 16 Jul 2007 01:32:26 -0000 2.22
+++ rpm/build/misc.c 3 Nov 2007 23:43:59 -0000 2.23
@@ -8,7 +8,7 @@
#include "debug.h"
/*@-boundswrite@*/
-int parseNum(const char * line, int * res)
+int parseNum(const char * line, uint32_t * res)
{
char * s1 = NULL;
unsigned long rc;
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/pack.c
============================================================================
$ cvs diff -u -r2.241 -r2.242 pack.c
--- rpm/build/pack.c 21 Oct 2007 23:22:54 -0000 2.241
+++ rpm/build/pack.c 3 Nov 2007 23:43:59 -0000 2.242
@@ -438,14 +438,14 @@
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
const char *N, *V, *R;
- int_32 E;
+ uint32_t E;
int gotE;
const char *pEVR;
char *p;
- int_32 pFlags = RPMSENSE_EQUAL;
+ uint32_t pFlags = RPMSENSE_EQUAL;
const char ** provides = NULL;
const char ** providesEVR = NULL;
- int_32 * provideFlags = NULL;
+ uint32_t * provideFlags = NULL;
int providesCount;
int i, xx;
int bingo = 1;
@@ -458,7 +458,7 @@
*p = '\0';
he->tag = RPMTAG_EPOCH;
gotE = hge(h, he, 0);
- E = (he->p.i32p ? he->p.i32p[0] : 0);
+ E = (he->p.ui32p ? he->p.ui32p[0] : 0);
he->p.ptr = _free(he->p.ptr);
if (gotE) {
sprintf(p, "%d:", E);
@@ -497,7 +497,7 @@
he->tag = RPMTAG_PROVIDEFLAGS;
xx = hge(h, he, 0);
- provideFlags = he->p.i32p;
+ provideFlags = he->p.ui32p;
/*@-nullderef@*/ /* LCL: providesEVR is not NULL */
if (provides && providesEVR && provideFlags)
@@ -844,7 +844,7 @@
/*@=boundswrite@*/
/*@unchecked@*/
-static int_32 copyTags[] = {
+static uint32_t copyTags[] = {
RPMTAG_CHANGELOGTIME,
RPMTAG_CHANGELOGNAME,
RPMTAG_CHANGELOGTEXT,
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/parsePreamble.c
============================================================================
$ cvs diff -u -r2.140 -r2.141 parsePreamble.c
--- rpm/build/parsePreamble.c 22 Oct 2007 02:48:40 -0000 2.140
+++ rpm/build/parsePreamble.c 3 Nov 2007 23:43:59 -0000 2.141
@@ -57,16 +57,24 @@
/**
*/
-static void addOrAppendListEntry(Header h, int_32 tag, char * line)
+static void addOrAppendListEntry(Header h, rpmTag tag, char * line)
/*@modifies h @*/
{
+ HAE_t hae = headerAddExtension;
+ HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
int xx;
int argc;
const char **argv;
xx = poptParseArgvString(line, &argc, &argv);
- if (argc)
- xx = headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, argv, argc);
+ if (argc) {
+ he->tag = tag;
+ he->t = RPM_STRING_ARRAY_TYPE;
+ he->p.argv = argv;
+ he->c = argc;
+ he->append = 1;
+ xx = hae(h, he, 0);
+ }
argv = _free(argv);
}
@@ -298,7 +306,7 @@
/*@modifies h @*/
{
int res = 0;
- int lastTag, tag;
+ rpmTag lastTag, tag;
HeaderIterator hi;
for (hi = headerInitIterator(h), lastTag = 0;
@@ -372,7 +380,7 @@
struct Source *sp;
size_t iconsize = 2048; /* XXX big enuf */
size_t nb;
- char *icon = alloca(iconsize+1);
+ uint8_t * icon = alloca(iconsize+1);
FD_t fd = NULL;
int rc = RPMRC_FAIL; /* assume error */
int urltype;
@@ -426,16 +434,19 @@
goto exit;
}
- if (!strncmp(icon, "GIF", sizeof("GIF")-1)) {
+ if (icon[0] == 'G' && icon[1] == 'I' && icon[2] == 'F') {
he->tag = RPMTAG_GIF;
he->t = RPM_BIN_TYPE;
- he->p.i8p = icon;
+ he->p.ui8p = icon;
he->c = nb;
xx = hae(h, he, 0);
- } else if (!strncmp(icon, "/* XPM", sizeof("/* XPM")-1)) {
+ } else
+ if (icon[0] == '/' && icon[1] == '*' && icon[2] == ' '
+ && icon[3] == 'X' && icon[4] == 'P' && icon[5] == 'M')
+ {
he->tag = RPMTAG_XPM;
he->t = RPM_BIN_TYPE;
- he->p.i8p = icon;
+ he->p.ui8p = icon;
he->c = nb;
xx = hae(h, he, 0);
} else {
@@ -521,7 +532,7 @@
int multiToken = 0;
rpmsenseFlags tagflags;
int len;
- int num;
+ uint32_t num;
int rc;
int xx;
@@ -668,7 +679,7 @@
}
he->tag = tag;
he->t = RPM_INT32_TYPE;
- he->p.i32p = #
+ he->p.ui32p = #
he->c = 1;
xx = hae(pkg->header, he, 0);
break;
@@ -1055,7 +1066,7 @@
if (pkg != spec->packages)
headerCopyTags(spec->packages->header, pkg->header,
- (int_32 *)copyTagsDuringParse);
+ (uint32_t *)copyTagsDuringParse);
if (checkForRequired(pkg->header, NVR))
return RPMRC_FAIL;
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/parsePrep.c
============================================================================
$ cvs diff -u -r2.90 -r2.91 parsePrep.c
--- rpm/build/parsePrep.c 11 Oct 2007 13:04:26 -0000 2.90
+++ rpm/build/parsePrep.c 3 Nov 2007 23:43:59 -0000 2.91
@@ -327,7 +327,7 @@
int arg;
const char * optArg;
int rc;
- int num;
+ uint32_t num;
/*@-mods@*/
leaveDirs = skipDefaultAction = 0;
@@ -484,9 +484,9 @@
char *s;
char *opt_b;
char *opt_d;
- int opt_P, opt_p, opt_R, opt_E, opt_F;
+ uint32_t opt_P, opt_p, opt_R, opt_E, opt_F;
char buf[BUFSIZ], *bp;
- int patch_nums[1024]; /* XXX - we can only handle 1024 patches! */
+ uint32_t patch_nums[1024]; /* XXX - we can only handle 1024 patches! */
int patch_index, x;
memset(patch_nums, 0, sizeof(patch_nums));
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/reqprov.c
============================================================================
$ cvs diff -u -r1.76 -r1.77 reqprov.c
--- rpm/build/reqprov.c 19 Oct 2007 00:36:43 -0000 1.76
+++ rpm/build/reqprov.c 3 Nov 2007 23:43:59 -0000 1.77
@@ -65,8 +65,8 @@
len = he->c;
if (xx) {
const char ** versions = NULL;
- int_32 *flags = NULL;
- int_32 *indexes = NULL;
+ uint32_t * flags = NULL;
+ uint32_t * indexes = NULL;
int duplicate = 0;
if (flagtag) {
@@ -75,12 +75,12 @@
versions = he->p.argv;
he->tag = flagtag;
xx = hge(h, he, 0);
- flags = he->p.i32p;
+ flags = he->p.ui32p;
}
if (indextag) {
he->tag = indextag;
xx = hge(h, he, 0);
- indexes = he->p.i32p;
+ indexes = he->p.ui32p;
}
/*@-boundsread@*/
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/rpmbuild.h
============================================================================
$ cvs diff -u -r2.71 -r2.72 rpmbuild.h
--- rpm/build/rpmbuild.h 10 Jul 2007 19:04:54 -0000 2.71
+++ rpm/build/rpmbuild.h 3 Nov 2007 23:43:59 -0000 2.72
@@ -207,7 +207,7 @@
* @retval res pointer to int
* @return 0 on success, 1 on failure
*/
-int parseNum(/*@null@*/ const char * line, /*@null@*/ /*@out@*/int * res)
+int parseNum(/*@null@*/ const char * line, /*@null@*/ /*@out@*/uint32_t * res)
/*@modifies *res @*/;
/** \ingroup rpmbuild
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/spec.c
============================================================================
$ cvs diff -u -r2.158 -r2.159 spec.c
--- rpm/build/spec.c 21 Oct 2007 23:22:54 -0000 2.158
+++ rpm/build/spec.c 3 Nov 2007 23:43:59 -0000 2.159
@@ -268,7 +268,7 @@
{
const char *f, *fe;
const char *name;
- int num, flag;
+ uint32_t num, flag;
if (tag == RPMTAG_NOSOURCE) {
flag = RPMFILE_SOURCE;
@@ -319,7 +319,7 @@
char *nump;
const char *fieldp = NULL;
char buf[BUFSIZ];
- int num = 0;
+ uint32_t num = 0;
buf[0] = '\0';
/*@-branchstate@*/
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/depends.c
============================================================================
$ cvs diff -u -r1.356 -r1.357 depends.c
--- rpm/lib/depends.c 25 Oct 2007 17:12:39 -0000 1.356
+++ rpm/lib/depends.c 3 Nov 2007 23:44:00 -0000 1.357
@@ -737,7 +737,7 @@
else {
char * end = NULL;
/*@-unrecog@*/
- long long needed = strtoll(rpmdsEVR(dep), &end, 0);
+ uint64_t needed = strtoll(rpmdsEVR(dep), &end, 0);
/*@=unrecog@*/
if (end && *end) {
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/fs.c
============================================================================
$ cvs diff -u -r2.58 -r2.59 fs.c
--- rpm/lib/fs.c 11 Oct 2007 19:44:22 -0000 2.58
+++ rpm/lib/fs.c 3 Nov 2007 23:44:00 -0000 2.59
@@ -268,7 +268,7 @@
}
#endif /* HAVE_MNTCTL */
-int rpmGetFilesystemList(const char *** listptr, int * num)
+int rpmGetFilesystemList(const char *** listptr, uint32_t * num)
{
if (!fsnames)
if (getFilesystemList())
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/fs.h
============================================================================
$ cvs diff -u -r1.3 -r1.4 fs.h
--- rpm/lib/fs.h 18 Jun 2007 17:31:23 -0000 1.3
+++ rpm/lib/fs.h 3 Nov 2007 23:44:00 -0000 1.4
@@ -25,7 +25,7 @@
*/
/*@-incondefs@*/
int rpmGetFilesystemList( /*@null@*/ /*@out@*/ const char *** listptr,
- /*@null@*/ /*@out@*/ int * num)
+ /*@null@*/ /*@out@*/ uint32_t * num)
/*@globals fileSystem, internalState @*/
/*@modifies *listptr, *num, fileSystem, internalState @*/
/*@requires maxSet(listptr) >= 0 /\ maxSet(num) >= 0 @*/
@@ -42,8 +42,8 @@
* @return 0 on success, 1 on error
*/
/*@-incondefs@*/
-int rpmGetFilesystemUsage(const char ** fileList, uint_32 * fssizes,
- int numFiles, /*@null@*/ /*@out@*/ uint_64 ** usagesPtr,
+int rpmGetFilesystemUsage(const char ** fileList, uint32_t * fssizes,
+ int numFiles, /*@null@*/ /*@out@*/ uint64_t ** usagesPtr,
int flags)
/*@globals rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/fsm.c
============================================================================
$ cvs diff -u -r2.132 -r2.133 fsm.c
--- rpm/lib/fsm.c 11 Oct 2007 19:44:22 -0000 2.132
+++ rpm/lib/fsm.c 3 Nov 2007 23:44:00 -0000 2.133
@@ -1878,7 +1878,7 @@
rpmts ts = fsmGetTs(fsm);
rpmfi fi = fsmGetFi(fsm);
void * ptr;
- unsigned long long archivePos = fdGetCpioPos(fsm->cfd);
+ uint64_t archivePos = fdGetCpioPos(fsm->cfd);
if (archivePos > fi->archivePos) {
fi->archivePos = archivePos;
ptr = rpmtsNotify(ts, fi->te, RPMCALLBACK_INST_PROGRESS,
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/psm.c
============================================================================
$ cvs diff -u -r2.253 -r2.254 psm.c
--- rpm/lib/psm.c 22 Oct 2007 02:48:41 -0000 2.253
+++ rpm/lib/psm.c 3 Nov 2007 23:44:00 -0000 2.254
@@ -58,17 +58,17 @@
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
const char * one, * two;
- int_32 Eone, Etwo;
+ uint32_t Eone, Etwo;
int rc;
int xx;
he->tag = RPMTAG_EPOCH;
xx = hge(first, he, 0);
- Eone = (xx && he->p.i32p ? he->p.i32p[0] : 0);
+ Eone = (xx && he->p.ui32p ? he->p.ui32p[0] : 0);
he->p.ptr = _free(he->p.ptr);
he->tag = RPMTAG_EPOCH;
xx = hge(second, he, 0);
- Etwo = (xx && he->p.i32p ? he->p.i32p[0] : 0);
+ Etwo = (xx && he->p.ui32p ? he->p.ui32p[0] : 0);
he->p.ptr = _free(he->p.ptr);
if (Eone < Etwo)
@@ -164,8 +164,8 @@
num = 0;
while (sfi->otherPkg && sfi->otherPkg == prev) {
assert(sfi->otherFileNum < count);
- if (secStates.i8p[sfi->otherFileNum] != RPMFILE_STATE_REPLACED) {
- secStates.i8p[sfi->otherFileNum] = RPMFILE_STATE_REPLACED;
+ if (secStates.ui8p[sfi->otherFileNum] != RPMFILE_STATE_REPLACED) {
+ secStates.ui8p[sfi->otherFileNum] = RPMFILE_STATE_REPLACED;
if (modified == 0) {
/* Modified header will be rewritten. */
modified = 1;
@@ -1019,7 +1019,7 @@
rpmds trigger = NULL;
const char ** triggerScripts;
const char ** triggerProgs;
- int_32 * triggerIndices;
+ uint32_t * triggerIndices;
const char * sourceName;
const char * triggerName;
rpmRC rc = RPMRC_OK;
@@ -1041,7 +1041,7 @@
while ((i = rpmdsNext(trigger)) >= 0) {
const char * Name;
- int_32 Flags = rpmdsFlags(trigger);
+ uint32_t Flags = rpmdsFlags(trigger);
if ((Name = rpmdsN(trigger)) == NULL)
continue; /* XXX can't happen */
@@ -1059,7 +1059,7 @@
he->tag = RPMTAG_TRIGGERINDEX;
xx = hge(triggeredH, he, 0);
- triggerIndices = he->p.i32p;
+ triggerIndices = he->p.ui32p;
he->tag = RPMTAG_TRIGGERSCRIPTS;
xx = hge(triggeredH, he, 0);
triggerScripts = he->p.argv;
@@ -1169,7 +1169,7 @@
rpmfi fi = psm->fi;
const char ** triggerNames;
int numTriggers;
- int_32 * triggerIndices;
+ uint32_t * triggerIndices;
int numTriggerIndices;
unsigned char * triggersRun;
rpmRC rc = RPMRC_OK;
@@ -1185,7 +1185,7 @@
numTriggers = he->c;
he->tag = RPMTAG_TRIGGERINDEX;
xx = hge(fi->h, he, 0);
- triggerIndices = he->p.i32p;
+ triggerIndices = he->p.ui32p;
numTriggerIndices = he->c;
if (!(triggerNames && numTriggers > 0 && triggerIndices && numTriggerIndices > 0))
@@ -1344,12 +1344,12 @@
* @param tag tag to load
* @return tag value (0 on failure)
*/
-static uint_32 hLoadTID(Header h, rpmTag tag)
+static uint32_t hLoadTID(Header h, rpmTag tag)
/*@*/
{
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
- uint_32 val;
+ uint32_t val;
int xx;
he->tag = tag;
@@ -1516,9 +1516,9 @@
{
HAE_t hae = headerAddExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
- uint_32 tscolor = rpmtsColor(ts);
- uint_32 tecolor = rpmteColor(te);
- int_32 installTime = (int_32) time(NULL);
+ uint32_t tscolor = rpmtsColor(ts);
+ uint32_t tecolor = rpmteColor(te);
+ uint32_t installTime = (uint32_t) time(NULL);
int fc = rpmfiFC(fi);
int xx = 1;
@@ -1526,14 +1526,14 @@
if (fi->fstates != NULL && fc > 0) {
he->tag = RPMTAG_FILESTATES;
he->t = RPM_CHAR_TYPE;
- he->p.i8p = fi->fstates;
+ he->p.ui8p = fi->fstates;
he->c = fc;
xx = hae(fi->h, he, 0);
}
he->tag = RPMTAG_INSTALLTIME;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &installTime;
+ he->p.ui32p = &installTime;
he->c = 1;
xx = hae(fi->h, he, 0);
@@ -1601,7 +1601,7 @@
HAE_t hae = headerAddExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
const rpmts ts = psm->ts;
- uint_32 tscolor = rpmtsColor(ts);
+ uint32_t tscolor = rpmtsColor(ts);
rpmfi fi = psm->fi;
rpmRC rc = psm->rc;
int saveerrno;
@@ -1930,11 +1930,11 @@
/* Add remove transaction id to header. */
if (psm->oh != NULL)
- { int_32 tid = rpmtsGetTid(ts);
+ { uint32_t tid = rpmtsGetTid(ts);
he->tag = RPMTAG_REMOVETID;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &tid;
+ he->p.ui32p = &tid;
he->c = 1;
xx = hae(psm->oh, he, 0);
@@ -2388,7 +2388,7 @@
/* Add header to db, doing header check if requested */
/* XXX rollback headers propagate the previous transaction id. */
- { uint_32 tid = ((rpmtsType(ts) == RPMTRANS_TYPE_ROLLBACK)
+ { uint32_t tid = ((rpmtsType(ts) == RPMTRANS_TYPE_ROLLBACK)
? hLoadTID(fi->h, RPMTAG_INSTALLTID) : rpmtsGetTid(ts));
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
if (!(rpmtsVSFlags(ts) & RPMVSF_NOHDRCHK))
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmal.h
============================================================================
$ cvs diff -u -r2.34 -r2.35 rpmal.h
--- rpm/lib/rpmal.h 6 Oct 2007 21:33:48 -0000 2.34
+++ rpm/lib/rpmal.h 3 Nov 2007 23:44:00 -0000 2.35
@@ -65,7 +65,7 @@
/*@dependent@*/ /*@null@*/ alKey pkgKey,
/*@dependent@*/ /*@null@*/ fnpyKey key,
/*@null@*/ rpmds provides, /*@null@*/ rpmfi fi,
- uint_32 tscolor)
+ uint32_t tscolor)
/*@globals fileSystem @*/
/*@modifies *alistp, provides, fi, fileSystem @*/;
@@ -79,7 +79,7 @@
/*@-exportlocal@*/
void rpmalAddProvides(rpmal al,
/*@dependent@*/ /*@null@*/ alKey pkgKey,
- /*@null@*/ rpmds provides, uint_32 tscolor)
+ /*@null@*/ rpmds provides, uint32_t tscolor)
/*@modifies al, provides @*/;
/*@=exportlocal@*/
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmchecksig.c
============================================================================
$ cvs diff -u -r1.163 -r1.164 rpmchecksig.c
--- rpm/lib/rpmchecksig.c 22 Oct 2007 02:48:41 -0000 1.163
+++ rpm/lib/rpmchecksig.c 3 Nov 2007 23:44:00 -0000 1.164
@@ -463,8 +463,8 @@
const char * group = "Public Keys";
const char * license = "pubkey";
const char * buildhost = "localhost";
- int_32 pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL);
- int_32 zero = 0;
+ uint32_t pflags = (RPMSENSE_KEYRING|RPMSENSE_EQUAL);
+ uint32_t zero = 0;
pgpDig dig = NULL;
pgpDigParams pubp = NULL;
const char * d = NULL;
@@ -563,7 +563,7 @@
he->tag = RPMTAG_SIZE;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &zero;
+ he->p.ui32p = &zero;
he->c = 1;
xx = hae(h, he, 0);
@@ -581,7 +581,7 @@
xx = hae(h, he, 0);
he->tag = RPMTAG_PROVIDEFLAGS;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &pflags;
+ he->p.ui32p = &pflags;
he->c = 1;
xx = hae(h, he, 0);
@@ -597,7 +597,7 @@
xx = hae(h, he, 0);
he->tag = RPMTAG_PROVIDEFLAGS;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &pflags;
+ he->p.ui32p = &pflags;
he->c = 1;
xx = hae(h, he, 0);
@@ -615,16 +615,16 @@
he->p.str = buildhost;
he->c = 1;
xx = hae(h, he, 0);
- { int_32 tid = rpmtsGetTid(ts);
+ { uint32_t tid = rpmtsGetTid(ts);
he->tag = RPMTAG_INSTALLTIME;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &tid;
+ he->p.ui32p = &tid;
he->c = 1;
xx = hae(h, he, 0);
/* XXX W2DO: tag value inheirited from parent? */
he->tag = RPMTAG_BUILDTIME;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &tid;
+ he->p.ui32p = &tid;
he->c = 1;
xx = hae(h, he, 0);
}
@@ -832,12 +832,12 @@
char buf[8192], * b;
char missingKeys[7164], * m;
char untrustedKeys[7164], * u;
- int_32 sigtag;
+ uint32_t sigtag;
rpmTagType sigtype;
const void * sig;
pgpDig dig;
pgpDigParams sigp;
- int_32 siglen;
+ uint32_t siglen;
Header sigh = NULL;
HeaderIterator hi = NULL;
const char * msg = NULL;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmcli.h
============================================================================
$ cvs diff -u -r2.71 -r2.72 rpmcli.h
--- rpm/lib/rpmcli.h 6 Sep 2007 12:41:12 -0000 2.71
+++ rpm/lib/rpmcli.h 3 Nov 2007 23:44:00 -0000 2.72
@@ -595,7 +595,7 @@
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;
};
#endif
@@ -660,7 +660,7 @@
* @return id index
*/
/*@only@*/ /*@null@*/
-IDTX IDTXload(rpmts ts, rpmTag tag, uint_32 rbtid)
+IDTX IDTXload(rpmts ts, rpmTag tag, uint32_t rbtid)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
@@ -673,7 +673,7 @@
* @return id index
*/
/*@only@*/ /*@null@*/
-IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag, uint_32 rbtid)
+IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag, uint32_t rbtid)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
@@ -809,9 +809,9 @@
rpmtransFlags transFlags;
rpmprobFilterFlags probFilter;
rpmInstallInterfaceFlags installInterfaceFlags;
- uint_32 arbtid; /*!< from --arbgoal */
- uint_32 rbtid; /*!< from --rollback */
- uint_32 *rbtidExcludes; /*!< from --rollback */
+ uint32_t arbtid; /*!< from --arbgoal */
+ uint32_t rbtid; /*!< from --rollback */
+ uint32_t *rbtidExcludes; /*!< from --rollback */
int numrbtidExcludes; /*!< from --rollback */
int numRelocations;
int noDeps;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmds.c
============================================================================
$ cvs diff -u -r2.76 -r2.77 rpmds.c
--- rpm/lib/rpmds.c 19 Oct 2007 00:36:44 -0000 2.76
+++ rpm/lib/rpmds.c 3 Nov 2007 23:44:00 -0000 2.77
@@ -306,7 +306,7 @@
if (tagF > 0) {
he->tag = tagF;
xx = hge(h, he, 0);
- ds->Flags = he->p.i32p;
+ ds->Flags = he->p.ui32p;
}
{
he->tag = RPMTAG_ARCH;
@@ -470,14 +470,14 @@
return tbuf;
}
-rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
+rpmds rpmdsThis(Header h, rpmTag tagN, uint32_t Flags)
{
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
rpmds ds = NULL;
const char * Type;
const char * Name, * V, * R;
- int_32 E;
+ uint32_t E;
const char ** N, ** EVR;
char * t;
int xx;
@@ -507,7 +507,7 @@
he->tag = RPMTAG_EPOCH;
xx = hge(h, he, 0);
- E = (he->p.i32p ? he->p.i32p[0] : 0);
+ E = (he->p.ui32p ? he->p.ui32p[0] : 0);
he->p.ptr = _free(he->p.ptr);
/*@-mods@*/
@@ -559,7 +559,7 @@
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, uint32_t Flags)
{
rpmds ds = NULL;
const char * Type;
@@ -665,7 +665,7 @@
return EVR;
}
-int_32 rpmdsFlags(const rpmds ds)
+uint32_t rpmdsFlags(const rpmds ds)
{
int_32 Flags = 0;
@@ -793,7 +793,7 @@
return ocolor;
}
-int_32 rpmdsRefs(const rpmds ds)
+uint32_t rpmdsRefs(const rpmds ds)
{
int_32 Refs = 0;
@@ -804,7 +804,7 @@
return Refs;
}
-int_32 rpmdsSetRefs(const rpmds ds, int_32 refs)
+uint32_t rpmdsSetRefs(const rpmds ds, uint32_t refs)
{
int_32 orefs = 0;
@@ -990,7 +990,7 @@
rpmds ds;
const char ** N;
const char ** EVR;
- int_32 * Flags;
+ uint32_t * Flags;
int j;
int save;
@@ -3379,13 +3379,13 @@
/*@unchecked@*/ /*@observer@*/ /*@owned@*/ /*@relnull@*/
static const char * _perldeps_cmd = NULL;
-int rpmdsPipe(rpmds * dsp, int_32 tagN, const char * cmd)
+int rpmdsPipe(rpmds * dsp, rpmTag tagN, const char * cmd)
/*@globals _perldeps_cmd @*/
/*@modifies _perldeps_cmd @*/
{
char buf[BUFSIZ];
const char *N, *EVR;
- int_32 Flags = 0;
+ uint32_t Flags = 0;
rpmds ds;
char * f, * fe;
char * g, * ge;
@@ -3711,12 +3711,12 @@
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
const char * pkgN, * V, * R;
- int_32 E;
+ uint32_t E;
int gotE = 0;
const char * pkgEVR;
char * t;
- int_32 reqFlags = req->ns.Flags;
- int_32 pkgFlags = RPMSENSE_EQUAL;
+ uint32_t reqFlags = req->ns.Flags;
+ uint32_t pkgFlags = RPMSENSE_EQUAL;
int result = 1;
rpmds pkg;
size_t nb;
@@ -3735,7 +3735,7 @@
/*@=mods@*/
he->tag = RPMTAG_EPOCH;
gotE = hge(h, he, 0);
- E = (he->p.i32p ? he->p.i32p[0] : 0);
+ E = (he->p.ui32p ? he->p.ui32p[0] : 0);
he->p.ptr = _free(he->p.ptr);
nb = 21 + 1 + 1;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmds.h
============================================================================
$ cvs diff -u -r2.59 -r2.60 rpmds.h
--- rpm/lib/rpmds.h 13 Oct 2007 17:50:06 -0000 2.59
+++ rpm/lib/rpmds.h 3 Nov 2007 23:44:00 -0000 2.60
@@ -41,11 +41,11 @@
/*@only@*/ /*@relnull@*/
const char ** EVR; /*!< Epoch-Version-Release. */
/*@only@*/ /*@relnull@*/
- int_32 * Flags; /*!< Bit(s) identifying context/comparison. */
+ uint32_t * Flags; /*!< Bit(s) identifying context/comparison. */
/*@only@*/ /*@null@*/
- uint_32 * Color; /*!< Bit(s) calculated from file color(s). */
+ uint32_t * Color; /*!< Bit(s) calculated from file color(s). */
/*@only@*/ /*@null@*/
- int_32 * Refs; /*!< No. of file refs. */
+ uint32_t * Refs; /*!< No. of file refs. */
/*@only@*/ /*@null@*/
int_32 * Result; /*!< Dependency check result. */
/*@null@*/
@@ -54,9 +54,9 @@
struct rpmns_s ns; /*!< Name (split). */
/*@only@*/ /*@null@*/
const char * A; /*!< Arch (from containing package). */
- int_32 BT; /*!< Package build time tie breaker. */
+ uint32_t BT; /*!< Package build time tie breaker. */
rpmTag tagN; /*!< Header tag. */
- int_32 Count; /*!< No. of elements */
+ uint32_t Count; /*!< No. of elements */
int i; /*!< Element index. */
unsigned l; /*!< Low element (bsearch). */
unsigned u; /*!< High element (bsearch). */
@@ -195,7 +195,7 @@
* @return new dependency set
*/
/*@null@*/
-rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
+rpmds rpmdsThis(Header h, rpmTag tagN, uint32_t Flags)
/*@*/;
/**
@@ -207,7 +207,7 @@
* @return new dependency set
*/
/*@null@*/
-rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int_32 Flags)
+rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, uint32_t Flags)
/*@*/;
/**
@@ -268,7 +268,7 @@
* @param ds dependency set
* @return current dependency flags, 0 on invalid
*/
-int_32 rpmdsFlags(/*@null@*/ const rpmds ds)
+uint32_t rpmdsFlags(/*@null@*/ const rpmds ds)
/*@*/;
/**
@@ -365,7 +365,7 @@
* @param ds dependency set
* @return current dependency color (0 if not set)
*/
-uint_32 rpmdsColor(/*@null@*/ const rpmds ds)
+uint32_t rpmdsColor(/*@null@*/ const rpmds ds)
/*@*/;
/**
@@ -374,7 +374,7 @@
* @param color new dependency color
* @return previous dependency color
*/
-uint_32 rpmdsSetColor(/*@null@*/ const rpmds ds, uint_32 color)
+uint32_t rpmdsSetColor(/*@null@*/ const rpmds ds, uint32_t color)
/*@modifies ds @*/;
/**
@@ -382,7 +382,7 @@
* @param ds dependency set
* @return current dependency file refs (0 if not set)
*/
-int_32 rpmdsRefs(/*@null@*/ const rpmds ds)
+uint32_t rpmdsRefs(/*@null@*/ const rpmds ds)
/*@*/;
/**
@@ -391,7 +391,7 @@
* @param refs new dependency refs
* @return previous dependency refs
*/
-int_32 rpmdsSetRefs(/*@null@*/ const rpmds ds, int_32 refs)
+uint32_t rpmdsSetRefs(/*@null@*/ const rpmds ds, uint32_t refs)
/*@modifies ds @*/;
/**
@@ -613,11 +613,11 @@
/**
* Load provides from a pipe into a dependency set.
* @retval *dsp (loaded) depedency set
- * @param tagN rpmds tag (<= 0 uses RPMTAG_PROVIDENAME).
+ * @param tagN rpmds tag (0 uses RPMTAG_PROVIDENAME).
* @param cmd popen cmd to run (NULL loads perl provides)
* @return 0 on success
*/
-int rpmdsPipe(rpmds * dsp, int_32 tagN, /*@null@*/ const char * cmd)
+int rpmdsPipe(rpmds * dsp, rpmTag tagN, /*@null@*/ const char * cmd)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies *dsp, rpmGlobalMacroContext, h_errno,
fileSystem, internalState @*/;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfc.c
============================================================================
$ cvs diff -u -r1.30 -r1.31 rpmfc.c
--- rpm/lib/rpmfc.c 22 Oct 2007 02:48:41 -0000 1.30
+++ rpm/lib/rpmfc.c 3 Nov 2007 23:44:01 -0000 1.31
@@ -1518,11 +1518,11 @@
/* Add per-file colors(#files) */
he->tag = RPMTAG_FILECOLORS;
he->t = RPM_INT32_TYPE;
- he->p.i32p = argiData(fc->fcolor);
+ he->p.ui32p = argiData(fc->fcolor);
he->c = argiCount(fc->fcolor);
assert(ac == he->c);
if (he->p.ptr != NULL && he->c > 0) {
- int_32 * fcolors = he->p.i32p;
+ uint32_t * fcolors = he->p.ui32p;
int i;
/* XXX Make sure only primary (i.e. Elf32/Elf64) colors are added. */
@@ -1544,7 +1544,7 @@
/* Add per-file classes(#files) */
he->tag = RPMTAG_FILECLASS;
he->t = RPM_INT32_TYPE;
- he->p.i32p = argiData(fc->fcdictx);
+ he->p.ui32p = argiData(fc->fcdictx);
he->c = argiCount(fc->fcdictx);
assert(ac == he->c);
if (he->p.ptr != NULL && he->c > 0) {
@@ -1570,7 +1570,7 @@
he->tag = RPMTAG_PROVIDEFLAGS;
he->t = RPM_INT32_TYPE;
- he->p.i32p = fc->provides->Flags;
+ he->p.ui32p = fc->provides->Flags;
assert(he->p.ptr != NULL);
xx = hae(pkg->header, he, 0);
/*@=nullpass@*/
@@ -1596,7 +1596,7 @@
he->tag = RPMTAG_REQUIREFLAGS;
he->t = RPM_INT32_TYPE;
- he->p.i32p = fc->requires->Flags;
+ he->p.ui32p = fc->requires->Flags;
assert(he->p.ptr != NULL);
xx = hae(pkg->header, he, 0);
/*@=nullpass@*/
@@ -1605,7 +1605,7 @@
/* Add dependency dictionary(#dependencies) */
he->tag = RPMTAG_DEPENDSDICT;
he->t = RPM_INT32_TYPE;
- he->p.i32p = argiData(fc->ddictx);
+ he->p.ui32p = argiData(fc->ddictx);
he->c = argiCount(fc->ddictx);
if (he->p.ptr != NULL) {
xx = hae(pkg->header, he, 0);
@@ -1614,7 +1614,7 @@
/* Add per-file dependency (start,number) pairs (#files) */
he->tag = RPMTAG_FILEDEPENDSX;
he->t = RPM_INT32_TYPE;
- he->p.i32p = argiData(fc->fddictx);
+ he->p.ui32p = argiData(fc->fddictx);
he->c = argiCount(fc->fddictx);
assert(ac == he->c);
if (he->p.ptr != NULL) {
@@ -1623,7 +1623,7 @@
he->tag = RPMTAG_FILEDEPENDSN;
he->t = RPM_INT32_TYPE;
- he->p.i32p = argiData(fc->fddictn);
+ he->p.ui32p = argiData(fc->fddictn);
he->c = argiCount(fc->fddictn);
assert(ac == he->c);
if (he->p.ptr != NULL) {
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfi.c
============================================================================
$ cvs diff -u -r2.94 -r2.95 rpmfi.c
--- rpm/lib/rpmfi.c 22 Oct 2007 02:48:41 -0000 2.94
+++ rpm/lib/rpmfi.c 3 Nov 2007 23:44:01 -0000 2.95
@@ -148,9 +148,9 @@
return FN;
}
-uint_32 rpmfiFFlags(rpmfi fi)
+uint32_t rpmfiFFlags(rpmfi fi)
{
- uint_32 FFlags = 0;
+ uint32_t FFlags = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fflags != NULL)
@@ -159,22 +159,22 @@
return FFlags;
}
-uint_32 rpmfiSetFFlags(rpmfi fi, uint_32 FFlags)
+uint32_t rpmfiSetFFlags(rpmfi fi, uint32_t FFlags)
{
- uint_32 oFFlags = 0;
+ uint32_t oFFlags = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fflags != NULL && fi->h == NULL) {
oFFlags = fi->fflags[fi->i];
- *((uint_32 *)(fi->fflags + fi->i)) = FFlags;
+ *((uint32_t *)(fi->fflags + fi->i)) = FFlags;
}
}
return oFFlags;
}
-uint_32 rpmfiVFlags(rpmfi fi)
+uint32_t rpmfiVFlags(rpmfi fi)
{
- uint_32 VFlags = 0;
+ uint32_t VFlags = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->vflags != NULL)
@@ -183,22 +183,22 @@
return VFlags;
}
-uint_32 rpmfiSetVFlags(rpmfi fi, uint_32 VFlags)
+uint32_t rpmfiSetVFlags(rpmfi fi, uint32_t VFlags)
{
- uint_32 oVFlags = 0;
+ uint32_t oVFlags = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->vflags != NULL && fi->h == NULL) {
oVFlags = fi->vflags[fi->i];
- *((uint_32 *)(fi->vflags + fi->i)) = VFlags;
+ *((uint32_t *)(fi->vflags + fi->i)) = VFlags;
}
}
return oVFlags;
}
-int_16 rpmfiFMode(rpmfi fi)
+uint16_t rpmfiFMode(rpmfi fi)
{
- int_16 fmode = 0;
+ uint16_t fmode = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fmodes != NULL)
@@ -220,7 +220,7 @@
rpmfileState rpmfiSetFState(rpmfi fi, rpmfileState fstate)
{
- int_32 ofstate = 0;
+ uint32_t ofstate = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fstates != NULL) {
@@ -259,9 +259,9 @@
return flink;
}
-int_32 rpmfiFSize(rpmfi fi)
+uint32_t rpmfiFSize(rpmfi fi)
{
- int_32 fsize = 0;
+ uint32_t fsize = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fsizes != NULL)
@@ -270,9 +270,9 @@
return fsize;
}
-int_16 rpmfiFRdev(rpmfi fi)
+uint16_t rpmfiFRdev(rpmfi fi)
{
- int_16 frdev = 0;
+ uint16_t frdev = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->frdevs != NULL)
@@ -281,9 +281,9 @@
return frdev;
}
-int_32 rpmfiFInode(rpmfi fi)
+uint32_t rpmfiFInode(rpmfi fi)
{
- int_32 finode = 0;
+ uint32_t finode = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->finodes != NULL)
@@ -292,9 +292,9 @@
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. */
@@ -302,9 +302,9 @@
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)
@@ -338,11 +338,11 @@
return fcontext;
}
-int_32 rpmfiFDepends(rpmfi fi, const uint_32 ** fddictp)
+uint32_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)
@@ -359,15 +359,15 @@
return fddictn;
}
-int_32 rpmfiFNlink(rpmfi fi)
+uint32_t rpmfiFNlink(rpmfi fi)
{
- int_32 nlink = 0;
+ uint32_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];
+ uint32_t finode = fi->finodes[fi->i];
+ uint16_t frdev = fi->frdevs[fi->i];
int j;
for (j = 0; j < fi->fc; j++) {
@@ -379,9 +379,9 @@
return nlink;
}
-int_32 rpmfiFMtime(rpmfi fi)
+uint32_t rpmfiFMtime(rpmfi fi)
{
- int_32 fmtime = 0;
+ uint32_t fmtime = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->fmtimes != NULL)
@@ -511,7 +511,7 @@
* @param mode file mode bits (from header)
* @return file type
*/
-static rpmFileTypes rpmfiWhatis(uint_16 mode)
+static rpmFileTypes rpmfiWhatis(uint16_t mode)
/*@*/
{
if (S_ISDIR(mode)) return XDIR;
@@ -582,7 +582,7 @@
}
}
- diskWhat = rpmfiWhatis((int_16)sb.st_mode);
+ diskWhat = rpmfiWhatis((uint16_t)sb.st_mode);
dbWhat = rpmfiWhatis(rpmfiFMode(ofi));
newWhat = rpmfiWhatis(rpmfiFMode(nfi));
@@ -698,15 +698,15 @@
int numValid;
const char ** baseNames;
const char ** dirNames;
- int_32 * dirIndexes;
- int_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;
+ uint32_t fileCount;
+ uint32_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;
@@ -886,7 +886,7 @@
fileCount = he->c;
he->tag = RPMTAG_DIRINDEXES;
xx = hge(h, he, 0);
- dirIndexes = he->p.i32p;
+ dirIndexes = he->p.ui32p;
he->tag = RPMTAG_DIRNAMES;
xx = hge(h, he, 0);
dirNames = he->p.argv;
@@ -1139,7 +1139,7 @@
he->tag = RPMTAG_DIRINDEXES;
he->t = RPM_INT32_TYPE;
- he->p.i32p = dirIndexes;
+ he->p.ui32p = dirIndexes;
he->c = fileCount;
xx = hme(h, he->tag, he->t, he->p.ptr, he->c);
fi->dil = _free(fi->dil);
@@ -1569,7 +1569,7 @@
}
void rpmfiBuildFClasses(Header h,
- /*@out@*/ const char *** fclassp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fclassp, /*@out@*/ uint32_t * fcp)
{
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
@@ -1621,7 +1621,7 @@
}
void rpmfiBuildFContexts(Header h,
- /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fcontextp, /*@out@*/ uint32_t * fcp)
{
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
@@ -1673,7 +1673,7 @@
}
void rpmfiBuildFSContexts(Header h,
- /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fcontextp, /*@out@*/ uint32_t * fcp)
{
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
@@ -1741,7 +1741,7 @@
}
void rpmfiBuildREContexts(Header h,
- /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fcontextp, /*@out@*/ uint32_t * fcp)
{
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
@@ -1826,7 +1826,7 @@
}
void rpmfiBuildFDeps(Header h, rpmTag tagN,
- /*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fdepsp, /*@out@*/ uint32_t * fcp)
{
int scareMem = 0;
rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
@@ -1838,7 +1838,7 @@
char deptype = 'R';
char mydt;
const char * DNEVR;
- const uint_32 * ddict;
+ const uint32_t * ddict;
unsigned ix;
int ndx;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfi.h
============================================================================
$ cvs diff -u -r2.44 -r2.45 rpmfi.h
--- rpm/lib/rpmfi.h 16 Oct 2007 16:07:28 -0000 2.44
+++ rpm/lib/rpmfi.h 3 Nov 2007 23:44:01 -0000 2.45
@@ -51,26 +51,26 @@
/*@only@*/ /*@relnull@*/
const char ** fdigests; /*!< File digest(s) (from header) */
/*@only@*/ /*@null@*/
- uint_32 * fdigestalgos; /*!< File digest algorithm(s) (from header) */
+ uint32_t * fdigestalgos; /*!< File digest algorithm(s) (from header) */
/*@only@*/ /*@relnull@*/
const char ** flinks; /*!< File link(s) (from header) */
/*@only@*/ /*@null@*/
const char ** flangs; /*!< File lang(s) (from header) */
/*@only@*/ /*@relnull@*/
- uint_32 * dil; /*!< Directory indice(s) (from header) */
+ uint32_t * dil; /*!< Directory indice(s) (from header) */
/*@only@*/ /*?null?*/
- const uint_32 * fflags; /*!< File flag(s) (from header) */
+ const uint32_t * fflags; /*!< File flag(s) (from header) */
/*@only@*/ /*?null?*/
- const uint_32 * fsizes; /*!< File size(s) (from header) */
+ const uint32_t * fsizes; /*!< File size(s) (from header) */
/*@only@*/ /*?null?*/
- const uint_32 * fmtimes; /*!< File modification time(s) (from header) */
+ const uint32_t * fmtimes; /*!< File modification time(s) (from header) */
/*@only@*/ /*?null?*/
- uint_16 * fmodes; /*!< File mode(s) (from header) */
+ uint16_t * fmodes; /*!< File mode(s) (from header) */
/*@only@*/ /*?null?*/
- const uint_16 * frdevs; /*!< File rdev(s) (from header) */
+ const uint16_t * frdevs; /*!< File rdev(s) (from header) */
/*@only@*/ /*?null?*/
- const uint_32 * finodes; /*!< File inodes(s) (from header) */
+ const uint32_t * finodes; /*!< File inodes(s) (from header) */
/*@only@*/ /*@null@*/
const char ** fuser; /*!< File owner(s) (from header) */
@@ -78,33 +78,33 @@
const char ** fgroup; /*!< File group(s) (from header) */
/*@only@*/ /*@null@*/
- char * fstates; /*!< File state(s) (from header) */
+ uint8_t * fstates; /*!< File state(s) (from header) */
/*@only@*/ /*@null@*/
- const uint_32 * fcolors; /*!< File color bits (header) */
+ const uint32_t * fcolors; /*!< File color bits (header) */
/*@only@*/ /*@null@*/
const char ** fcontexts; /*! FIle security contexts. */
/*@only@*/ /*@null@*/
const char ** cdict; /*!< File class dictionary (header) */
- int_32 ncdict; /*!< No. of class entries. */
+ uint32_t ncdict; /*!< No. of class entries. */
/*@only@*/ /*@null@*/
- const uint_32 * fcdictx; /*!< File class dictionary index (header) */
+ const uint32_t * fcdictx; /*!< File class dictionary index (header) */
/*@only@*/ /*@null@*/
- const uint_32 * ddict; /*!< File depends dictionary (header) */
- int_32 nddict; /*!< No. of depends entries. */
+ const uint32_t * ddict; /*!< File depends dictionary (header) */
+ uint32_t nddict; /*!< No. of depends entries. */
/*@only@*/ /*@null@*/
- const uint_32 * fddictx; /*!< File depends dictionary start (header) */
+ const uint32_t * fddictx; /*!< File depends dictionary start (header) */
/*@only@*/ /*@null@*/
- const uint_32 * fddictn; /*!< File depends dictionary count (header) */
+ const uint32_t * fddictn; /*!< File depends dictionary count (header) */
/*@only@*/ /*?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. */
+ uint32_t dc; /*!< No. of directories. */
+ uint32_t fc; /*!< No. of files. */
/*=============================*/
/*@dependent@*/ /*@relnull@*/
@@ -113,7 +113,7 @@
/*-----------------------------*/
uid_t uid; /*!< File uid (default). */
gid_t gid; /*!< File gid (default). */
- uint_32 flags; /*!< File flags (default). */
+ uint32_t flags; /*!< File flags (default). */
fileAction action; /*!< File disposition (default). */
/*@owned@*/ /*@relnull@*/
fileAction * actions; /*!< File disposition(s). */
@@ -124,12 +124,12 @@
/*@owned@*/
const char ** odnl; /*!< Original dirname(s) (from header) */
/*@unused@*/
- int_32 * odil; /*!< Original dirindex(s) (from header) */
+ uint32_t * odil; /*!< Original dirindex(s) (from header) */
/*@only@*/ /*@relnull@*/
unsigned char * digests; /*!< File digest(s) in binary. */
- uint_32 digestalgo; /*!< File digest algorithm. */
- uint_32 digestlen; /*!< No. bytes in binary digest. */
+ uint32_t digestalgo; /*!< File digest algorithm. */
+ uint32_t digestlen; /*!< No. bytes in binary digest. */
/*@only@*/ /*@relnull@*/
const char * pretrans;
@@ -161,12 +161,12 @@
int * fmapflags;
/*@owned@*/
FSM_t fsm; /*!< File state machine data. */
- uint_32 color; /*!< Color bit(s) from file color union. */
+ uint32_t color; /*!< Color bit(s) from file color union. */
int isSource; /*!< Is this a SRPM? */
/*@owned@*/
- uint_32 * replacedSizes; /*!< (TR_ADDED) */
+ uint32_t * replacedSizes; /*!< (TR_ADDED) */
unsigned int record; /*!< (TR_REMOVED) */
int magic;
@@ -326,7 +326,7 @@
* @param fi file info set
* @return current file flags, 0 on invalid
*/
-uint_32 rpmfiFFlags(/*@null@*/ rpmfi fi)
+uint32_t rpmfiFFlags(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -335,7 +335,7 @@
* @param FFlags new file flags
* @return previous file flags, 0 on invalid
*/
-uint_32 rpmfiSetFFlags(/*@null@*/ rpmfi fi, uint_32 FFlags)
+uint32_t rpmfiSetFFlags(/*@null@*/ rpmfi fi, uint32_t FFlags)
/*@modifies fi @*/;
/**
@@ -343,7 +343,7 @@
* @param fi file info set
* @return current file verify flags, 0 on invalid
*/
-uint_32 rpmfiVFlags(/*@null@*/ rpmfi fi)
+uint32_t rpmfiVFlags(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -352,7 +352,7 @@
* @param VFlags new file verify flags
* @return previous file verify flags, 0 on invalid
*/
-uint_32 rpmfiSetVFlags(/*@null@*/ rpmfi fi, uint_32 VFlags)
+uint32_t rpmfiSetVFlags(/*@null@*/ rpmfi fi, uint32_t VFlags)
/*@modifies fi @*/;
/**
@@ -360,7 +360,7 @@
* @param fi file info set
* @return current file mode, 0 on invalid
*/
-int_16 rpmfiFMode(/*@null@*/ rpmfi fi)
+uint16_t rpmfiFMode(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -407,7 +407,7 @@
* @param fi file info set
* @return current file size, 0 on invalid
*/
-int_32 rpmfiFSize(/*@null@*/ rpmfi fi)
+uint32_t rpmfiFSize(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -415,7 +415,7 @@
* @param fi file info set
* @return current file rdev, 0 on invalid
*/
-int_16 rpmfiFRdev(/*@null@*/ rpmfi fi)
+uint16_t rpmfiFRdev(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -423,7 +423,7 @@
* @param fi file info set
* @return current file inode, 0 on invalid
*/
-int_32 rpmfiFInode(/*@null@*/ rpmfi fi)
+uint32_t rpmfiFInode(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -431,7 +431,7 @@
* @param fi file info set
* @return current color
*/
-uint_32 rpmfiColor(/*@null@*/ rpmfi fi)
+uint32_t rpmfiColor(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -439,7 +439,7 @@
* @param fi file info set
* @return current file color
*/
-uint_32 rpmfiFColor(/*@null@*/ rpmfi fi)
+uint32_t rpmfiFColor(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -470,8 +470,8 @@
* @retval *fddictp file depends dictionary array (or NULL)
* @return no. of file depends entries, 0 on invalid
*/
-int_32 rpmfiFDepends(/*@null@*/ rpmfi fi,
- /*@out@*/ /*@null@*/ const uint_32 ** fddictp)
+uint32_t rpmfiFDepends(/*@null@*/ rpmfi fi,
+ /*@out@*/ /*@null@*/ const uint32_t ** fddictp)
/*@modifies *fddictp @*/;
/**
@@ -479,7 +479,7 @@
* @param fi file info set
* @return current file nlink count, 0 on invalid
*/
-int_32 rpmfiFNlink(/*@null@*/ rpmfi fi)
+uint32_t rpmfiFNlink(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -487,7 +487,7 @@
* @param fi file info set
* @return current file modify time, 0 on invalid
*/
-int_32 rpmfiFMtime(/*@null@*/ rpmfi fi)
+uint32_t rpmfiFMtime(/*@null@*/ rpmfi fi)
/*@*/;
/**
@@ -578,7 +578,7 @@
* @retval *fcp number of files
*/
void rpmfiBuildFClasses(Header h,
- /*@out@*/ const char *** fclassp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fclassp, /*@out@*/ uint32_t * fcp)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies h, *fclassp, *fcp, rpmGlobalMacroContext,
fileSystem, internalState @*/;
@@ -593,7 +593,7 @@
* @retval *fcp number of files
*/
void rpmfiBuildFContexts(Header h,
- /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fcontextp, /*@out@*/ uint32_t * fcp)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext,
fileSystem, internalState @*/;
@@ -608,7 +608,7 @@
* @retval *fcp number of files
*/
void rpmfiBuildFSContexts(Header h,
- /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fcontextp, /*@out@*/ uint32_t * fcp)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext,
fileSystem, internalState @*/;
@@ -623,7 +623,7 @@
* @retval *fcp number of files
*/
void rpmfiBuildREContexts(Header h,
- /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fcontextp, /*@out@*/ uint32_t * fcp)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext,
fileSystem, internalState @*/;
@@ -639,7 +639,7 @@
* @retval *fcp number of files
*/
void rpmfiBuildFDeps(Header h, rpmTag tagN,
- /*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp)
+ /*@out@*/ const char *** fdepsp, /*@out@*/ uint32_t * fcp)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies h, *fdepsp, *fcp,
rpmGlobalMacroContext, fileSystem, internalState @*/;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpminstall.c
============================================================================
$ cvs diff -u -r1.178 -r1.179 rpminstall.c
--- rpm/lib/rpminstall.c 19 Oct 2007 00:36:44 -0000 1.178
+++ rpm/lib/rpminstall.c 3 Nov 2007 23:44:01 -0000 1.179
@@ -31,9 +31,9 @@
/*@unchecked@*/
int rpmcliHashesTotal = 0;
/*@unchecked@*/
-unsigned long long rpmcliProgressCurrent = 0;
+uint64_t rpmcliProgressCurrent = 0;
/*@unchecked@*/
-unsigned long long rpmcliProgressTotal = 0;
+uint64_t rpmcliProgressTotal = 0;
/**
* Print a CLI progress bar.
@@ -41,7 +41,7 @@
* @param amount current
* @param total final
*/
-static void printHash(const unsigned long long amount, const unsigned long long total)
+static void printHash(const uint64_t amount, const uint64_t total)
/*@globals rpmcliHashesCurrent, rpmcliHashesTotal,
rpmcliProgressCurrent, fileSystem @*/
/*@modifies rpmcliHashesCurrent, rpmcliHashesTotal,
@@ -94,8 +94,8 @@
void * rpmShowProgress(/*@null@*/ const void * arg,
const rpmCallbackType what,
- const unsigned long long amount,
- const unsigned long long total,
+ const uint64_t amount,
+ const uint64_t total,
/*@null@*/ fnpyKey key,
/*@null@*/ void * data)
/*@globals rpmcliHashesCurrent, rpmcliProgressCurrent, rpmcliProgressTotal,
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmps.c
============================================================================
$ cvs diff -u -r2.14 -r2.15 rpmps.c
--- rpm/lib/rpmps.c 20 Oct 2007 04:55:43 -0000 2.14
+++ rpm/lib/rpmps.c 3 Nov 2007 23:44:01 -0000 2.15
@@ -127,7 +127,7 @@
void rpmpsAppend(rpmps ps, rpmProblemType type,
const char * pkgNEVR, fnpyKey key,
const char * dn, const char * bn,
- const char * altNEVR, unsigned long long ulong1)
+ const char * altNEVR, uint64_t ulong1)
{
rpmProblem p;
char *t;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmrollback.c
============================================================================
$ cvs diff -u -r1.23 -r1.24 rpmrollback.c
--- rpm/lib/rpmrollback.c 19 Oct 2007 00:36:44 -0000 1.23
+++ rpm/lib/rpmrollback.c 3 Nov 2007 23:44:01 -0000 1.24
@@ -88,14 +88,14 @@
return idtx;
}
-IDTX IDTXload(rpmts ts, rpmTag tag, uint_32 rbtid)
+IDTX IDTXload(rpmts ts, rpmTag tag, uint32_t rbtid)
{
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
IDTX idtx = NULL;
rpmdbMatchIterator mi;
Header h;
- int_32 tid;
+ uint32_t tid;
int xx;
mi = rpmtsInitIterator(ts, tag, NULL, 0);
@@ -105,9 +105,9 @@
while ((h = rpmdbNextIterator(mi)) != NULL) {
he->tag = tag;
xx = hge(h, he, 0);
- if (!xx || he->p.i32p == NULL)
+ if (!xx || he->p.ui32p == NULL)
continue;
- tid = (he->p.i32p ? he->p.i32p[0] : 0);
+ tid = (he->p.ui32p ? he->p.ui32p[0] : 0);
he->p.ptr = _free(he->p.ptr);
if (tid == 0 || tid == -1)
@@ -138,13 +138,13 @@
return IDTXsort(idtx);
}
-IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag, uint_32 rbtid)
+IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag, uint32_t rbtid)
{
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
IDTX idtx = NULL;
Header h;
- int_32 tid;
+ uint32_t tid;
FD_t fd;
const char ** av = NULL;
const char * fn;
@@ -193,9 +193,9 @@
}
he->tag = tag;
xx = hge(h, he, 0);
- if (!xx || he->p.i32p == NULL)
+ if (!xx || he->p.ui32p == NULL)
goto bottom;
- tid = (he->p.i32p ? he->p.i32p[0] : 0);
+ tid = (he->p.ui32p ? he->p.ui32p[0] : 0);
he->p.ptr = _free(he->p.ptr);
/* Don't bother with headers installed prior to the rollback goal. */
@@ -303,7 +303,7 @@
const char ** flinkPkgid = NULL;
const char ** flinkHdrid = NULL;
const char ** flinkNEVRA = NULL;
- int_32 pn, hn, nn;
+ uint32_t pn, hn, nn;
int bingo;
he->tag = RPMTAG_BLINKPKGID;
@@ -494,7 +494,7 @@
/* Is this transaction excluded from the rollback? */
if (ia->rbtidExcludes != NULL && ia->numrbtidExcludes > 0)
{
- uint_32 *excludedTID;
+ uint32_t *excludedTID;
int excluded = 0;
for(excludedTID = ia->rbtidExcludes;
excludedTID < ia->rbtidExcludes + ia->numrbtidExcludes;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmte.c
============================================================================
$ cvs diff -u -r2.63 -r2.64 rpmte.c
--- rpm/lib/rpmte.c 19 Oct 2007 00:36:44 -0000 2.63
+++ rpm/lib/rpmte.c 3 Nov 2007 23:44:01 -0000 2.64
@@ -148,9 +148,9 @@
he->tag = RPMTAG_EPOCH;
xx = hge(h, he, 0);
- if (he->p.i32p != NULL) {
+ if (he->p.ui32p != NULL) {
p->epoch = xmalloc(20);
- sprintf(p->epoch, "%d", he->p.i32p[0]);
+ sprintf(p->epoch, "%u", he->p.ui32p[0]);
he->p.ptr = _free(he->p.ptr);
} else
p->epoch = NULL;
@@ -309,12 +309,12 @@
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) {
@@ -324,7 +324,7 @@
return ocolor;
}
-uint_32 rpmtePkgFileSize(rpmte te)
+uint32_t rpmtePkgFileSize(rpmte te)
{
return (te != NULL ? te->pkgFileSize : 0);
}
@@ -531,10 +531,10 @@
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;
+ uint32_t * colors;
+ uint32_t * refs;
+ uint32_t val;
int Count;
size_t nb;
unsigned ix;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmte.h
============================================================================
$ cvs diff -u -r2.38 -r2.39 rpmte.h
--- rpm/lib/rpmte.h 19 Jun 2007 02:32:42 -0000 2.38
+++ rpm/lib/rpmte.h 3 Nov 2007 23:44:01 -0000 2.39
@@ -128,8 +128,8 @@
/*@refcounted@*/ /*@null@*/
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). */
/*@exposed@*/ /*@dependent@*/ /*@null@*/
fnpyKey key; /*!< (TR_ADDED) Retrieval key. */
@@ -303,7 +303,7 @@
* @param te transaction element
* @return color bits
*/
-uint_32 rpmteColor(rpmte te)
+uint32_t rpmteColor(rpmte te)
/*@*/;
/**
@@ -312,7 +312,7 @@
* @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)
/*@modifies te @*/;
/**
@@ -338,7 +338,7 @@
* @param te transaction element
* @return size in bytes of package file.
*/
-uint_32 rpmtePkgFileSize(rpmte te)
+uint32_t rpmtePkgFileSize(rpmte te)
/*@*/;
/**
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmts.c
============================================================================
$ cvs diff -u -r2.115 -r2.116 rpmts.c
--- rpm/lib/rpmts.c 25 Oct 2007 15:20:22 -0000 2.115
+++ rpm/lib/rpmts.c 3 Nov 2007 23:44:01 -0000 2.116
@@ -712,12 +712,12 @@
ts->type = type;
}
-uint_32 rpmtsARBGoal(rpmts ts)
+uint32_t rpmtsARBGoal(rpmts ts)
{
return ((ts != NULL) ? ts->arbgoal : 0);
}
-void rpmtsSetARBGoal(rpmts ts, uint_32 goal)
+void rpmtsSetARBGoal(rpmts ts, uint32_t goal)
{
if (ts != NULL)
ts->arbgoal = goal;
@@ -866,18 +866,18 @@
return rc;
}
-int_32 rpmtsGetTid(rpmts ts)
+uint32_t rpmtsGetTid(rpmts ts)
{
- int_32 tid = -1; /* XXX -1 is time(2) error return. */
+ uint32_t tid = 0; /* XXX -1 is time(2) error return. */
if (ts != NULL) {
tid = ts->tid;
}
return tid;
}
-int_32 rpmtsSetTid(rpmts ts, int_32 tid)
+uint32_t rpmtsSetTid(rpmts ts, uint32_t tid)
{
- int_32 otid = -1; /* XXX -1 is time(2) error return. */
+ uint32_t otid = 0; /* XXX -1 is time(2) error return. */
if (ts != NULL) {
otid = ts->tid;
ts->tid = tid;
@@ -1004,11 +1004,11 @@
}
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,
fileAction action)
{
rpmDiskSpaceInfo dsi;
- unsigned long long bneeded;
+ uint64_t bneeded;
dsi = ts->dsi;
if (dsi) {
@@ -1097,7 +1097,7 @@
}
void * rpmtsNotify(rpmts ts, rpmte te,
- rpmCallbackType what, unsigned long long amount, unsigned long long total)
+ rpmCallbackType what, uint64_t amount, uint64_t total)
{
void * ptr = NULL;
if (ts && ts->notify && te) {
@@ -1230,14 +1230,14 @@
return odbmode;
}
-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;
@@ -1245,7 +1245,7 @@
return ocolor;
}
-uint_32 rpmtsPrefColor(rpmts ts)
+uint32_t rpmtsPrefColor(rpmts ts)
{
return (ts != NULL ? ts->prefcolor : 0);
}
@@ -1293,7 +1293,7 @@
ts->dbmode = O_RDONLY;
ts->scriptFd = NULL;
- ts->tid = (int_32) time(NULL);
+ ts->tid = (uint32_t) time(NULL);
ts->delta = 5;
ts->color = rpmExpandNumeric("%{?_transaction_color}");
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmts.h
============================================================================
$ cvs diff -u -r2.82 -r2.83 rpmts.h
--- rpm/lib/rpmts.h 25 Oct 2007 15:20:22 -0000 2.82
+++ rpm/lib/rpmts.h 3 Nov 2007 23:44:01 -0000 2.83
@@ -146,7 +146,7 @@
rpmprobFilterFlags ignoreSet;
/*!< Bits to filter current problems. */
- int filesystemCount; /*!< No. of mounted filesystems. */
+ uint32_t filesystemCount; /*!< No. of mounted filesystems. */
/*@dependent@*/ /*@null@*/
const char ** filesystems; /*!< Mounted filesystem names. */
/*@only@*/ /*@relnull@*/
@@ -205,10 +205,10 @@
/*@null@*/
FD_t scriptFd; /*!< Scriptlet stdout/stderr. */
int delta; /*!< Delta for reallocation. */
- int_32 tid; /*!< Transaction id. */
+ uint32_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. */
/*@observer@*/ /*@dependent@*/ /*@null@*/
const char * fn; /*!< Current package fn. */
@@ -226,7 +226,7 @@
/*@null@*/
Spec spec; /*!< Spec file control structure. */
- uint_32 arbgoal; /*!< Autorollback goal */
+ uint32_t arbgoal; /*!< Autorollback goal */
/*@refs@*/
int nrefs; /*!< Reference count. */
@@ -496,7 +496,7 @@
* @param ts transaction set
* @return autorollback goal
*/
-uint_32 rpmtsARBGoal(rpmts ts)
+uint32_t rpmtsARBGoal(rpmts ts)
/*@*/;
/**
@@ -504,7 +504,7 @@
* @param ts transaction set
* @param goal autorollback goal
*/
-void rpmtsSetARBGoal(rpmts ts, uint_32 goal)
+void rpmtsSetARBGoal(rpmts ts, uint32_t goal)
/*@modifies ts @*/;
/**
@@ -674,7 +674,7 @@
* @param ts transaction set
* @return transaction id
*/
-int_32 rpmtsGetTid(rpmts ts)
+uint32_t rpmtsGetTid(rpmts ts)
/*@*/;
/** \ingroup rpmts
@@ -683,7 +683,7 @@
* @param tid new transaction id
* @return previous transaction id
*/
-int_32 rpmtsSetTid(rpmts ts, int_32 tid)
+uint32_t rpmtsSetTid(rpmts ts, uint32_t tid)
/*@modifies ts @*/;
/** \ingroup rpmts
@@ -743,7 +743,7 @@
* @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,
fileAction action)
/*@modifies ts @*/;
@@ -908,7 +908,7 @@
* @param ts transaction set
* @return color bits
*/
-uint_32 rpmtsColor(rpmts ts)
+uint32_t rpmtsColor(rpmts ts)
/*@*/;
/**
@@ -916,7 +916,7 @@
* @param ts transaction set
* @return color bits
*/
-uint_32 rpmtsPrefColor(rpmts ts)
+uint32_t rpmtsPrefColor(rpmts ts)
/*@*/;
/**
@@ -925,7 +925,7 @@
* @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)
/*@modifies ts @*/;
/**
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/transaction.c
============================================================================
$ cvs diff -u -r1.347 -r1.348 transaction.c
--- rpm/lib/transaction.c 19 Oct 2007 00:36:44 -0000 1.347
+++ rpm/lib/transaction.c 3 Nov 2007 23:44:01 -0000 1.348
@@ -61,8 +61,8 @@
*/
extern void * rpmShowProgress(/*@null@*/ const void * arg,
const rpmCallbackType what,
- const unsigned long long amount,
- const unsigned long long total,
+ const uint64_t amount,
+ const uint64_t total,
/*@null@*/ fnpyKey key,
/*@null@*/ void * data)
/*@*/;
@@ -1792,7 +1792,7 @@
*/
psm->fi = rpmfiFree(psm->fi);
{
- char * fstates = fi->fstates;
+ uint8_t * fstates = fi->fstates;
fileAction * actions = fi->actions;
int mapflags = fi->mapflags;
rpmte savep;
@@ .
patch -p0 <<'@@ .'
Index: rpm/python/header-py.c
============================================================================
$ cvs diff -u -r1.69 -r1.70 header-py.c
--- rpm/python/header-py.c 1 Nov 2007 03:37:05 -0000 1.69
+++ rpm/python/header-py.c 3 Nov 2007 23:44:03 -0000 1.70
@@ -435,7 +435,7 @@
{
PyObject * list, *o;
HeaderIterator hi;
- int_32 tag;
+ rpmTag tag;
rpmTagType type;
list = PyList_New(0);
@@ -793,13 +793,13 @@
if (he->c != 1 || forceArray) {
metao = PyList_New(0);
for (i = 0; i < he->c; i++) {
- o = PyInt_FromLong(he->p.i8p[i]);
+ o = PyInt_FromLong(he->p.ui8p[i]);
PyList_Append(metao, o);
Py_DECREF(o);
}
o = metao;
} else {
- o = PyInt_FromLong(he->p.i8p[0]);
+ o = PyInt_FromLong(he->p.ui8p[0]);
}
break;
@@ -807,13 +807,13 @@
if (he->c != 1 || forceArray) {
metao = PyList_New(0);
for (i = 0; i < he->c; i++) {
- o = PyInt_FromLong(he->p.i16p[i]);
+ o = PyInt_FromLong(he->p.ui16p[i]);
PyList_Append(metao, o);
Py_DECREF(o);
}
o = metao;
} else {
- o = PyInt_FromLong(he->p.i16p[0]);
+ o = PyInt_FromLong(he->p.ui16p[0]);
}
break;
@@ -821,13 +821,13 @@
if (he->c != 1 || forceArray) {
metao = PyList_New(0);
for (i = 0; i < he->c; i++) {
- o = PyInt_FromLong(he->p.i32p[i]);
+ o = PyInt_FromLong(he->p.ui32p[i]);
PyList_Append(metao, o);
Py_DECREF(o);
}
o = metao;
} else {
- o = PyInt_FromLong(he->p.i32p[0]);
+ o = PyInt_FromLong(he->p.ui32p[0]);
}
break;
@@ -835,13 +835,13 @@
if (he->c != 1 || forceArray) {
metao = PyList_New(0);
for (i = 0; i < he->c; i++) {
- o = PyInt_FromLong(he->p.i64p[i]);
+ o = PyInt_FromLong(he->p.ui64p[i]);
PyList_Append(metao, o);
Py_DECREF(o);
}
o = metao;
} else {
- o = PyInt_FromLong(he->p.i64p[0]);
+ o = PyInt_FromLong(he->p.ui64p[0]);
}
break;
@@ -1104,7 +1104,7 @@
rpmTagData oldMatch;
hdrObject * hdr;
int count = 0;
- int_32 tag;
+ rpmTag tag;
rpmTagType t;
rpmTagCount c;
rpmTagData p;
@@ -1127,7 +1127,7 @@
return 1;
}
- if (*newMatch.i32p != *oldMatch.i32p) {
+ if (*newMatch.ui32p != *oldMatch.ui32p) {
PyErr_SetString(pyrpmError, "match tag mismatch");
return 1;
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/python/rpmts-py.c
============================================================================
$ cvs diff -u -r1.76 -r1.77 rpmts-py.c
--- rpm/python/rpmts-py.c 31 Oct 2007 19:21:13 -0000 1.76
+++ rpm/python/rpmts-py.c 3 Nov 2007 23:44:03 -0000 1.77
@@ -212,7 +212,7 @@
/*@null@*/
static void *
rpmtsCallback(/*@unused@*/ const void * hd, const rpmCallbackType what,
- const unsigned long long amount, const unsigned long long total,
+ const uint64_t amount, const uint64_t total,
const void * pkgKey, rpmCallbackData data)
/*@globals _Py_NoneStruct @*/
/*@modifies _Py_NoneStruct @*/
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrNVR.c
============================================================================
$ cvs diff -u -r1.22 -r1.23 hdrNVR.c
--- rpm/rpmdb/hdrNVR.c 22 Oct 2007 02:48:41 -0000 1.22
+++ rpm/rpmdb/hdrNVR.c 3 Nov 2007 23:44:03 -0000 1.23
@@ -38,7 +38,9 @@
HGE_t hge = (HGE_t)headerGetExtension;
HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
struct tagMacro * tagm;
- char numbuf[32];
+ char numbuf[64];
+ const char * val;
+ uint64_t ival;
int xx;
/* XXX pre-expand %{buildroot} (if any) */
@@ -58,24 +60,42 @@
xx = hge(h, he, 0);
if (!xx)
continue;
+ val = NULL;
+ ival = 0;
switch (he->t) {
+ case RPM_CHAR_TYPE:
+ case RPM_INT8_TYPE:
+ ival = he->p.ui8p[0];
+ val = numbuf;
+ /*@switchbreak@*/ break;
+ case RPM_INT16_TYPE:
+ ival = he->p.ui16p[0];
+ val = numbuf;
+ /*@switchbreak@*/ break;
case RPM_INT32_TYPE:
- sprintf(numbuf, "%d", he->p.i32p[0]);
- addMacro(NULL, tagm->macroname, NULL, numbuf, -1);
+ ival = he->p.ui32p[0];
+ val = numbuf;
+ /*@switchbreak@*/ break;
+ case RPM_INT64_TYPE:
+ ival = he->p.ui64p[0];
+ val = numbuf;
/*@switchbreak@*/ break;
case RPM_STRING_TYPE:
- addMacro(NULL, tagm->macroname, NULL, he->p.str, -1);
+ val = he->p.str;
/*@switchbreak@*/ break;
case RPM_STRING_ARRAY_TYPE:
case RPM_I18NSTRING_TYPE:
case RPM_BIN_TYPE:
case RPM_NULL_TYPE:
- case RPM_CHAR_TYPE:
- case RPM_INT8_TYPE:
- case RPM_INT16_TYPE:
default:
/*@switchbreak@*/ break;
}
+
+ if (val) {
+ if (val == numbuf)
+ sprintf(numbuf, "%llu", ival);
+ addMacro(NULL, tagm->macroname, NULL, val, -1);
+ }
he->p.ptr = _free(he->p.ptr);
}
return 0;
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrfmt.c
============================================================================
$ cvs diff -u -r1.26 -r1.27 hdrfmt.c
--- rpm/rpmdb/hdrfmt.c 26 Oct 2007 04:00:52 -0000 1.26
+++ rpm/rpmdb/hdrfmt.c 3 Nov 2007 23:44:03 -0000 1.27
@@ -86,7 +86,7 @@
if (he->t != RPM_INT64_TYPE)
val = xstrdup(_("(invalid type)"));
else {
- int anint = data.i64p[ix];
+ uint64_t anint = data.ui64p[ix];
if (anint & RPMSENSE_TRIGGERPREIN)
val = xstrdup("prein");
else if (anint & RPMSENSE_TRIGGERIN)
@@ -115,7 +115,7 @@
if (he->t != RPM_INT64_TYPE) {
val = xstrdup(_("(invalid type)"));
} else {
- int_32 anint = he->p.i64p[0];
+ uint64_t anint = he->p.ui64p[0];
val = rpmPermsString(anint);
}
@@ -138,7 +138,7 @@
val = xstrdup(_("(invalid type)"));
} else {
char buf[15];
- unsigned anint = data.i64p[ix];
+ uint64_t anint = data.ui64p[ix];
buf[0] = '\0';
if (anint & RPMFILE_DOC)
strcat(buf, "d");
@@ -333,7 +333,7 @@
char * val;
const char * s = NULL;
char * t, * te;
- unsigned long long anint = 0;
+ uint64_t anint = 0;
int freeit = 0;
int xx;
@@ -375,16 +375,16 @@
/*@=globs =mods@*/
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- anint = data.i8p[ix];
+ anint = data.ui8p[ix];
break;
case RPM_INT16_TYPE:
anint = data.ui16p[ix]; /* XXX note unsigned */
break;
case RPM_INT32_TYPE:
- anint = data.i32p[ix];
+ anint = data.ui32p[ix];
break;
case RPM_INT64_TYPE:
- anint = data.i64p[ix];
+ anint = data.ui64p[ix];
break;
case RPM_NULL_TYPE:
default:
@@ -499,7 +499,7 @@
char * val;
const char * s = NULL;
char * t, * te;
- unsigned long long anint = 0;
+ uint64_t anint = 0;
int freeit = 0;
int lvl = 0;
int xx;
@@ -568,16 +568,16 @@
/*@=globs =mods@*/
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- anint = data.i8p[ix];
+ anint = data.ui8p[ix];
break;
case RPM_INT16_TYPE:
anint = data.ui16p[ix]; /* XXX note unsigned */
break;
case RPM_INT32_TYPE:
- anint = data.i32p[ix];
+ anint = data.ui32p[ix];
break;
case RPM_INT64_TYPE:
- anint = data.i64p[ix];
+ anint = data.ui64p[ix];
break;
case RPM_NULL_TYPE:
default:
@@ -755,7 +755,7 @@
if (he->t != RPM_INT64_TYPE) {
val = xstrdup(_("(invalid type)"));
} else {
- int anint = data.i64p[ix];
+ uint64_t anint = data.ui64p[ix];
char *t, *buf;
t = buf = alloca(32);
@@ -832,7 +832,7 @@
rpmTagData indices;
rpmTagData names;
rpmTagData versions;
- int numNames, numScripts;
+ uint32_t numNames, numScripts;
const char ** conds;
rpmTagData s;
char * item, * flagsStr;
@@ -846,7 +846,7 @@
_he->tag = he->tag;
_he->t = RPM_INT32_TYPE;
- _he->p.i32p = NULL;
+ _he->p.ui32p = NULL;
_he->c = 1;
_he->freeData = -1;
@@ -864,12 +864,12 @@
chptr = xstrdup("");
for (j = 0; j < numNames; j++) {
- if (indices.i32p[j] != i)
+ if (indices.ui32p[j] != i)
/*@innercontinue@*/ continue;
item = xmalloc(strlen(names.argv[j]) + strlen(versions.argv[j]) + 20);
- if (flags.i32p[j] & RPMSENSE_SENSEMASK) {
- _he->p.i32p = &flags.i32p[j];
+ if (flags.ui32p[j] & RPMSENSE_SENSEMASK) {
+ _he->p.ui32p = &flags.ui32p[j];
flagsStr = depflagsFormat(_he);
sprintf(item, "%s %s %s", names.argv[j], flagsStr, versions.argv[j]);
flagsStr = _free(flagsStr);
@@ -906,7 +906,7 @@
const char ** conds;
rpmTagData s;
int i, j, xx;
- int numScripts, numNames;
+ uint32_t numScripts, numNames;
he->freeData = 0;
if (!headerGetEntry(h, RPMTAG_TRIGGERINDEX, NULL, &indices, &numNames))
@@ -922,16 +922,16 @@
he->p.argv = conds = xmalloc(sizeof(*conds) * numScripts);
for (i = 0; i < numScripts; i++) {
for (j = 0; j < numNames; j++) {
- if (indices.i32p[j] != i)
+ if (indices.ui32p[j] != i)
/*@innercontinue@*/ continue;
- if (flags.i32p[j] & RPMSENSE_TRIGGERPREIN)
+ if (flags.ui32p[j] & RPMSENSE_TRIGGERPREIN)
conds[i] = xstrdup("prein");
- else if (flags.i32p[j] & RPMSENSE_TRIGGERIN)
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERIN)
conds[i] = xstrdup("in");
- else if (flags.i32p[j] & RPMSENSE_TRIGGERUN)
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERUN)
conds[i] = xstrdup("un");
- else if (flags.i32p[j] & RPMSENSE_TRIGGERPOSTUN)
+ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTUN)
conds[i] = xstrdup("postun");
else
conds[i] = xstrdup("");
@@ -1180,8 +1180,8 @@
{
he->tag = RPMTAG_DBINSTANCE;
he->t = RPM_INT32_TYPE;
- he->p.i32p = xmalloc(sizeof(*he->p.i32p));
- he->p.i32p[0] = headerGetInstance(h);
+ he->p.ui32p = xmalloc(sizeof(*he->p.ui32p));
+ he->p.ui32p[0] = headerGetInstance(h);
he->freeData = 1;
he->c = 1;
return 0;
@@ -1294,7 +1294,7 @@
size = sizeof(*fileNames.argv) * count;
for (i = 0; i < count; i++) {
const char * dn = NULL;
- (void) urlPath(dirNames.argv[dirIndexes.i32p[i]], &dn);
+ (void) urlPath(dirNames.argv[dirIndexes.ui32p[i]], &dn);
size += strlen(baseNames.argv[i]) + strlen(dn) + 1;
}
@@ -1302,7 +1302,7 @@
t = (char *)&fileNames.argv[count];
for (i = 0; i < count; i++) {
const char * dn = NULL;
- (void) urlPath(dirNames.argv[dirIndexes.i32p[i]], &dn);
+ (void) urlPath(dirNames.argv[dirIndexes.ui32p[i]], &dn);
fileNames.argv[i] = t;
t = stpcpy( stpcpy(t, dn), baseNames.argv[i]);
*t++ = '\0';
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrinline.h
============================================================================
$ cvs diff -u -r1.24 -r1.25 hdrinline.h
--- rpm/rpmdb/hdrinline.h 22 Oct 2007 02:48:42 -0000 1.24
+++ rpm/rpmdb/hdrinline.h 3 Nov 2007 23:44:03 -0000 1.25
@@ -226,7 +226,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerIsEntry(/*@null@*/ Header h, int_32 tag)
+int headerIsEntry(/*@null@*/ Header h, uint32_t tag)
/*@modifies h @*/
{
/*@-abstract@*/
@@ -305,7 +305,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerGetEntry(Header h, int_32 tag,
+int headerGetEntry(Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -328,7 +328,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerGetEntryMinMemory(Header h, int_32 tag,
+int headerGetEntryMinMemory(Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -354,7 +354,7 @@
*/
/*@mayexit@*/
/*@unused@*/ static inline
-int headerAddEntry(Header h, int_32 tag, rpmTagType type,
+int headerAddEntry(Header h, uint32_t tag, rpmTagType type,
const void * p, rpmTagCount c)
/*@modifies h @*/
{
@@ -376,7 +376,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerAppendEntry(Header h, int_32 tag, rpmTagType type,
+int headerAppendEntry(Header h, uint32_t tag, rpmTagType type,
const void * p, rpmTagCount c)
/*@modifies h @*/
{
@@ -394,7 +394,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerAddOrAppendEntry(Header h, int_32 tag, rpmTagType type,
+int headerAddOrAppendEntry(Header h, uint32_t tag, rpmTagType type,
const void * p, rpmTagCount c)
/*@modifies h @*/
{
@@ -422,7 +422,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerAddI18NString(Header h, int_32 tag, const char * string,
+int headerAddI18NString(Header h, uint32_t tag, const char * string,
const char * lang)
/*@modifies h @*/
{
@@ -440,7 +440,7 @@
* @return 1 on success, 0 on failure
*/
/*@unused@*/ static inline
-int headerModifyEntry(Header h, int_32 tag, rpmTagType type,
+int headerModifyEntry(Header h, uint32_t tag, rpmTagType type,
const void * p, rpmTagCount c)
/*@modifies h @*/
{
@@ -457,7 +457,7 @@
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
/*@unused@*/ static inline
-int headerRemoveEntry(Header h, int_32 tag)
+int headerRemoveEntry(Header h, uint32_t tag)
/*@modifies h @*/
{
return (h2hv(h)->hdrremove) (h, tag);
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.c
============================================================================
$ cvs diff -u -r1.112 -r1.113 header.c
--- rpm/rpmdb/header.c 26 Oct 2007 20:50:20 -0000 1.112
+++ rpm/rpmdb/header.c 3 Nov 2007 23:44:03 -0000 1.113
@@ -23,8 +23,6 @@
/*@unchecked@*/
int _newmagic = 0; /* XXX Change header magic? */
/*@unchecked@*/
-static int _jbj = 1; /* XXX private debugging */
-/*@unchecked@*/
static int _usehge = 1; /* XXX Use headerGetExtension? */
/*@unchecked@*/
int _tagcache = 1; /* XXX Cache tag data persistently? */
@@ -949,7 +947,7 @@
* @return header entry
*/
static /*@null@*/
-indexEntry findEntry(/*@null@*/ Header h, int_32 tag, rpmTagType type)
+indexEntry findEntry(/*@null@*/ Header h, uint32_t tag, rpmTagType type)
/*@modifies h @*/
{
indexEntry entry, entry2, last;
@@ -997,7 +995,7 @@
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
static
-int headerRemoveEntry(Header h, int_32 tag)
+int headerRemoveEntry(Header h, uint32_t tag)
/*@modifies h @*/
{
indexEntry last = h->index + h->indexUsed;
@@ -1520,7 +1518,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerIsEntry(/*@null@*/Header h, int_32 tag)
+int headerIsEntry(/*@null@*/Header h, uint32_t tag)
/*@*/
{
/*@-mods@*/ /*@ FIX: h modified by sort. */
@@ -1559,13 +1557,13 @@
* 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;
+ uint32_t * ei = ((uint32_t *)entry->data) - 2;
/*@-castexpose@*/
entryInfo pe = (entryInfo) (ei + 2);
/*@=castexpose@*/
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);
/*@-sizeoftype@*/
rdl = entry->rdlen;
@@ -1578,7 +1576,7 @@
rdl += REGION_TAG_COUNT;
}
- (*p).i32p = ei = xmalloc(count);
+ (*p).ui32p = ei = xmalloc(count);
ei[0] = htonl(ril);
ei[1] = htonl(rdl);
@@ -1785,7 +1783,7 @@
* @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, uint32_t tag,
/*@null@*/ /*@out@*/ rpmTagType * type,
/*@null@*/ /*@out@*/ rpmTagData * p,
/*@null@*/ /*@out@*/ rpmTagCount * c,
@@ -1859,7 +1857,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerGetExtension(Header h, int_32 tag,
+int headerGetExtension(Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -1911,18 +1909,19 @@
/*@fallthrough@*/
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- nb = he->c * sizeof(*he->p.i8p);
+ nb = he->c * sizeof(*he->p.ui8p);
break;
case RPM_INT16_TYPE:
- nb = he->c * sizeof(*he->p.i16p);
+ nb = he->c * sizeof(*he->p.ui16p);
break;
case RPM_INT32_TYPE:
- nb = he->c * sizeof(*he->p.i32p);
+ nb = he->c * sizeof(*he->p.ui32p);
break;
case RPM_INT64_TYPE:
- nb = he->c * sizeof(*he->p.i64p);
+ nb = he->c * sizeof(*he->p.ui64p);
break;
case RPM_I18NSTRING_TYPE:
+assert(he->c == 1); /* XXX stop unimplemented oversights. */
case RPM_STRING_TYPE:
if (he->p.str)
nb = strlen(he->p.str) + 1;
@@ -1966,7 +1965,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerGetEntry(Header h, int_32 tag,
+int headerGetEntry(Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -1996,7 +1995,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerGetEntryMinMemory(Header h, int_32 tag,
+int headerGetEntryMinMemory(Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -2013,7 +2012,7 @@
return rc;
}
-int headerGetRawEntry(Header h, int_32 tag, rpmTagType * type, hRET_t * p, rpmTagCount * c)
+int headerGetRawEntry(Header h, uint32_t tag, rpmTagType * type, hRET_t * p, rpmTagCount * c)
{
indexEntry entry;
int rc;
@@ -2106,7 +2105,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAddEntry(Header h, int_32 tag, rpmTagType type, const void * p, rpmTagCount c)
+int headerAddEntry(Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
/*@modifies h @*/
{
indexEntry entry;
@@ -2165,7 +2164,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAppendEntry(Header h, int_32 tag, rpmTagType type,
+int headerAppendEntry(Header h, uint32_t tag, rpmTagType type,
const void * p, rpmTagCount c)
/*@modifies h @*/
{
@@ -2216,7 +2215,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAddOrAppendEntry(Header h, int_32 tag, rpmTagType type,
+int headerAddOrAppendEntry(Header h, uint32_t tag, rpmTagType type,
const void * p, rpmTagCount c)
/*@modifies h @*/
{
@@ -2246,7 +2245,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAddI18NString(Header h, int_32 tag, const char * string,
+int headerAddI18NString(Header h, uint32_t tag, const char * string,
const char * lang)
/*@modifies h @*/
{
@@ -2389,7 +2388,7 @@
* @return 1 on success, 0 on failure
*/
static
-int headerModifyEntry(Header h, int_32 tag, rpmTagType type,
+int headerModifyEntry(Header h, uint32_t tag, rpmTagType type,
const void * p, rpmTagCount c)
/*@modifies h @*/
{
@@ -2914,16 +2913,16 @@
break;
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- ival = he->p.i8p[ix];
+ ival = he->p.ui8p[ix];
break;
case RPM_INT16_TYPE:
ival = he->p.ui16p[ix]; /* XXX note unsigned. */
break;
case RPM_INT32_TYPE:
- ival = he->p.i32p[ix];
+ ival = he->p.ui32p[ix];
break;
case RPM_INT64_TYPE:
- ival = he->p.i64p[ix];
+ ival = he->p.ui64p[ix];
break;
case RPM_STRING_TYPE:
istr = he->p.str;
@@ -3069,12 +3068,12 @@
if (he->t == RPM_INT32_TYPE) {
nb = 20;
val = xmalloc(nb);
- snprintf(val, nb, "%d", data.i32p[0]);
+ snprintf(val, nb, "%u", data.ui32p[0]);
val[nb-1] = '\0';
} else if (he->t == RPM_INT64_TYPE) {
nb = 40;
val = xmalloc(40);
- snprintf(val, nb, "%lld", data.i64p[0]);
+ snprintf(val, nb, "%llu", data.ui64p[0]);
val[nb-1] = '\0';
} else if (he->t == RPM_STRING_TYPE) {
const char * s = data.str;
@@ -3521,7 +3520,7 @@
char * val = NULL;
size_t need = 0;
char * t, * te;
- int_64 ival = 0;
+ uint64_t ival = 0;
rpmTagCount countBuf;
int xx;
@@ -3554,7 +3553,7 @@
countBuf = he->c;
he = rpmheClean(he);
he->t = RPM_INT32_TYPE;
- he->p.i32p = &countBuf;
+ he->p.ui32p = &countBuf;
he->c = 1;
he->freeData = 0;
}
@@ -3591,20 +3590,20 @@
break;
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- ival = he->p.i8p[element];
+ ival = he->p.ui8p[element];
break;
case RPM_INT16_TYPE:
ival = he->p.ui16p[element]; /* XXX note unsigned. */
break;
case RPM_INT32_TYPE:
- ival = he->p.i32p[element];
+ ival = he->p.ui32p[element];
break;
case RPM_INT64_TYPE:
- ival = he->p.i64p[element];
+ ival = he->p.ui64p[element];
break;
}
vhe->t = RPM_INT64_TYPE;
- vhe->p.i64p = &ival;
+ vhe->p.ui64p = &ival;
vhe->c = he->c;
/* XXX TODO: force array representation? */
vhe->ix = (he->c > 1 ? 0 : -1);
@@ -4050,7 +4049,7 @@
void headerCopyTags(Header headerFrom, Header headerTo, hTAG_t tagstocopy)
/*@modifies headerTo @*/
{
- int * tagno;
+ unsigned int * tagno;
if (headerFrom == headerTo)
return;
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.h
============================================================================
$ cvs diff -u -r1.56 -r1.57 header.h
--- rpm/rpmdb/header.h 26 Oct 2007 02:50:46 -0000 1.56
+++ rpm/rpmdb/header.h 3 Nov 2007 23:44:03 -0000 1.57
@@ -140,7 +140,7 @@
/** \ingroup header
*/
-typedef int_32 rpmTagCount;
+typedef uint32_t rpmTagCount;
/** \ingroup header
*/
@@ -153,17 +153,13 @@
#if !defined(SWIG)
union rpmDataType_u {
void * ptr;
- int_8 * i8p; /*!< RPM_INT8_TYPE | RPM_CHAR_TYPE */
- int_32 * i32p; /*!< RPM_INT32_TYPE */
- int_16 * i16p; /*!< RPM_INT16_TYPE */
- int_64 * i64p; /*!< RPM_INT64_TYPE */
+ uint8_t * ui8p; /*!< RPM_INT8_TYPE | RPM_CHAR_TYPE */
+ uint16_t * ui16p; /*!< RPM_INT16_TYPE */
+ uint32_t * ui32p; /*!< RPM_INT32_TYPE */
+ uint64_t * ui64p; /*!< RPM_INT64_TYPE */
const char * str; /*!< RPM_STRING_TYPE */
unsigned char * blob; /*!< RPM_BIN_TYPE */
const char ** argv; /*!< RPM_STRING_ARRAY_TYPE */
- uint_8 * ui8p;
- uint_16 * ui16p;
- uint_32 * ui32p;
- uint_64 * ui64p;
HE_t * he;
};
#endif
@@ -171,7 +167,7 @@
/** \ingroup header
*/
-typedef int_32 * hTAG_t;
+typedef uint32_t * hTAG_t;
typedef rpmTagType * hTYP_t;
typedef rpmTagData * hPTR_t;
typedef rpmTagCount * hCNT_t;
@@ -181,7 +177,7 @@
/*@-typeuse -fielduse@*/
#if !defined(SWIG)
struct _HE_s {
- int_32 tag;
+ uint32_t tag;
rpmTagType t;
/*@owned@*/ /*@null@*/
rpmTagData p;
@@ -207,8 +203,8 @@
struct headerTagTableEntry_s {
/*@observer@*/ /*@relnull@*/
const char * name; /*!< Tag name. */
- int val; /*!< Tag numeric value. */
- int type; /*!< Tag type. */
+ uint32_t val; /*!< Tag numeric value. */
+ rpmTagType type; /*!< Tag type. */
};
#endif
@@ -406,7 +402,7 @@
* @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, uint32_t tag)
/*@modifies h @*/;
/** \ingroup header
@@ -546,7 +542,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRisentry) (/*@null@*/Header h, int_32 tag)
+int (*HDRisentry) (/*@null@*/Header h, uint32_t tag)
/*@*/;
/** \ingroup header
@@ -572,7 +568,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRext) (Header h, int_32 tag,
+int (*HDRext) (Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -592,7 +588,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRget) (Header h, int_32 tag,
+int (*HDRget) (Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -611,7 +607,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRgetmin) (Header h, int_32 tag,
+int (*HDRgetmin) (Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ -632,7 +628,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRadd) (Header h, int_32 tag, rpmTagType type, const void * p, rpmTagCount c)
+int (*HDRadd) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ -650,7 +646,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRappend) (Header h, int_32 tag, rpmTagType type, const void * p, rpmTagCount c)
+int (*HDRappend) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ -664,7 +660,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRaddorappend) (Header h, int_32 tag, rpmTagType type, const void * p, rpmTagCount c)
+int (*HDRaddorappend) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ -688,7 +684,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRaddi18n) (Header h, int_32 tag, const char * string,
+int (*HDRaddi18n) (Header h, uint32_t tag, const char * string,
const char * lang)
/*@modifies h @*/;
@@ -703,7 +699,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRmodify) (Header h, int_32 tag, rpmTagType type, const void * p, rpmTagCount c)
+int (*HDRmodify) (Header h, uint32_t tag, rpmTagType type, const void * p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ -716,7 +712,7 @@
* @return 0 on success, 1 on failure (INCONSISTENT)
*/
typedef
-int (*HDRremove) (Header h, int_32 tag)
+int (*HDRremove) (Header h, uint32_t tag)
/*@modifies h @*/;
/** \ingroup header
@@ -975,7 +971,7 @@
* @param h header
* @return header color
*/
-uint_32 hGetColor(Header h)
+uint32_t hGetColor(Header h)
/*@modifies h @*/;
/** \ingroup header
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header_internal.h
============================================================================
$ cvs diff -u -r1.26 -r1.27 header_internal.h
--- rpm/rpmdb/header_internal.h 20 Oct 2007 18:52:34 -0000 1.26
+++ rpm/rpmdb/header_internal.h 3 Nov 2007 23:44:03 -0000 1.27
@@ -202,7 +202,7 @@
*/
/*@-exportlocal@*/
/*@-incondefs@*/
-int headerGetRawEntry(Header h, int_32 tag,
+int headerGetRawEntry(Header h, uint32_t tag,
/*@null@*/ /*@out@*/ hTYP_t type,
/*@null@*/ /*@out@*/ hRET_t * p,
/*@null@*/ /*@out@*/ hCNT_t c)
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/rpmdb.c
============================================================================
$ cvs diff -u -r1.197 -r1.198 rpmdb.c
--- rpm/rpmdb/rpmdb.c 3 Nov 2007 13:19:23 -0000 1.197
+++ rpm/rpmdb/rpmdb.c 3 Nov 2007 23:44:03 -0000 1.198
@@ -883,8 +883,8 @@
he->tag = RPMTAG_INSTALLTID;
if (hge(h, he, 0)) {
struct utimbuf stamp;
- stamp.actime = he->p.i32p[0];
- stamp.modtime = he->p.i32p[0];
+ stamp.actime = he->p.ui32p[0];
+ stamp.modtime = he->p.ui32p[0];
if (!Utime(fn, &stamp))
rpmlog(RPMLOG_DEBUG, " +++ %s\n", fn);
}
@@ -2176,7 +2176,7 @@
continue;
}
he->t = RPM_INT32_TYPE;
- he->p.i32p = xcalloc(1, sizeof(*he->p.i32p));
+ he->p.ui32p = xcalloc(1, sizeof(*he->p.ui32p));
he->c = 1;
}
@@ -2186,7 +2186,7 @@
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
for (j = 0; j < he->c; j++) {
- sprintf(numbuf, "%d", he->p.i8p[j]);
+ sprintf(numbuf, "%u", he->p.ui8p[j]);
rc = mireRegexec(mire, numbuf);
if ((!rc && !mire->notmatch) || (rc && mire->notmatch))
anymatch++;
@@ -2194,7 +2194,7 @@
/*@switchbreak@*/ break;
case RPM_INT16_TYPE:
for (j = 0; j < he->c; j++) {
- sprintf(numbuf, "%d", he->p.i16p[j]);
+ sprintf(numbuf, "%u", he->p.ui16p[j]);
rc = mireRegexec(mire, numbuf);
if ((!rc && !mire->notmatch) || (rc && mire->notmatch))
anymatch++;
@@ -2202,7 +2202,7 @@
/*@switchbreak@*/ break;
case RPM_INT32_TYPE:
for (j = 0; j < he->c; j++) {
- sprintf(numbuf, "%d", he->p.i32p[j]);
+ sprintf(numbuf, "%u", he->p.ui32p[j]);
rc = mireRegexec(mire, numbuf);
if ((!rc && !mire->notmatch) || (rc && mire->notmatch))
anymatch++;
@@ -2210,7 +2210,7 @@
/*@switchbreak@*/ break;
case RPM_INT64_TYPE:
for (j = 0; j < he->c; j++) {
- sprintf(numbuf, "%lld", he->p.i64p[j]);
+ sprintf(numbuf, "%llu", he->p.ui64p[j]);
rc = mireRegexec(mire, numbuf);
if ((!rc && !mire->notmatch) || (rc && mire->notmatch))
anymatch++;
@@ -2930,20 +2930,20 @@
/*@switchbreak@*/ break;
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- key->size = sizeof(*he->p.i8p);
-/*@i@*/ key->data = he->p.i8p + i;
+ key->size = sizeof(*he->p.ui8p);
+/*@i@*/ key->data = he->p.ui8p + i;
/*@switchbreak@*/ break;
case RPM_INT16_TYPE:
- key->size = sizeof(*he->p.i16p);
-/*@i@*/ key->data = he->p.i16p + i;
+ key->size = sizeof(*he->p.ui16p);
+/*@i@*/ key->data = he->p.ui16p + i;
/*@switchbreak@*/ break;
case RPM_INT32_TYPE:
- key->size = sizeof(*he->p.i32p);
-/*@i@*/ key->data = he->p.i32p + i;
+ key->size = sizeof(*he->p.ui32p);
+/*@i@*/ key->data = he->p.ui32p + i;
/*@switchbreak@*/ break;
case RPM_INT64_TYPE:
- key->size = sizeof(*he->p.i64p);
-/*@i@*/ key->data = he->p.i64p + i;
+ key->size = sizeof(*he->p.ui64p);
+/*@i@*/ key->data = he->p.ui64p + i;
/*@switchbreak@*/ break;
case RPM_OPENPGP_TYPE:
case RPM_ASN1_TYPE:
@@ -3129,10 +3129,10 @@
xx = headerRemoveEntry(h, RPMTAG_REMOVETID);
#endif
if (iid != 0 && iid != -1) {
- int_32 tid = iid;
+ uint32_t tid = iid;
he->tag = RPMTAG_INSTALLTID;
he->t = RPM_INT32_TYPE;
- he->p.i32p = &tid;
+ he->p.ui32p = &tid;
he->c = 1;
if (!headerIsEntry(h, he->tag))
xx = hae(h, he, 0);
@@ -3395,8 +3395,8 @@
/*@switchbreak@*/ break;
case RPMTAG_REQUIRENAME:
/* Filter out install prerequisites. */
- if (requireFlags.i32p
- && isInstallPreReq(requireFlags.i32p[i]))
+ if (requireFlags.ui32p
+ && isInstallPreReq(requireFlags.ui32p[i]))
/*@innercontinue@*/ continue;
/*@switchbreak@*/ break;
case RPMTAG_TRIGGERNAME:
@@ -3421,20 +3421,20 @@
/*@switchbreak@*/ break;
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
- key->size = sizeof(*he->p.i8p);
-/*@i@*/ key->data = he->p.i8p + i;
+ key->size = sizeof(*he->p.ui8p);
+/*@i@*/ key->data = he->p.ui8p + i;
/*@switchbreak@*/ break;
case RPM_INT16_TYPE:
- key->size = sizeof(*he->p.i16p);
-/*@i@*/ key->data = he->p.i16p + i;
+ key->size = sizeof(*he->p.ui16p);
+/*@i@*/ key->data = he->p.ui16p + i;
/*@switchbreak@*/ break;
case RPM_INT32_TYPE:
- key->size = sizeof(*he->p.i32p);
-/*@i@*/ key->data = he->p.i32p + i;
+ key->size = sizeof(*he->p.ui32p);
+/*@i@*/ key->data = he->p.ui32p + i;
/*@switchbreak@*/ break;
case RPM_INT64_TYPE:
- key->size = sizeof(*he->p.i64p);
-/*@i@*/ key->data = he->p.i64p + i;
+ key->size = sizeof(*he->p.ui64p);
+/*@i@*/ key->data = he->p.ui64p + i;
/*@switchbreak@*/ break;
case RPM_OPENPGP_TYPE:
case RPM_ASN1_TYPE:
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/argv.h
============================================================================
$ cvs diff -u -r1.4 -r1.5 argv.h
--- rpm/rpmio/argv.h 6 Oct 2007 19:40:23 -0000 1.4
+++ rpm/rpmio/argv.h 3 Nov 2007 23:44:04 -0000 1.5
@@ -8,7 +8,7 @@
typedef const char * ARGstr_t;
typedef ARGstr_t * ARGV_t;
-typedef int * ARGint_t;
+typedef uint32_t * ARGint_t;
struct ARGI_s {
unsigned nvals;
ARGint_t vals;
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmsw.c
============================================================================
$ cvs diff -u -r2.12 -r2.13 rpmsw.c
--- rpm/rpmio/rpmsw.c 10 Jul 2007 12:50:02 -0000 2.12
+++ rpm/rpmio/rpmsw.c 3 Nov 2007 23:44:04 -0000 2.13
@@ -118,7 +118,7 @@
rpmtime_t rpmswDiff(rpmsw end, rpmsw begin)
{
- unsigned long long ticks = 0;
+ uint64_t ticks = 0;
if (end == NULL || begin == NULL)
return 0;
@@ -184,7 +184,7 @@
#if defined(HP_TIMING_NOW)
rpmtime_t cycles;
rpmtime_t sum_usecs = 0;
- unsigned long long sum_cycles = 0;
+ uint64_t sum_cycles = 0;
#endif
int i;
@@ .
Received on Sun Nov 4 00:44:04 2007