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:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned 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 Files:
   
   
Comment:
   

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 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 UTC smcpeak Attached File- => Added copy-file-binary-mode.diff, #18835

    Back to the top


    Powered by Savane 3.3