Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unix.open_flag is missing O_BINARY and O_TEXT #3265

Closed
vicuna opened this issue Nov 10, 2004 · 3 comments
Closed

Unix.open_flag is missing O_BINARY and O_TEXT #3265

vicuna opened this issue Nov 10, 2004 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Nov 10, 2004

Original bug ID: 3265
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: feature
Category: otherlibs

Bug description

Full_Name: George Necula
Version: 3.08.1
OS: cygwin
Submission from: raw.cs.berkeley.edu (128.32.153.230)

Hi,

I tracked down a bug in the Unison file synchronizer, which was using
Unix.openfile to copy a binary file. I could not fix the bug easily because
Unix.open_flag is missing O_BINARY. There is a workaround (use the standard IO)
but I wonder why is O_BINARY missing. It would be useful in cygwin, and can be
ignored otherwise.

Thanks,
George.

@vicuna
Copy link
Author

vicuna commented Feb 2, 2005

Comment author: administrator

Cygwin is the only system where BINARY and TEXT mode need to be applied at the
Unix level (the native windows ports need them only at the channel level). I'll
leave this as a feature wish for the time being, but I don't like the idea of
polluting the API just for Cygwin. XL, 2004-02-02

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 18, 2020
@xavierleroy
Copy link
Contributor

At some point in the 00's, Cygwin switched the default mode for mount points to binary, meaning that open() opens files in binary mode by default. This is exactly the behavior we want for Unix.openfile (no translation of file contents ever), so we are good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants