-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
std: move stdio to sys
#136780
base: master
Are you sure you want to change the base?
std: move stdio to sys
#136780
Conversation
This comment has been minimized.
This comment has been minimized.
5ebfcb1
to
65f4376
Compare
@@ -89,7 +96,7 @@ impl io::Write for Stderr { | |||
} | |||
|
|||
pub fn is_ebadf(err: &io::Error) -> bool { | |||
err.raw_os_error() == Some(libc::EBADF as i32) | |||
err.raw_os_error() == Some(EBADF as i32) | |||
} | |||
|
|||
pub const STDIN_BUF_SIZE: usize = crate::sys::io::DEFAULT_BUF_SIZE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to change Hermit from pub const STDIN_BUF_SIZE: usize = 128;
to DEFAULT_BUF_SIZE
?
pub const DEFAULT_BUF_SIZE: usize = if cfg!(target_os = "espidf") { 512 } else { 8 * 1024 };
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I didn't. Whoops! 😄 Though maybe that isn't too bad a thing anyway, @mkroening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds sensible to me, thanks! :) 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an official reviewer, but having been working in this area recently, this looks good to me.
☔ The latest upstream changes (presumably #137046) made this pull request unmergeable. Please resolve the merge conflicts. |
65f4376
to
9c737e0
Compare
☔ The latest upstream changes (presumably #137163) made this pull request unmergeable. Please resolve the merge conflicts. |
9c737e0
to
a1a2a46
Compare
@bors r+ |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#120580 (Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants) - rust-lang#132268 (Impl TryFrom<Vec<u8>> for String) - rust-lang#136093 (Match Ergonomics 2024: update old-edition behavior of feature gates) - rust-lang#136344 (Suggest replacing `.` with `::` in more error diagnostics.) - rust-lang#136690 (Use more explicit and reliable ptr select in sort impls) - rust-lang#136815 (CI: Stop /msys64/bin from being prepended to PATH in msys2 shell) - rust-lang#136923 (Lint `#[must_use]` attributes applied to methods in trait impls) - rust-lang#137155 (Organize `OsString`/`OsStr` shims) - rust-lang#137225 (vectorcall ABI: require SSE2) Failed merges: - rust-lang#136780 (std: move stdio to `sys`) r? `@ghost` `@rustbot` modify labels: rollup
The merge conflict is with #120580. |
☔ The latest upstream changes (presumably #137290) made this pull request unmergeable. Please resolve the merge conflicts. |
Hey, gentle nudge :). I'd like this to be merged so I can rebase my PRs onto it. Would you mind resolving the conflicts so it can get back into the queue? |
As per rust-lang#117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
a1a2a46
to
ee7fded
Compare
☔ The latest upstream changes (presumably #137397) made this pull request unmergeable. Please resolve the merge conflicts. |
Since this is frequently generating conflicts @bors p=1 |
Sorry for the most recent conflict. I had opened a batch of PRs which I thought would land slower than this. I'm now holding off on any further conflicts from my work. |
After opening #137650, I have some more feedback: I think |
As per #117276, this moves the platform definitions of
Stdout
and friends intosys
. This PR also unifies the UNIX and Hermit implementations and moves the__rust_print_err
function needed by libunwind on SGX into the dedicated module for such helper functions.