From 0d0b405c201b43f2eebc61257f5992931e1cdb0c Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 27 Oct 1999 23:18:10 +0000 Subject: use compressed filenames on install side. start unifying FD types, CFD_t now gone. CVS patchset: 3402 CVS date: 1999/10/27 23:18:10 --- rpmio/macro.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rpmio') diff --git a/rpmio/macro.c b/rpmio/macro.c index fedf24587..24d4b5d71 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -3,7 +3,9 @@ #include #include +#if !defined(isblank) #define isblank(_c) ((_c) == ' ' || (_c) == '\t') +#endif #define iseol(_c) ((_c) == '\n' || (_c) == '\r') #define STREQ(_t, _f, _fn) ((_fn) == (sizeof(_t)-1) && !strncmp((_t), (_f), (_fn))) @@ -25,8 +27,8 @@ typedef int FD_t; #define fdFileno(_x) (_x) #define fdOpen open -#define fdRead read -#define fdClose close +#define Fread(_b, _s, _n, _fd) read(_fd, _b, _s) +#define Fclose(_fd) close(_fd) #else #include #endif @@ -1343,9 +1345,9 @@ int isCompressed(const char *file, int *compressed) rpmError(RPMERR_BADSPEC, _("File %s: %s"), file, strerror(errno)); return 1; } - nb = fdRead(fd, magic, sizeof(magic)); + nb = Fread(magic, sizeof(magic), 1, fd); rderrno = errno; - fdClose(fd); + Fclose(fd); if (nb < 0) { rpmError(RPMERR_BADSPEC, _("File %s: %s"), file, strerror(rderrno)); -- cgit v1.2.3