[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #27640] scm_copy_file must open files with O_BINARY under mingw
From: |
Scott McPeak |
Subject: |
[bug #27640] scm_copy_file must open files with O_BINARY under mingw |
Date: |
Fri, 09 Oct 2009 05:08:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 |
URL:
<http://savannah.gnu.org/bugs/?27640>
Summary: scm_copy_file must open files with O_BINARY under
mingw
Project: Guile
Submitted by: smcpeak
Submitted on: Fri 09 Oct 2009 05:08:11 AM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The scm_copy_file function must open the input and output files with O_BINARY
under mingw in order to satisfy the (implicit) specification that the output
file's contents equal the input file's contents once the copy operation
completes.
Without O_BINARY, the files are opened in text mode. This causes LF to CRLF
translation for unix text files, but more importantly, truncates binary files
as soon as a DOS EOF (ctrl-D) character is encountered.
Suggested patch attached.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 09 Oct 2009 05:08:11 AM GMT Name: copy-file-binary-mode.diff
Size: 1kB By: smcpeak
<http://savannah.gnu.org/bugs/download.php?file_id=18835>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?27640>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #27640] scm_copy_file must open files with O_BINARY under mingw,
Scott McPeak <=