Skip to content

Adds many socket related constants #543

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

Merged
merged 5 commits into from
Mar 1, 2017
Merged

Adds many socket related constants #543

merged 5 commits into from
Mar 1, 2017

Conversation

berkowski
Copy link
Contributor

Started off adding a few constants to help cleaning up some nix-rust/nix issues. Went a little.. further.

Adds lots of socket-related constants (PF_*, MSG_*, AF_*, SO_*, SOL_*, etc.) to linux/bsd flavors.

Added constants to bsd/frebsdlike/dragonfly for completeness, though they aren't covered by CI. Did not touch notbsd/linux/s390x.rs

@alexcrichton
Copy link
Member

@bors: r+

Nice!

@semarie
Copy link
Contributor

semarie commented Feb 28, 2017

constants like AF_MAX, PF_MAX, NET_RT_MAXID, NET_MAXID, ... aren't intent to be exported as public symbols. As soon a new element is added, the constant will change, and it will requires a major bump for libc.

FreeBSD code has comment on that for already included constants that are waiting for libc major crank to be removed.

@alexcrichton
Copy link
Member

Changing the values of constants over time should be fine (that's what happens in C after all) but changing the type is what's a breaking change which I don't think changes in these cases?

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@berkowski
Copy link
Contributor Author

@semarie I had noticed that comment in the FreeBSD portion and thought it was limited to just the *_MAXID defines (though I see I missed NET_RT_MAXID). I can remove AF_MAX, PF_MAX or follow the example and set them #[doc(hidden)]

@bors
Copy link
Contributor

bors commented Feb 28, 2017

📌 Commit 69fb9a2 has been approved by alexcrichton

@berkowski
Copy link
Contributor Author

Just realized I never did AppleBSD. I'll get that working while AWS sorts itself out.

@kamalmarhubi
Copy link
Contributor

kamalmarhubi commented Mar 1, 2017

@berkowski is this good to go? I'm planning to send a release bump PR but this looks like it's ready and was just blocked on various outages. Would rather include it than make it wait for another release. Other PRs are significantly less close to done.

@berkowski
Copy link
Contributor Author

@kamalmarhubi Yup, ready to go on my end baring any revisions requested by maintainers.

@alexcrichton
Copy link
Member

@bors: r+

Oh oops sorry!

@bors
Copy link
Contributor

bors commented Mar 1, 2017

📌 Commit 985ea40 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Mar 1, 2017

⌛ Testing commit 985ea40 with merge d197e21...

bors added a commit that referenced this pull request Mar 1, 2017
Adds many socket related constants

Started off adding a few constants to help cleaning up some `nix-rust/nix` issues.  Went a little.. further.

Adds lots of socket-related constants (`PF_*`, `MSG_*`, `AF_*`, `SO_*`, `SOL_*`, etc.) to linux/bsd flavors.

Added constants to `bsd/frebsdlike/dragonfly` for completeness, though they aren't covered by CI.  Did not touch `notbsd/linux/s390x.rs`
@bors
Copy link
Contributor

bors commented Mar 1, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing d197e21 to master...

@bors bors merged commit 985ea40 into rust-lang:master Mar 1, 2017
danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
Add support for `smlad` and `smlsd`.

- `smlad`: Dual 16-bit Signed Multiply with Addition and
           32-bit accumulation

- `smlsd`: Dual 16-bit Signed Multiply with Subtraction and
           32-bit accumulation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants