summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-01-06 17:33:50 +0000
committerjbj <devnull@localhost>1999-01-06 17:33:50 +0000
commitbd626d134d27fa77cae0f26aa7c03649d1bb2ef9 (patch)
tree0d53c6a480a2ec387c9b872b64d635a33281f064 /build
parent7eca53f7ea2a634205d7234bc00d1f06e378db39 (diff)
downloadrpm-bd626d134d27fa77cae0f26aa7c03649d1bb2ef9.tar.gz
rpm-bd626d134d27fa77cae0f26aa7c03649d1bb2ef9.tar.bz2
rpm-bd626d134d27fa77cae0f26aa7c03649d1bb2ef9.zip
propagate "const char *" into rpmlib prototypes.
CVS patchset: 2663 CVS date: 1999/01/06 17:33:50
Diffstat (limited to 'build')
-rw-r--r--build/build.c4
-rw-r--r--build/pack.c17
-rw-r--r--build/parseSpec.c4
-rw-r--r--build/reqprov.c6
-rw-r--r--build/rpmbuild.h8
5 files changed, 20 insertions, 19 deletions
diff --git a/build/build.c b/build/build.c
index e3c486b67..f628e0b4b 100644
--- a/build/build.c
+++ b/build/build.c
@@ -43,11 +43,11 @@ static char *_preScriptChdir =
"cd %{_builddir}\n"
;
-int doScript(Spec spec, int what, char *name, StringBuf sb, int test)
+int doScript(Spec spec, int what, const char *name, StringBuf sb, int test)
{
FD_t fd;
FILE *f;
- char *scriptName;
+ const char *scriptName;
int pid;
int status;
char *buildShell;
diff --git a/build/pack.c b/build/pack.c
index eb9e8bc14..5b49a7e60 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -238,7 +238,8 @@ int writeRPM(Header header, const char *fileName, int type,
FD_t fd, ifd;
int rc, count, sigtype;
int archnum, osnum;
- char *sigtarget, *name, *version, *release;
+ const char *sigtarget;
+ char *name, *version, *release;
char buf[BUFSIZ];
Header sig;
struct rpmlead lead;
@@ -276,7 +277,7 @@ int writeRPM(Header header, const char *fileName, int type,
if (rc != 0) {
fdClose(fd);
unlink(sigtarget);
- free(sigtarget);
+ xfree(sigtarget);
return rc;
}
@@ -295,7 +296,7 @@ int writeRPM(Header header, const char *fileName, int type,
if (fdFileno(fd = fdOpen(fileName, O_WRONLY|O_CREAT|O_TRUNC, 0644)) < 0) {
rpmError(RPMERR_CREATE, _("Could not open %s\n"), fileName);
unlink(sigtarget);
- free(sigtarget);
+ xfree(sigtarget);
return RPMERR_CREATE;
}
@@ -329,7 +330,7 @@ int writeRPM(Header header, const char *fileName, int type,
strerror(errno));
fdClose(fd);
unlink(sigtarget);
- free(sigtarget);
+ xfree(sigtarget);
unlink(fileName);
return rc;
}
@@ -347,7 +348,7 @@ int writeRPM(Header header, const char *fileName, int type,
if ((rc = rpmWriteSignature(fd, sig))) {
fdClose(fd);
unlink(sigtarget);
- free(sigtarget);
+ xfree(sigtarget);
unlink(fileName);
rpmFreeSignature(sig);
return rc;
@@ -363,7 +364,7 @@ int writeRPM(Header header, const char *fileName, int type,
fdClose(ifd);
fdClose(fd);
unlink(sigtarget);
- free(sigtarget);
+ xfree(sigtarget);
unlink(fileName);
return RPMERR_READERROR;
}
@@ -373,7 +374,7 @@ int writeRPM(Header header, const char *fileName, int type,
fdClose(ifd);
fdClose(fd);
unlink(sigtarget);
- free(sigtarget);
+ xfree(sigtarget);
unlink(fileName);
return RPMERR_NOSPACE;
}
@@ -381,7 +382,7 @@ int writeRPM(Header header, const char *fileName, int type,
fdClose(ifd);
fdClose(fd);
unlink(sigtarget);
- free(sigtarget);
+ xfree(sigtarget);
rpmMessage(RPMMESS_NORMAL, _("Wrote: %s\n"), fileName);
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 7727ac9dd..4118156fe 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -276,8 +276,8 @@ void closeSpec(Spec spec)
int noLang = 0; /* XXX FIXME: pass as arg */
-int parseSpec(Spec *specp, char *specFile, char *buildRoot,
- int inBuildArch, char *passPhrase, char *cookie,
+int parseSpec(Spec *specp, const char *specFile, const char *buildRoot,
+ int inBuildArch, const char *passPhrase, char *cookie,
int anyarch, int force)
{
int parsePart = PART_PREAMBLE;
diff --git a/build/reqprov.c b/build/reqprov.c
index 19745c521..3ed4ad4ce 100644
--- a/build/reqprov.c
+++ b/build/reqprov.c
@@ -5,10 +5,10 @@
#include "rpmbuild.h"
int addReqProv(Spec spec, Package pkg,
- int flag, char *name, char *version, int index)
+ int flag, const char *name, const char *version, int index)
{
- char **names;
- char **versions = NULL;
+ const char **names;
+ const char **versions = NULL;
int *flags = NULL;
int *indexes = NULL;
int nametag = 0;
diff --git a/build/rpmbuild.h b/build/rpmbuild.h
index aebbc0e77..a8d03ead3 100644
--- a/build/rpmbuild.h
+++ b/build/rpmbuild.h
@@ -117,7 +117,7 @@ char *parseExpressionString(Spec, char *);
/* from build/build.h */
-int doScript(Spec spec, int what, char *name, StringBuf sb, int test);
+int doScript(Spec spec, int what, const char *name, StringBuf sb, int test);
/* from build/package.h */
@@ -129,7 +129,7 @@ void freePackage(/*@only@*/ Package p);
/* from build/reqprov.h */
int addReqProv(Spec spec, Package pkg,
- int flag, char *name, char *version, int index);
+ int flag, const char *name, const char *version, int index);
/* from build/files.h */
@@ -138,8 +138,8 @@ int processSourceFiles(Spec spec);
/* global entry points */
-int parseSpec(Spec *specp, char *specFile, char *buildRoot,
- int inBuildArch, char *passPhrase, char *cookie, int anyarch,
+int parseSpec(Spec *specp, const char *specFile, const char *buildRoot,
+ int inBuildArch, const char *passPhrase, char *cookie, int anyarch,
int force);
int buildSpec(Spec spec, int what, int test);