bugGuile - Bugs: bug #27640, scm_copy_file must open files with...


bug #27640: scm_copy_file must open files with O_BINARY under mingw

Submitted by:  Scott McPeak <smcpeak>
Submitted on:  Fri 09 Oct 2009 05:08:11 AM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 09 Oct 2009 05:08:11 AM UTC, original submission:

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.

Scott McPeak <smcpeak>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #18835:  copy-file-binary-mode.diff added by smcpeak (1KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by smcpeak (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 09 Oct 2009 05:08:11 AM UTCsmcpeakAttached File-=>Added copy-file-binary-mode.diff, #18835

    Back to the top

    Powered by Savane 3.1-cleanup1