[libgfortran] Correct handling of CRLF as line terminator
François-Xavier Coudert
fxcoudert@gmail.com
Wed Nov 23 16:58:00 GMT 2005
Attached patch makes libgfortran correctly handle CRLF as line
terminator (support until now was incomplete), for both reading (the
library can read both CRLF and LF files) and writing (the library will
write LF or CRLF as line terminators, depending on the value of
HAVE_CRLF when the compiler is built).
The patch to unix.c makes it possible to define HAVE_CRLF manually on
systems that don't have O_BINARY. We can thus run the testsuite using
CRLF on a non-CRLF system, and it opens the possibility of using a
compile-time option for line terminators instead of having this built
in the compiler. All the other files are the patch to handle reading
and writing of CRLF.
Regtested on i686-linux, with and without HAVE_CRLF. Introduces no
regression without it (the usual linux config) and fixes all testsuite
failures that existed on CRLF systems.
OK for 4.1 and mainline?
FX
:ADDPATCH libgfortran:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crlf.ChangeLog
Type: application/octet-stream
Size: 1007 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051123/e0b616d3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crlf.diff
Type: text/x-patch
Size: 7648 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051123/e0b616d3/attachment.bin>
More information about the Fortran
mailing list