diff options
author | jbj <devnull@localhost> | 1999-10-27 23:18:10 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-10-27 23:18:10 +0000 |
commit | 0d0b405c201b43f2eebc61257f5992931e1cdb0c (patch) | |
tree | 7b19eee73f74dbd86e65255cff8be16b58292035 /rpmio | |
parent | 82c75cb6a261465700ca469793b54ad68bef99a8 (diff) | |
download | librpm-tizen-0d0b405c201b43f2eebc61257f5992931e1cdb0c.tar.gz librpm-tizen-0d0b405c201b43f2eebc61257f5992931e1cdb0c.tar.bz2 librpm-tizen-0d0b405c201b43f2eebc61257f5992931e1cdb0c.zip |
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
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/macro.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 <assert.h> #include <stdarg.h> +#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 <rpmlib.h> #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)); |