diff options
author | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-23 01:56:55 +0000 |
---|---|---|
committer | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-23 01:56:55 +0000 |
commit | e693d7f1bd565ae51674ee0a1cd8faa8011d4836 (patch) | |
tree | c7c20ef998ab2e57fb13c1b46a60429b75cc3d48 /libgfortran/io | |
parent | 1a6adcf909391afae105ff4a8187814b75de8658 (diff) | |
download | gcc-e693d7f1bd565ae51674ee0a1cd8faa8011d4836.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117166 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/unix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 560047f88f8..57883e0f4e3 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); } |