From 08b1034f4f0b910660a8b1a537f86462fa41ebad Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 19 Nov 1999 02:38:58 +0000 Subject: Stuf --- archival/tar.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archival') diff --git a/archival/tar.c b/archival/tar.c index 1fdbf8c1c..bbd86628a 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -38,6 +38,7 @@ #include #include #include +#include static const char tar_usage[] = @@ -276,7 +277,7 @@ static void readTarFile (int fileCount, char **fileTable) * Open the tar file for reading. */ if ((tarName == NULL) || !strcmp (tarName, "-")) { - tarFd = STDIN; + tarFd = fileno(stdin); } else tarFd = open (tarName, O_RDONLY); @@ -552,7 +553,7 @@ readHeader (const TarHeader * hp, int fileCount, char **fileTable) * Start the output file. */ if (tostdoutFlag == TRUE) - outFd = STDOUT; + outFd = fileno(stdout); else { if ( S_ISCHR(mode) || S_ISBLK(mode) || S_ISSOCK(mode) ) { devFileFlag = TRUE; @@ -650,7 +651,7 @@ static void writeTarFile (int fileCount, char **fileTable) */ if ((tarName == NULL) || !strcmp (tarName, "-")) { tostdoutFlag = TRUE; - tarFd = STDOUT; + tarFd = fileno(stdout); } else tarFd = open (tarName, O_WRONLY | O_CREAT | O_TRUNC, 0666); -- cgit v1.2.3