summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-10-27 23:18:10 +0000
committerjbj <devnull@localhost>1999-10-27 23:18:10 +0000
commit0d0b405c201b43f2eebc61257f5992931e1cdb0c (patch)
tree7b19eee73f74dbd86e65255cff8be16b58292035 /rpmio
parent82c75cb6a261465700ca469793b54ad68bef99a8 (diff)
downloadrpm-0d0b405c201b43f2eebc61257f5992931e1cdb0c.tar.gz
rpm-0d0b405c201b43f2eebc61257f5992931e1cdb0c.tar.bz2
rpm-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.c10
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));