From 6a7c793f3ef153f68fec135b0f8bca78ec9da324 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Sat, 23 Sep 2006 01:56:55 +0000 Subject: re PR libfortran/27964 (Wrong line ends on windows (XP)) PR libfortran/27964 * configure.ac: Check for setmode() function. * configure: Regenerate. * config.h.in: Regenerate. * io/unix.c (output_stream): Force stdout to binary mode. (error_stream): Force stderr to binary mode. From-SVN: r117166 --- libgfortran/io/unix.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libgfortran/io/unix.c') 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); } -- cgit v1.1