diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-21 16:10:32 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-21 16:10:32 +0200 |
commit | 9b929ba2941d1f4849f9ec92f8acb877adf788ea (patch) | |
tree | 15d6f8c761983aaf4d4cbefce66e3336fddb75ff /rpmio | |
parent | 9ed70bbbc0315bb103c2c2fed6fa88a1d40dce3b (diff) | |
download | rpm-9b929ba2941d1f4849f9ec92f8acb877adf788ea.tar.gz rpm-9b929ba2941d1f4849f9ec92f8acb877adf788ea.tar.bz2 rpm-9b929ba2941d1f4849f9ec92f8acb877adf788ea.zip |
Eliminate fdRead/__fdRead 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 1b67e3217..7372f8541 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -27,8 +27,6 @@ extern int h_errno; #include <rpmio_internal.h> #undef fdFileno -#undef fdRead -#define fdRead __fdRead #undef fdWrite #define fdWrite __fdWrite #undef fdClose @@ -271,7 +269,7 @@ FD_t XfdNew(const char * msg, const char * file, unsigned line) return XfdLink(fd, msg, file, line); } -static ssize_t fdRead(void * cookie, char * buf, size_t count) +static ssize_t __fdRead(void * cookie, char * buf, size_t count) { FD_t fd = c2f(cookie); ssize_t rc; @@ -284,7 +282,7 @@ static ssize_t fdRead(void * cookie, char * buf, size_t count) if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc); -DBGIO(fd, (stderr, "==>\tfdRead(%p,%p,%ld) rc %ld %s\n", cookie, buf, (long)count, (long)rc, fdbg(fd))); +DBGIO(fd, (stderr, "==>\t__fdRead(%p,%p,%ld) rc %ld %s\n", cookie, buf, (long)count, (long)rc, fdbg(fd))); return rc; } @@ -371,7 +369,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 ; @@ -501,7 +499,7 @@ int fdFgets(FD_t fd, char * buf, size_t len) errno = 0; #ifdef NOISY - rc = fdRead(fd, buf + nb, 1); + rc = __fdRead(fd, buf + nb, 1); #else rc = read(fdFileno(fd), buf + nb, 1); #endif @@ -683,7 +681,7 @@ static ssize_t ufdRead(void * cookie, char * buf, size_t count) int fdno = fdFileno(fd); (void) fstat(fdno, &sb); if (S_ISREG(sb.st_mode)) - return fdRead(fd, buf, count); + return __fdRead(fd, buf, count); } UFDONLY(fd); @@ -708,7 +706,7 @@ static ssize_t ufdRead(void * cookie, char * buf, size_t count) break; } - rc = fdRead(fd, buf + total, count - total); + rc = __fdRead(fd, buf + total, count - total); if (rc < 0) { switch (errno) { |