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

Move Linux's POLLRDHUP into linux_like and fix its type. #2390

Merged
merged 1 commit into from Sep 12, 2021

Conversation

@sunfishcode
Copy link
Member

@sunfishcode sunfishcode commented Sep 5, 2021

This fixes two errors in #2247.

  • It moves the definitions of POLLRDHUP out of linux_like/linux
    and into linux_like, so that they're available on Android as well.

  • It changes the type from c_int to c_short to match the other
    POLL* flags.

This second change is a breaking change, and I'm fine reverting it and
leaving it as the old type if that's the right thing to do.

@rust-highfive
Copy link

@rust-highfive rust-highfive commented Sep 5, 2021

r? @JohnTitor

(rust-highfive has picked a reviewer for you, use r? to override)

@JohnTitor
Copy link
Member

@JohnTitor JohnTitor commented Sep 12, 2021

I'm not sure how many users are affected by this change but I'd like to follow our breaking change policy, just in case: https://github.com/rust-lang/libc/blob/master/CONTRIBUTING.md#breaking-change-policy

@sunfishcode sunfishcode force-pushed the sunfishcode/linux-pollrdhup branch from 84aae8c to 3b9a06a Sep 12, 2021
@sunfishcode
Copy link
Member Author

@sunfishcode sunfishcode commented Sep 12, 2021

Sounds good. I've now changed the PR to just introduce deprecated warnings for now.

`POLLRDHUP` erroneously has type `c_int`. To prepare for changing it to
`c_short` (and also moving it to `src/unix/linux_like` so that it's
available on Android as well), mark it as deprecated.
@sunfishcode sunfishcode force-pushed the sunfishcode/linux-pollrdhup branch from 3b9a06a to 5fb0c2e Sep 12, 2021
@JohnTitor
Copy link
Member

@JohnTitor JohnTitor commented Sep 12, 2021

Thanks!
@bors r+

@bors
Copy link
Contributor

@bors bors commented Sep 12, 2021

📌 Commit 5fb0c2e has been approved by JohnTitor

@bors
Copy link
Contributor

@bors bors commented Sep 12, 2021

Testing commit 5fb0c2e with merge 82a3396...

@bors
Copy link
Contributor

@bors bors commented Sep 12, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing 82a3396 to master...

@bors bors merged commit 82a3396 into rust-lang:master Sep 12, 2021
11 checks passed
sunfishcode added a commit to sunfishcode/libc that referenced this issue Oct 27, 2021
This was originally posted as rust-lang#2390, but since it was a breaking change,
that PR instead just added `deprecated` warnings. There haven't been any
concerns for a while, so this is now a PR to do the change actually, per
the [breaking-change-policy].

This fixes two errors in rust-lang#2247.

 - It moves the definitions of `POLLRDHUP` out of `linux_like/linux`
   and into `linux_like`, so that they're available on Android as well.

 - It changes the type from `c_int` to `c_short` to match the other
   `POLL*` flags.

[breaking-change-policy]: https://github.com/rust-lang/libc/blob/master/CONTRIBUTING.md#breaking-change-policy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants