summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-12-14 19:52:11 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-12-14 19:52:11 +0200
commit55cb2ff12836f124d5f8114a3c0d4246ec8fa7a0 (patch)
tree20a312fedbb67f1ef4ef5aa235ac5235d8db8eaf /build
parent61e35657a6e3ce33a44067e82bb382b8b3133c4a (diff)
downloadlibrpm-tizen-55cb2ff12836f124d5f8114a3c0d4246ec8fa7a0.tar.gz
librpm-tizen-55cb2ff12836f124d5f8114a3c0d4246ec8fa7a0.tar.bz2
librpm-tizen-55cb2ff12836f124d5f8114a3c0d4246ec8fa7a0.zip
Bogus const removal continued...
Diffstat (limited to 'build')
-rw-r--r--build/files.c4
-rw-r--r--build/pack.c6
-rw-r--r--build/parsePreamble.c6
-rw-r--r--build/parsePrep.c3
-rw-r--r--build/parseSpec.c14
-rw-r--r--build/rpmfc.c4
-rw-r--r--build/spec.c2
7 files changed, 19 insertions, 20 deletions
diff --git a/build/files.c b/build/files.c
index 290503e17..6c1cb6b87 100644
--- a/build/files.c
+++ b/build/files.c
@@ -766,7 +766,7 @@ static int parseForRegexLang(const char * fileName, char ** lang)
const char *s;
if (! initialized) {
- const char *patt = rpmExpand("%{?_langpatt}", NULL);
+ char *patt = rpmExpand("%{?_langpatt}", NULL);
int rc = 0;
if (!(patt && *patt != '\0'))
rc = 1;
@@ -2250,7 +2250,7 @@ static int checkFiles(StringBuf fileList)
{
static const char * av_ckfile[] = { "%{?__check_files}", NULL };
StringBuf sb_stdout = NULL;
- const char * s;
+ char * s;
int rc;
s = rpmExpand(av_ckfile[0], NULL);
diff --git a/build/pack.c b/build/pack.c
index d848057af..c40543894 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -53,7 +53,7 @@ static rpmRC cpio_doio(FD_t fdo, Header h, CSA_t csa,
rpmRC rc = RPMRC_OK;
int xx;
- { const char *fmode = rpmExpand(fmodeMacro, NULL);
+ { char *fmode = rpmExpand(fmodeMacro, NULL);
if (!(fmode && fmode[0] == 'w'))
fmode = xstrdup("w9.gzdio");
(void) Fflush(fdo);
@@ -348,7 +348,7 @@ rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName,
FD_t ifd = NULL;
int32_t count, sigtag;
const char * sigtarget = NULL;;
- const char * rpmio_flags = NULL;
+ char * rpmio_flags = NULL;
const char * SHA1 = NULL;
char *s;
char buf[BUFSIZ];
@@ -635,7 +635,7 @@ rpmRC packageBinaries(rpmSpec spec)
providePackageNVR(pkg->header);
- { const char * optflags = rpmExpand("%{optflags}", NULL);
+ { char * optflags = rpmExpand("%{optflags}", NULL);
(void) headerAddEntry(pkg->header, RPMTAG_OPTFLAGS, RPM_STRING_TYPE,
optflags, 1);
optflags = _free(optflags);
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index f04be6e43..761e3c9b5 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -209,8 +209,8 @@ static int isMemberInEntry(Header h, const char *name, rpm_tag_t tag)
*/
static int checkForValidArchitectures(rpmSpec spec)
{
- const char *arch = rpmExpand("%{_target_cpu}", NULL);
- const char *os = rpmExpand("%{_target_os}", NULL);
+ char *arch = rpmExpand("%{_target_cpu}", NULL);
+ char *os = rpmExpand("%{_target_os}", NULL);
if (isMemberInEntry(spec->buildRestrictions,
arch, RPMTAG_EXCLUDEARCH) == 1) {
@@ -311,7 +311,7 @@ static void fillOutMainPackage(Header h)
for (ot = optionalTags; ot->ot_mac != NULL; ot++) {
if (!headerIsEntry(h, ot->ot_tag)) {
- const char *val = rpmExpand(ot->ot_mac, NULL);
+ char *val = rpmExpand(ot->ot_mac, NULL);
if (val && *val != '%')
(void) headerAddEntry(h, ot->ot_tag, RPM_STRING_TYPE, (void *)val, 1);
val = _free(val);
diff --git a/build/parsePrep.c b/build/parsePrep.c
index f20f8666f..13a130b58 100644
--- a/build/parsePrep.c
+++ b/build/parsePrep.c
@@ -408,8 +408,7 @@ static int doSetupMacro(rpmSpec spec, char *line)
const char ** fm;
for (fm = fixmacs; *fm; fm++) {
- const char *fix;
- fix = rpmExpand(*fm, " .", NULL);
+ char * fix = rpmExpand(*fm, " .", NULL);
if (fix && *fix != '%')
appendLineStringBuf(spec->prep, fix);
fix = _free(fix);
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 86a0c2107..e4dc5581f 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -279,22 +279,22 @@ retry:
if (!spec->readStack->reading && !strncmp("%if", s, sizeof("%if")-1)) {
match = 0;
} else if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
- const char *arch = rpmExpand("%{_target_cpu}", NULL);
+ char *arch = rpmExpand("%{_target_cpu}", NULL);
s += 7;
match = matchTok(arch, s);
arch = _free(arch);
} else if (! strncmp("%ifnarch", s, sizeof("%ifnarch")-1)) {
- const char *arch = rpmExpand("%{_target_cpu}", NULL);
+ char *arch = rpmExpand("%{_target_cpu}", NULL);
s += 8;
match = !matchTok(arch, s);
arch = _free(arch);
} else if (! strncmp("%ifos", s, sizeof("%ifos")-1)) {
- const char *os = rpmExpand("%{_target_os}", NULL);
+ char *os = rpmExpand("%{_target_os}", NULL);
s += 5;
match = matchTok(os, s);
os = _free(os);
} else if (! strncmp("%ifnos", s, sizeof("%ifnos")-1)) {
- const char *os = rpmExpand("%{_target_os}", NULL);
+ char *os = rpmExpand("%{_target_os}", NULL);
s += 6;
match = !matchTok(os, s);
os = _free(os);
@@ -558,9 +558,9 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL,
/* Check for description in each package and add arch and os */
{
- const char *platform = rpmExpand("%{_target_platform}", NULL);
- const char *arch = rpmExpand("%{_target_cpu}", NULL);
- const char *os = rpmExpand("%{_target_os}", NULL);
+ char *platform = rpmExpand("%{_target_platform}", NULL);
+ char *arch = rpmExpand("%{_target_cpu}", NULL);
+ char *os = rpmExpand("%{_target_os}", NULL);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
if (!headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) {
diff --git a/build/rpmfc.c b/build/rpmfc.c
index b48adfe31..bc69ac303 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -229,7 +229,7 @@ top:
int rpmfcExec(ARGV_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp,
int failnonzero)
{
- const char * s = NULL;
+ char * s = NULL;
ARGV_t xav = NULL;
ARGV_t pav = NULL;
int pac = 0;
@@ -801,7 +801,7 @@ static int rpmfcELF(rpmfc fc)
char buf[BUFSIZ];
const char * s;
struct stat sb, * st = &sb;
- const char * soname = NULL;
+ char * soname = NULL;
rpmds * depsp, ds;
rpm_tag_t tagN;
int32_t dsContext;
diff --git a/build/spec.c b/build/spec.c
index 98a9cd4ef..e66c63107 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -545,7 +545,7 @@ printNewSpecfile(rpmSpec spec)
Header h;
speclines sl = spec->sl;
spectags st = spec->st;
- const char * msgstr = NULL;
+ char * msgstr = NULL;
int i, j;
if (sl == NULL || st == NULL)