-
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
Add std support to cygwin target #137621
Add std support to cygwin target #137621
Conversation
All reactions
-
👍 9 reactions -
❤️ 1 reaction
This comment has been minimized.
This comment has been minimized.
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.
Thank you for the PR! This looks really good to me – I can't help but be impressed by the astounding level of support that Cygwin has for even niche POSIX APIs...
Sorry, something went wrong.
All reactions
These commits modify compiler targets. |
All reactions
Sorry, something went wrong.
Need rust-lang/rust#137621 to test. --------- Co-authored-by: Joe Richey <dev@richey.us>
☔ The latest upstream changes (presumably #138279) made this pull request unmergeable. Please resolve the merge conflicts. |
All reactions
Sorry, something went wrong.
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
Signed-off-by: Ookiineko <chiisaineko@protonmail.com>
Great, thank you! |
All reactions
Sorry, something went wrong.
Add std support to cygwin target
Add std support to cygwin target
Rollup of 25 pull requests Successful merges: - rust-lang#134076 (Stabilize `std::io::ErrorKind::InvalidFilename`) - rust-lang#136842 (Add libstd support for Trusty targets) - rust-lang#137314 (change definitely unproductive cycles to error) - rust-lang#137504 (Move methods from Map to TyCtxt, part 4.) - rust-lang#137621 (Add std support to cygwin target) - rust-lang#137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - rust-lang#138109 (make precise capturing args in rustdoc Json typed) - rust-lang#138161 (Add PeekMut::refresh) - rust-lang#138162 (Update the standard library to Rust 2024) - rust-lang#138174 (Elaborate trait assumption in `receiver_is_dispatchable`) - rust-lang#138175 (Support rmeta inputs for --crate-type=bin --emit=obj) - rust-lang#138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr) - rust-lang#138313 (Update books) - rust-lang#138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js) - rust-lang#138331 (Use `RUSTC_LINT_FLAGS` more) - rust-lang#138333 (Rebuild llvm spuriously less frequently) - rust-lang#138343 (Enable `f16` tests for `powf`) - rust-lang#138345 (Some autodiff cleanups) - rust-lang#138346 (naked functions: on windows emit `.endef` without the symbol name) - rust-lang#138347 (Reduce `kw::Empty` usage, part 2) - rust-lang#138360 (Fix false-positive in `expr_or_init` and in the `invalid_from_utf8` lint) - rust-lang#138371 (Update compiletest's `has_asm_support` to match rustc) - rust-lang#138372 (Refactor `pick2_mut` & `pick3_mut` to use `get_disjoint_mut`) - rust-lang#138376 (Item-related cleanups) - rust-lang#138377 (Remove unnecessary lifetime from `PatInfo`.) r? `@ghost` `@rustbot` modify labels: rollup
Thank you for your approval @joboet, but I have pushed one more commit to fix the panic handling for cygwin. It should be the same as |
All reactions
Sorry, something went wrong.
@rustbot ready |
All reactions
Sorry, something went wrong.
@rustbot label -S-waiting-on-bors |
All reactions
Sorry, something went wrong.
@bors r+ |
All reactions
-
👍 1 reaction
Sorry, something went wrong.
Rollup of 9 pull requests Successful merges: - rust-lang#136355 (Add `*_value` methods to proc_macro lib) - rust-lang#137621 (Add std support to cygwin target) - rust-lang#137793 (Stablize anonymous pipe) - rust-lang#138341 (std: Mention clone-on-write mutation in Arc<T>) - rust-lang#138517 (Improve upvar analysis for deref of child capture) - rust-lang#138584 (Update Rust Foundation links in Readme) - rust-lang#138586 (Document `#![register_tool]`) - rust-lang#138590 (Flatten and simplify some control flow 🫓) - rust-lang#138592 (update change entry for rust-lang#137147) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137621 - Berrysoft:cygwin-std, r=joboet Add std support to cygwin target
pub fn set_linger(&self, linger: Option<Duration>) -> io::Result<()> { | ||
let linger = libc::linger { | ||
l_onoff: linger.is_some() as libc::c_ushort, | ||
l_linger: linger.unwrap_or_default().as_secs() as libc::c_ushort, |
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.
should this be a try_into().map_error(|_| libc::ERANGE)
?
Sorry, something went wrong.
All reactions
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.
It's just an imitation of the code above, for other platforms. Other platforms also use as
.
Sorry, something went wrong.
All reactions
Successfully merging this pull request may close these issues.
None yet
Most changes are ported from Ookiineko's repo.
Needed: