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

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

r? @JohnTitor

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

@JohnTitor
Copy link
Member

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
Copy link
Member Author

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.
@JohnTitor
Copy link
Member

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Sep 12, 2021

📌 Commit 5fb0c2e has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Sep 12, 2021

⌛ Testing commit 5fb0c2e with merge 82a3396...

@bors
Copy link
Contributor

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
sunfishcode added a commit to sunfishcode/libc that referenced this pull request 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
bors added a commit that referenced this pull request Oct 30, 2021
…Titor

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

This was originally posted as #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 #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
Development

Successfully merging this pull request may close these issues.

4 participants