]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR libfortran/24919 ([4.0] CRLF support in libgfortran)
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Sun, 27 Nov 2005 11:42:46 +0000 (12:42 +0100)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 27 Nov 2005 11:42:46 +0000 (11:42 +0000)
commit8824fd4cc119ccbeaab451122d5cbff6971bf958
tree01365c36dc1d3c013aab270a069fc3359416ae3c
parent8edbdaf7352ccfcf7a18650dca29695038d2978c
re PR libfortran/24919 ([4.0] CRLF support in libgfortran)

PR libfortran/24919

* io/list_read.c (eat_separator, finish_separator,
read_character): Handle CRLF separators correctly during reads.
(nml_query): Use the HAVE_CRLF macro to print adequate newlines.
* io/io.h (st_parameter_dt): Add comment about the possible
values for sf_seen_eor.
* io/unix.c (tempfile, regular_file): HAVE_CRLF doesn't imply
that O_BINARY is defined, so we add that condition.
(stream_at_bof): Fix typo in comment.
* io/transfer.c (read_sf): Handle correctly CRLF, setting
sf_seen_eor value to 2 instead of 1.
(formatted_transfer_scalar): Use the sf_seen_eor value to
handle CRLF the right way.
* io/write.c (nml_write_obj, namelist_write): Use CRLF as newline
when HAVE_CRLF is defined.

* gfortran.dg/ftell_1.f90: Modify testcase so that it doesn't
fail on CRLF platforms.
* gfortran.dg/ftell_2.f90: Likewise.

From-SVN: r107563
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/ftell_1.f90
gcc/testsuite/gfortran.dg/ftell_2.f90
libgfortran/ChangeLog
libgfortran/io/io.h
libgfortran/io/list_read.c
libgfortran/io/transfer.c
libgfortran/io/unix.c
libgfortran/io/write.c