diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-11-19 05:38:58 +0300 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-11-19 05:38:58 +0300 |
commit | 08b1034f4f0b910660a8b1a537f86462fa41ebad (patch) | |
tree | 4a39b721f4654120bff47fcd7cd95906172ec16f /tar.c | |
parent | ab746abfc05c28824b25e12b86a538b09fb9275d (diff) |
Stuf
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -38,6 +38,7 @@ #include <signal.h> #include <time.h> #include <sys/types.h> +#include <sys/sysmacros.h> 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); |