[libgfortran] Correct handling of CRLF as line terminator

Steve Kargl sgk@troutmask.apl.washington.edu
Sat Nov 26 22:14:00 GMT 2005


On Wed, Nov 23, 2005 at 05:58:13PM +0100, Fran?ois-Xavier Coudert wrote:
> 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?
> 

FWIW, I approved this patch on IRC.

-- 
Steve



More information about the Gcc-patches mailing list