mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(open_next_file): Avoid setmode; use POSIX-specified routines instead.
This commit is contained in:
1 parent
6560de0b04
commit
a40f69da68
1 file changed
+3
-2
@@ -899,10 +899,12 @@ open_next_file (void)
|
||||
input_filename = _("standard input");
|
||||
in_stream = stdin;
|
||||
have_read_stdin = true;
|
||||
if (O_BINARY && ! isatty (STDIN_FILENO))
|
||||
freopen (NULL, "rb", stdin);
|
||||
}
|
||||
else
|
||||
{
|
||||
in_stream = fopen (input_filename, "r");
|
||||
in_stream = fopen (input_filename, (O_BINARY ? "rb" : "r"));
|
||||
if (in_stream == NULL)
|
||||
{
|
||||
error (0, errno, "%s", input_filename);
|
||||
@@ -914,7 +916,6 @@ open_next_file (void)
|
||||
|
||||
if (limit_bytes_to_format & !flag_dump_strings)
|
||||
SETVBUF (in_stream, NULL, _IONBF, 0);
|
||||
SET_BINARY (fileno (in_stream));
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user