summaryrefslogtreecommitdiff
path: root/src/split.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/split.c')
-rw-r--r--src/split.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/split.c b/src/split.c
index 316387b1a..8bed1d38a 100644
--- a/src/split.c
+++ b/src/split.c
@@ -38,8 +38,8 @@
#include "quote.h"
#include "safe-read.h"
#include "sig2str.h"
-#include "xfreopen.h"
#include "xdectoint.h"
+#include "xsetmode.h"
#include "xstrtol.h"
/* The official name of this program (e.g., no 'g' prefix). */
@@ -1553,8 +1553,7 @@ main (int argc, char **argv)
quoteaf (infile));
/* Binary I/O is safer when byte counts are used. */
- if (O_BINARY && ! isatty (STDIN_FILENO))
- xfreopen (NULL, "rb", stdin);
+ xsetmode (STDIN_FILENO, O_BINARY);
/* Get the optimal block size of input device and make a buffer. */