This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/23262] [migwin32] rewind truncates file
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2005 10:15:41 -0000
- Subject: [Bug libfortran/23262] [migwin32] rewind truncates file
- References: <20050806194600.23262.fxcoudert@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-09-03 10:15 -------
OK, it's worse than I thought. When you open a file with O_BINARY, it is opened
using Unix conventions, and you need to add yourself the \r in the right places.
Otherwise, you can use the Windows CRLF convention, but then lseek and ftruncate
are *not* usable. Not at all.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23262