aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 560047f..57883e0 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -1289,6 +1289,9 @@ input_stream (void)
stream *
output_stream (void)
{
+#if defined(HAVE_CRLF) && defined(HAVE_SETMODE)
+ setmode (STDOUT_FILENO, O_BINARY);
+#endif
return fd_to_stream (STDOUT_FILENO, PROT_WRITE);
}
@@ -1299,6 +1302,9 @@ output_stream (void)
stream *
error_stream (void)
{
+#if defined(HAVE_CRLF) && defined(HAVE_SETMODE)
+ setmode (STDERR_FILENO, O_BINARY);
+#endif
return fd_to_stream (STDERR_FILENO, PROT_WRITE);
}