diff -dur rpm-4.4.2.3.ORIG/db/dbinc/db_int.in rpm-4.4.2.3/db/dbinc/db_int.in --- rpm-4.4.2.3.ORIG/db/dbinc/db_int.in 2008-04-01 01:28:21.000000000 -0600 +++ rpm-4.4.2.3/db/dbinc/db_int.in 2008-05-19 16:26:09.000000000 -0600 @@ -68,8 +68,13 @@ #define INT64_MIN (-INT64_MAX-1) #define UINT64_MAX 18446744073709551615ULL +#if SIZEOF_LONG == 8 +#define INT64_FMT "%ld" +#define UINT64_FMT "%lu" +#else #define INT64_FMT "%lld" #define UINT64_FMT "%llu" +#endif /* SIZEOF_LONG == 8 */ #endif /* DB_WIN32 */ #endif /* HAVE_LONG_LONG && HAVE_UNSIGNED_LONG_LONG */ diff -dur rpm-4.4.2.3.ORIG/file/src/funcs.c rpm-4.4.2.3/file/src/funcs.c --- rpm-4.4.2.3.ORIG/file/src/funcs.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/file/src/funcs.c 2008-05-19 16:26:09.000000000 -0600 @@ -36,7 +36,7 @@ #endif #ifndef SIZE_T_MAX #ifdef __LP64__ -#define SIZE_T_MAX (size_t)0xfffffffffffffffffU +#define SIZE_T_MAX (size_t)0xffffffffffffffffU #else #define SIZE_T_MAX (size_t)0xffffffffU #endif diff -dur rpm-4.4.2.3.ORIG/lib/psm.c rpm-4.4.2.3/lib/psm.c --- rpm-4.4.2.3.ORIG/lib/psm.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/lib/psm.c 2008-05-19 16:26:09.000000000 -0600 @@ -2127,8 +2127,8 @@ * score entry. */ rpmMessage(RPMMESS_DEBUG, - _("Attempting to mark %s as installed in score board(%u).\n"), - rpmteN(psm->te), (unsigned) score); + _("Attempting to mark %s as installed in score board(%p).\n"), + rpmteN(psm->te), score); se = rpmtsScoreGetEntry(score, rpmteN(psm->te)); if (se != NULL) se->installed = 1; } @@ -2160,8 +2160,8 @@ * score entry. */ rpmMessage(RPMMESS_DEBUG, - _("Attempting to mark %s as erased in score board(0x%x).\n"), - rpmteN(psm->te), (unsigned) score); + _("Attempting to mark %s as erased in score board(%p).\n"), + rpmteN(psm->te), score); se = rpmtsScoreGetEntry(score, rpmteN(psm->te)); if (se != NULL) se->erased = 1; } diff -dur rpm-4.4.2.3.ORIG/lib/query.c rpm-4.4.2.3/lib/query.c --- rpm-4.4.2.3.ORIG/lib/query.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/lib/query.c 2008-05-19 16:26:09.000000000 -0600 @@ -567,8 +567,8 @@ mybase = 16; } } - iid = strtoul(myarg, &end, mybase); - if ((*end) || (end == arg) || (iid == ULONG_MAX)) { + iid = (unsigned int) strtoul(myarg, &end, mybase); + if ((*end) || (end == arg) || (iid == UINT_MAX)) { rpmError(RPMERR_QUERY, _("malformed %s: %s\n"), "tid", arg); return 1; } @@ -654,8 +654,8 @@ mybase = 16; } } - recOffset = strtoul(myarg, &end, mybase); - if ((*end) || (end == arg) || (recOffset == ULONG_MAX)) { + recOffset = (unsigned int) strtoul(myarg, &end, mybase); + if ((*end) || (end == arg) || (recOffset == UINT_MAX)) { rpmError(RPMERR_QUERYINFO, _("invalid package number: %s\n"), arg); return 1; } diff -dur rpm-4.4.2.3.ORIG/lib/rpmal.c rpm-4.4.2.3/lib/rpmal.c --- rpm-4.4.2.3.ORIG/lib/rpmal.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/lib/rpmal.c 2008-05-19 16:26:09.000000000 -0600 @@ -344,7 +344,7 @@ /*@-modfilesys@*/ if (_rpmal_debug) -fprintf(stderr, "--- die[%5d] %p [%3d] %s\n", (die - al->dirs), die, die->dirNameLen, die->dirName); +fprintf(stderr, "--- die[%5td] %p [%3d] %s\n", (die - al->dirs), die, die->dirNameLen, die->dirName); /*@=modfilesys@*/ last = die->numFiles; @@ -357,7 +357,7 @@ if (i < die->numFiles) { /*@-modfilesys@*/ if (_rpmal_debug) -fprintf(stderr, "\t%p[%3d] memmove(%p:%p,%p:%p,0x%x) %s <- %s\n", die->files, die->numFiles, fie, fie->baseName, fie+1, (fie+1)->baseName, ((die->numFiles - i) * sizeof(*fie)), fie->baseName, (fie+1)->baseName); +fprintf(stderr, "\t%p[%3d] memmove(%p:%p,%p:%p,0x%zx) %s <- %s\n", die->files, die->numFiles, fie, fie->baseName, fie+1, (fie+1)->baseName, ((die->numFiles - i) * sizeof(*fie)), fie->baseName, (fie+1)->baseName); /*@=modfilesys@*/ /*@-bounds@*/ @@ -366,7 +366,7 @@ } /*@-modfilesys@*/ if (_rpmal_debug) -fprintf(stderr, "\t%p[%3d] memset(%p,0,0x%x) %p [%3d] %s\n", die->files, die->numFiles, die->files + die->numFiles, sizeof(*fie), fie->baseName, fie->baseNameLen, fie->baseName); +fprintf(stderr, "\t%p[%3d] memset(%p,0,0x%zx) %p [%3d] %s\n", die->files, die->numFiles, die->files + die->numFiles, sizeof(*fie), fie->baseName, fie->baseNameLen, fie->baseName); /*@=modfilesys@*/ memset(die->files + die->numFiles, 0, sizeof(*fie)); /* overkill */ @@ -383,7 +383,7 @@ if ((die - al->dirs) < al->numDirs) { /*@-modfilesys@*/ if (_rpmal_debug) -fprintf(stderr, " die[%5d] memmove(%p,%p,0x%x)\n", (die - al->dirs), die, die+1, ((al->numDirs - (die - al->dirs)) * sizeof(*die))); +fprintf(stderr, " die[%5td] memmove(%p,%p,0x%zx)\n", (die - al->dirs), die, die+1, ((al->numDirs - (die - al->dirs)) * sizeof(*die))); /*@=modfilesys@*/ /*@-bounds@*/ @@ -393,7 +393,7 @@ /*@-modfilesys@*/ if (_rpmal_debug) -fprintf(stderr, " die[%5d] memset(%p,0,0x%x)\n", al->numDirs, al->dirs + al->numDirs, sizeof(*die)); +fprintf(stderr, " die[%5d] memset(%p,0,0x%zx)\n", al->numDirs, al->dirs + al->numDirs, sizeof(*die)); /*@=modfilesys@*/ memset(al->dirs + al->numDirs, 0, sizeof(*al->dirs)); /* overkill */ } diff -dur rpm-4.4.2.3.ORIG/lib/rpmgi.c rpm-4.4.2.3/lib/rpmgi.c --- rpm-4.4.2.3.ORIG/lib/rpmgi.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/lib/rpmgi.c 2008-05-19 16:26:09.000000000 -0600 @@ -365,7 +365,7 @@ if (!res) { if (_rpmgi_debug < 0) -fprintf(stderr, "\tav %p[%d]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (av - gi->argv), *av, tagName(tag), pat); +fprintf(stderr, "\tav %p[%td]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (av - gi->argv), *av, tagName(tag), pat); res = rpmdbSetIteratorRE(gi->mi, tag, RPMMIRE_DEFAULT, pat); } a = _free(a); diff -dur rpm-4.4.2.3.ORIG/python/rpmfts-py.c rpm-4.4.2.3/python/rpmfts-py.c --- rpm-4.4.2.3.ORIG/python/rpmfts-py.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/python/rpmfts-py.c 2008-05-19 16:26:09.000000000 -0600 @@ -63,7 +63,7 @@ if (msg) fprintf(stderr, "*** %s(%p)", msg, s); if (s) - fprintf(stderr, " %d %d ftsp %p fts %p\n", s->ob_refcnt, s->active, s->ftsp, s->fts); + fprintf(stderr, " %zd %d ftsp %p fts %p\n", s->ob_refcnt, s->active, s->ftsp, s->fts); } static int diff -dur rpm-4.4.2.3.ORIG/rpmdb/sqlite.c rpm-4.4.2.3/rpmdb/sqlite.c --- rpm-4.4.2.3.ORIG/rpmdb/sqlite.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/rpmdb/sqlite.c 2008-05-19 16:26:09.000000000 -0600 @@ -374,7 +374,7 @@ const void * v = sqlite3_column_blob(scp->pStmt, i); nb = sqlite3_column_bytes(scp->pStmt, i); if (_debug) -fprintf(stderr, "\t%d %s %s %p[%d]\n", i, cname, vtype, v, nb); +fprintf(stderr, "\t%d %s %s %p[%zd]\n", i, cname, vtype, v, nb); if (nb > 0) { void * t = xmalloc(nb); scp->av[scp->ac] = memcpy(t, v, nb); diff -dur rpm-4.4.2.3.ORIG/rpmio/rpmdav.c rpm-4.4.2.3/rpmio/rpmdav.c --- rpm-4.4.2.3.ORIG/rpmio/rpmdav.c 2008-04-01 01:28:22.000000000 -0600 +++ rpm-4.4.2.3/rpmio/rpmdav.c 2008-05-19 16:26:09.000000000 -0600 @@ -1068,7 +1068,7 @@ rc = ne_read_response_block(fd->req, buf, count); if (_dav_debug < 0) { -fprintf(stderr, "*** davRead(%p,%p,0x%x) rc 0x%x\n", cookie, buf, count, (unsigned)rc); +fprintf(stderr, "*** davRead(%p,%p,0x%zx) rc 0x%zx\n", cookie, buf, count, (size_t)rc); #ifdef DYING hexdump(buf, rc); #endif @@ -1106,7 +1106,7 @@ rc = (xx == 0 ? count : -1); if (_dav_debug < 0) -fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, count, rc); +fprintf(stderr, "*** davWrite(%p,%p,0x%zx) rc 0x%zx\n", cookie, buf, count, (size_t)rc); #ifdef DYING if (count > 0) hexdump(buf, count);