diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-21 16:22:23 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-21 16:22:23 +0200 |
commit | e152864a768c7cd81479b43e15f4f2cb340e0910 (patch) | |
tree | 13a1ab56754fa9f72f7583de5576ca4afa591b2a /rpmio | |
parent | 14a28ee82db5ce0293519ed3a13627c560812aad (diff) | |
download | rpm-e152864a768c7cd81479b43e15f4f2cb340e0910.tar.gz rpm-e152864a768c7cd81479b43e15f4f2cb340e0910.tar.bz2 rpm-e152864a768c7cd81479b43e15f4f2cb340e0910.zip |
Eliminate fdClose/__fdClose preprocessor games.
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/rpmio.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index e96764638..c1dc204fb 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -27,8 +27,6 @@ extern int h_errno; #include <rpmio_internal.h> #undef fdFileno -#undef fdClose -#define fdClose __fdClose #include "ugid.h" #include "rpmmessages.h" @@ -326,7 +324,7 @@ DBGIO(fd, (stderr, "==>\tfdSeek(%p,%ld,%d) rc %lx %s\n", cookie, (long)p, whence return rc; } -static int fdClose( void * cookie) +static int __fdClose( void * cookie) { FD_t fd; int fdno; @@ -342,9 +340,9 @@ static int fdClose( void * cookie) rc = ((fdno >= 0) ? close(fdno) : -2); fdstat_exit(fd, FDSTAT_CLOSE, rc); -DBGIO(fd, (stderr, "==>\tfdClose(%p) rc %lx %s\n", (fd ? fd : NULL), (unsigned long)rc, fdbg(fd))); +DBGIO(fd, (stderr, "==>\t__fdClose(%p) rc %lx %s\n", (fd ? fd : NULL), (unsigned long)rc, fdbg(fd))); - fd = fdFree(fd, "open (fdClose)"); + fd = fdFree(fd, "open (__fdClose)"); return rc; } @@ -367,7 +365,7 @@ DBGIO(fd, (stderr, "==>\t__fdOpen(\"%s\",%x,0%o) %s\n", path, (unsigned)flags, ( } static struct FDIO_s fdio_s = { - __fdRead, __fdWrite, fdSeek, fdClose, XfdLink, XfdFree, XfdNew, fdFileno, + __fdRead, __fdWrite, fdSeek, __fdClose, XfdLink, XfdFree, XfdNew, fdFileno, __fdOpen, NULL, fdGetFp, NULL, mkdir, chdir, rmdir, rename, unlink }; FDIO_t fdio = &fdio_s ; @@ -817,7 +815,7 @@ int ufdClose( void * cookie) UFDONLY(fd); - return fdClose(fd); + return __fdClose(fd); } /* @@ -1614,7 +1612,7 @@ if (_rpmio_debug) fprintf(stderr, "*** Fopen fdio path %s fmode %s\n", path, fmode); fd = __fdOpen(path, flags, perms); if (fdFileno(fd) < 0) { - if (fd) (void) fdClose(fd); + if (fd) (void) __fdClose(fd); return NULL; } } else { |