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

Support for converting OpenOptions to c_int on UNIX #74943

Open
withoutboats opened this issue Jul 30, 2020 · 1 comment · Fixed by #76110
Open

Support for converting OpenOptions to c_int on UNIX #74943

withoutboats opened this issue Jul 30, 2020 · 1 comment · Fixed by #76110
Labels
A-io Area: std::io, std::fs, std::net and std::path C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@withoutboats
Copy link
Contributor

AFAICT, there's no public API for converting OpenOptions to c_int on UNIX platforms, meaning you cannot use an OpenOptions to open a file yourself using a lower level API from C. For example, this means that I cannot just re-use the OpenOptions type from std in ringbahn, which opens a file using io-uring instead of using the open syscall.

Some way under std::os::unix to convert OpenOptions to c_int would be helpful to avoid duplication. Ideally it would be a method on OpenOptionsExt, but I'm not sure how that could be non-breaking since there is no obvious default implementation. It may just have to be a free function.

@withoutboats withoutboats added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. A-io Area: std::io, std::fs, std::net and std::path C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Jul 30, 2020
@bors bors closed this as completed in e0bc267 Sep 22, 2020
@Dylan-DPC-zz
Copy link

Reopening this because it is being reverted in #77090

@Dylan-DPC-zz Dylan-DPC-zz reopened this Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io Area: std::io, std::fs, std::net and std::path C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants