From be6324a13ebb5419d66c285a4c59b16579d2a147 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 28 Sep 2010 16:39:38 +0200 Subject: macosx compat patches --- tools/cpio/src/cpio.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'tools/cpio/src') diff --git a/tools/cpio/src/cpio.c b/tools/cpio/src/cpio.c index cf9cb0ef8..8e81a9819 100644 --- a/tools/cpio/src/cpio.c +++ b/tools/cpio/src/cpio.c @@ -82,12 +82,9 @@ int sysv3; #if defined (__linux__) || defined (__sun) || defined (__FreeBSD__) || \ defined (__hpux) || defined (_AIX) || defined (__NetBSD__) || \ defined (__OpenBSD__) || defined (__DragonFly__) || \ - defined (__APPLE__) || defined (__CYGWIN__) + defined (__CYGWIN__) #include -#else /* SVR4.2MP */ -#include -#include -#endif /* SVR4.2MP */ +#endif #include #include @@ -4497,17 +4494,12 @@ tseek(off_t n) #if defined (__linux__) || defined (__sun) || defined (__FreeBSD__) || \ defined (__hpux) || defined (_AIX) || defined (__NetBSD__) || \ defined (__OpenBSD__) || defined (__DragonFly__) || \ - defined (__APPLE__) || defined (__CYGWIN__) + defined (__CYGWIN__) struct mtop mo; mo.mt_op = i > 0 ? MTFSR : MTBSR; mo.mt_count = i > 0 ? i : -i; fault = ioctl(mt, MTIOCTOP, &mo); -#else /* SVR4.2MP */ - int t, a; - t = i > 0 ? T_SBF : T_SBB; - a = i > 0 ? i : -i; - fault = ioctl(mt, t, a); -#endif /* SVR4.2MP */ +#endif } else fault = lseek(mt, n - poffs, SEEK_CUR) == (off_t)-1 ? -1 : 0; if (fault == 0) @@ -4783,7 +4775,7 @@ mstat(void) tapeblock = md.bsize; } #elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) \ - || defined (__DragonFly__) || defined (__APPLE__) + || defined (__DragonFly__) if ((mtst.st_mode&S_IFMT) == S_IFCHR) { struct mtget mg; if (ioctl(mt, MTIOCGET, &mg) == 0) @@ -4797,16 +4789,6 @@ mstat(void) MT_ST_BLKSIZE_SHIFT; } #elif defined (__hpux) || defined (_AIX) -#else /* SVR4.2MP */ - if ((mtst.st_mode&S_IFMT) == S_IFCHR) { - struct blklen bl; - if (ioctl(mt, T_RDBLKLEN, &bl) == 0) - /* - * These are not the values we're interested in - * (always 1 and 16M-1 for DAT/DDS tape drives). - */ - tapeblock = 0; - } #endif /* SVR4.2MP */ if (blksiz == 0) switch (mtst.st_mode&S_IFMT) { -- cgit v1.2.3