diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-03 16:33:18 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-03 16:33:18 +0200 |
commit | 9cbf0349b84fb19c6dddbe4f7a3246d4c949ad09 (patch) | |
tree | 8eedf8632f760089f94c07a28fd6ea363ed3a22a /build | |
parent | fb90b8b4eb46c4008326e07b4866f4bf0875df83 (diff) | |
download | librpm-tizen-9cbf0349b84fb19c6dddbe4f7a3246d4c949ad09.tar.gz librpm-tizen-9cbf0349b84fb19c6dddbe4f7a3246d4c949ad09.tar.bz2 librpm-tizen-9cbf0349b84fb19c6dddbe4f7a3246d4c949ad09.zip |
Use regular POSIX functions instead of "RPC" clones
- we only care about local files
Diffstat (limited to 'build')
-rw-r--r-- | build/build.c | 10 | ||||
-rw-r--r-- | build/files.c | 10 | ||||
-rw-r--r-- | build/pack.c | 10 | ||||
-rw-r--r-- | build/parsePrep.c | 4 |
4 files changed, 17 insertions, 17 deletions
diff --git a/build/build.c b/build/build.c index 0072dc663..f94274ac2 100644 --- a/build/build.c +++ b/build/build.c @@ -22,13 +22,13 @@ static void doRmSource(rpmSpec spec) int rc; #if 0 - rc = Unlink(spec->specFile); + rc = unlink(spec->specFile); #endif for (p = spec->sources; p != NULL; p = p->next) { if (! (p->flags & RPMBUILD_ISNO)) { const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); - rc = Unlink(fn); + rc = unlink(fn); fn = _free(fn); } } @@ -37,7 +37,7 @@ static void doRmSource(rpmSpec spec) for (p = pkg->icon; p != NULL; p = p->next) { if (! (p->flags & RPMBUILD_ISNO)) { const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL); - rc = Unlink(fn); + rc = unlink(fn); fn = _free(fn); } } @@ -227,7 +227,7 @@ fprintf(stderr, "*** addMacros\n"); exit: if (scriptName) { if (!rc) - (void) Unlink(scriptName); + (void) unlink(scriptName); scriptName = _free(scriptName); } if (u != NULL) { @@ -324,7 +324,7 @@ int buildSpec(rpmts ts, rpmSpec spec, int what, int test) doRmSource(spec); if (what & RPMBUILD_RMSPEC) - (void) Unlink(spec->specFile); + (void) unlink(spec->specFile); exit: if (rc && rpmlogGetNrecs() > 0) { diff --git a/build/files.c b/build/files.c index bbf2d90fe..83c2aeec5 100644 --- a/build/files.c +++ b/build/files.c @@ -1204,7 +1204,7 @@ static void genCpioListAndHeader(FileList fl, buf[0] = '\0'; if (S_ISLNK(flp->fl_mode)) { - buf[Readlink(flp->diskURL, buf, BUFSIZ)] = '\0'; + buf[readlink(flp->diskURL, buf, BUFSIZ)] = '\0'; if (fl->buildRootURL) { const char * buildRoot; (void) urlPath(fl->buildRootURL, &buildRoot); @@ -1440,7 +1440,7 @@ static int addFile(FileList fl, const char * diskURL, statp->st_atime = now; statp->st_mtime = now; statp->st_ctime = now; - } else if (Lstat(diskURL, statp)) { + } else if (lstat(diskURL, statp)) { rpmlog(RPMLOG_ERR, _("File not found: %s\n"), diskURL); fl->processingFailed = 1; return RPMLOG_ERR; @@ -1701,7 +1701,7 @@ static int processBinaryFile(Package pkg, FileList fl, const char *diskURL = NULL; int rc = 0; - doGlob = Glob_pattern_p(fileURL, quote); + doGlob = glob_pattern_p(fileURL, quote); /* Check that file starts with leading "/" */ { const char * fileName; @@ -1738,7 +1738,7 @@ static int processBinaryFile(Package pkg, FileList fl, } rc = rpmGlob(diskURL, &argc, &argv); - if (rc == 0 && argc >= 1 && !Glob_pattern_p(argv[0], quote)) { + if (rc == 0 && argc >= 1 && !glob_pattern_p(argv[0], quote)) { for (i = 0; i < argc; i++) { rc = addFile(fl, argv[i], NULL); argv[i] = _free(argv[i]); @@ -2191,7 +2191,7 @@ int processSourceFiles(rpmSpec spec) flp->fileURL = xstrdup(diskPath); flp->verifyFlags = RPMVERIFY_ALL; - if (Stat(diskURL, &flp->fl_st)) { + if (stat(diskURL, &flp->fl_st)) { rpmlog(RPMLOG_ERR, _("Bad file: %s: %s\n"), diskURL, strerror(errno)); fl.processingFailed = 1; diff --git a/build/pack.c b/build/pack.c index e85d4c131..f314fd155 100644 --- a/build/pack.c +++ b/build/pack.c @@ -443,7 +443,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, (void) Fclose(fd); fd = NULL; - (void) Unlink(fileName); + (void) unlink(fileName); if (rc) goto exit; @@ -581,14 +581,14 @@ exit: fd = NULL; } if (sigtarget) { - (void) Unlink(sigtarget); + (void) unlink(sigtarget); sigtarget = _free(sigtarget); } if (rc == 0) rpmlog(RPMLOG_NOTICE, _("Wrote: %s\n"), fileName); else - (void) Unlink(fileName); + (void) unlink(fileName); return rc; } @@ -666,10 +666,10 @@ int packageBinaries(rpmSpec spec) const char *dn; *binDir = '\0'; dn = rpmGetPath("%{_rpmdir}/", binRpm, NULL); - if (Stat(dn, &st) < 0) { + if (stat(dn, &st) < 0) { switch(errno) { case ENOENT: - if (Mkdir(dn, 0755) == 0) + if (mkdir(dn, 0755) == 0) break; default: rpmlog(RPMLOG_ERR,_("cannot create %s: %s\n"), diff --git a/build/parsePrep.c b/build/parsePrep.c index e2e228deb..06e7ce72f 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -34,7 +34,7 @@ static int checkOwners(const char * urlfn) { struct stat sb; - if (Lstat(urlfn, &sb)) { + if (lstat(urlfn, &sb)) { rpmlog(RPMLOG_ERR, _("Bad source: %s: %s\n"), urlfn, strerror(errno)); return RPMLOG_ERR; @@ -187,7 +187,7 @@ static const char *doUntar(rpmSpec spec, int c, int quietly) if (sp->flags & RPMTAG_NOSOURCE && autofetchnosource) { struct stat st; int rc; - if (Lstat(urlfn, &st) != 0 && errno == ENOENT && + if (lstat(urlfn, &st) != 0 && errno == ENOENT && urlIsUrl(sp->fullSource) != URL_IS_UNKNOWN) { if ((rc = urlGetFile(sp->fullSource, urlfn)) != 0) { rpmlog(RPMLOG_ERR, |