if (spec->BANames && spec->BACount > 0) {
(void) headerAddEntry(spec->sourceHeader, RPMTAG_BUILDARCHS,
RPM_STRING_ARRAY_TYPE,
- spec->BANames, spec->BACount);
+ spec->BANames, (rpm_count_t) spec->BACount);
}
}
xx = poptParseArgvString(line, &argc, &argv);
if (argc)
- xx = headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, argv, argc);
+ xx = headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE,
+ argv, (rpm_count_t) argc);
argv = _free(argv);
}
} else {
if (progArgc == 1)
(void) headerAddEntry(pkg->header, progtag, RPM_STRING_TYPE,
- *progArgv, progArgc);
+ *progArgv, (rpm_count_t) progArgc);
else {
(void) rpmlibNeedsFeature(pkg->header,
"ScriptletInterpreterArgs", "4.0.3-1");
(void) headerAddEntry(pkg->header, progtag, RPM_STRING_ARRAY_TYPE,
- progArgv, progArgc);
+ progArgv, (rpm_count_t) progArgc);
}
if (*p != '\0')
const char * N;
const char * EVR;
int genConfigDeps;
- int c;
+ rpm_count_t c;
int rc = 0;
int xx;
item = xmalloc(strlen(names[j]) + strlen(versions[j]) + 20);
if (flags[j] & RPMSENSE_SENSEMASK) {
buf[0] = '%', buf[1] = '\0';
- flagsStr = depflagsFormat(RPM_INT32_TYPE, flags, buf, 0, j);
+ flagsStr = depflagsFormat(RPM_INT32_TYPE, flags, buf, 0, 0);
sprintf(item, "%s %s %s", names[j], flagsStr, versions[j]);
flagsStr = _free(flagsStr);
} else {
xx = hae(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE,
baseNames, count);
xx = hae(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
- dirNames, dirIndex + 1);
+ dirNames, (rpm_count_t) dirIndex + 1);
}
fileNames = hfd(fileNames, fnt);
dig->nbytes = 0;
sig = memcpy(xmalloc(siglen), dataStart + info->offset, siglen);
- (void) rpmtsSetSig(ts, info->tag, info->type, sig, info->count);
+ (void) rpmtsSetSig(ts, info->tag, info->type, sig, (size_t) info->count);
switch (info->tag) {
case RPMTAG_RSAHEADER:
* Run internal Lua script.
*/
static rpmRC runLuaScript(rpmpsm psm, Header h, rpmTag stag,
- int progArgc, const char **progArgv,
+ unsigned int progArgc, const char **progArgv,
const char *script, int arg1, int arg2)
{
const rpmts ts = psm->ts;
* @return 0 on success
*/
static rpmRC runScript(rpmpsm psm, Header h, rpmTag stag,
- int progArgc, const char ** progArgv,
+ unsigned int progArgc, const char ** progArgv,
const char * script, int arg1, int arg2)
{
const rpmts ts = psm->ts;
if (psm->goal == PSM_PKGINSTALL) {
int32_t installTime = (int32_t) time(NULL);
- int fc = rpmfiFC(fi);
+ rpm_count_t fc = rpmfiFC(fi);
if (fi->h == NULL) break; /* XXX can't happen */
if (fi->fstates != NULL && fc > 0)
return fi;
}
-int rpmfiFC(rpmfi fi)
+rpm_count_t rpmfiFC(rpmfi fi)
{
return (fi != NULL ? fi->fc : 0);
}
-int rpmfiDC(rpmfi fi)
+rpm_count_t rpmfiDC(rpmfi fi)
{
return (fi != NULL ? fi->dc : 0);
}
/* Add relocation values to the header */
if (numValid) {
const char ** actualRelocations;
- int numActual;
+ rpm_count_t numActual;
actualRelocations = xmalloc(numValid * sizeof(*actualRelocations));
numActual = 0;
* @param fi file info set
* @return current file count
*/
-int rpmfiFC(rpmfi fi);
+rpm_count_t rpmfiFC(rpmfi fi);
/** \ingroup rpmfi
* Return current file index from file info set.
* @param fi file info set
* @return current directory count
*/
-int rpmfiDC(rpmfi fi);
+rpm_count_t rpmfiDC(rpmfi fi);
/** \ingroup rpmfi
* Return current directory index from file info set.
return sig;
}
-int32_t rpmtsSiglen(const rpmts ts)
+size_t rpmtsSiglen(const rpmts ts)
{
- int32_t siglen = 0;
+ size_t siglen = 0;
if (ts != NULL)
siglen = ts->siglen;
return siglen;
}
int rpmtsSetSig(rpmts ts,
- int32_t sigtag, int32_t sigtype, const void * sig, int32_t siglen)
+ int32_t sigtag, int32_t sigtype, const void * sig, size_t siglen)
{
if (ts != NULL) {
if (ts->sig && ts->sigtype)
* @param ts transaction set
* @return signature tag data length
*/
-int32_t rpmtsSiglen(const rpmts ts);
+size_t rpmtsSiglen(const rpmts ts);
/** \ingroup rpmts
* Set signature tag info, i.e. from header.
*/
int rpmtsSetSig(rpmts ts,
int32_t sigtag, int32_t sigtype,
- const void * sig, int32_t siglen);
+ const void * sig, size_t siglen);
/** \ingroup rpmts
* Get OpenPGP packet parameters, i.e. signature/pubkey constants.
* @return 0 on success, 1 on failure
*/
static int makeGPGSignature(const char * file, int32_t * sigTagp,
- uint8_t ** pktp, int32_t * pktlenp,
+ uint8_t ** pktp, size_t * pktlenp,
const char * passPhrase)
{
char * sigfile = alloca(strlen(file)+sizeof(".sig"));
Header h = NULL;
FD_t fd = NULL;
uint8_t * pkt;
- int32_t pktlen;
+ rpm_count_t pktlen;
const char * fn = NULL;
const char * SHA1 = NULL;
int ret = -1; /* assume failure. */
{
struct stat st;
uint8_t * pkt;
- int32_t pktlen;
+ rpm_count_t pktlen;
int ret = -1; /* assume failure. */
switch (sigTag) {
const char ** strArray;
int length;
int ghosts;
- int i, langNum;
+ rpm_count_t i, langNum;
char * buf;
table = findEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE);
if (!table && !entry) {
const char * charArray[2];
- int count = 0;
+ rpm_count_t count = 0;
if (!lang || (lang[0] == 'C' && lang[1] == '\0')) {
charArray[count++] = "C";
} else {
strarray = (const char **)data;
if (tag->fmt)
- val = tag->fmt(RPM_STRING_TYPE, strarray[element], buf, tag->pad, element);
+ val = tag->fmt(RPM_STRING_TYPE, strarray[element], buf, tag->pad,
+ (rpm_count_t) element);
if (val) {
need = strlen(val);
}
if (tag->fmt)
- val = tag->fmt(RPM_INT32_TYPE, &intVal, buf, tag->pad, element);
+ val = tag->fmt(RPM_INT32_TYPE, &intVal, buf, tag->pad,
+ (rpm_count_t) element);
if (val) {
need = strlen(val);
case RPM_BIN_TYPE:
/* XXX HACK ALERT: element field abused as no. bytes of binary data. */
if (tag->fmt)
- val = tag->fmt(RPM_BIN_TYPE, data, buf, tag->pad, count);
+ val = tag->fmt(RPM_BIN_TYPE, data, buf, tag->pad, (rpm_count_t) count);
if (val) {
need = strlen(val);
*/
typedef char * (*headerTagFormatFunction)(int32_t type,
const void * data, char * formatPrefix,
- int padding, int element);
+ int padding, rpm_count_t element);
/** \ingroup header
* HEADER_EXT_FORMAT format function prototype.