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

Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD #1387

Merged
merged 3 commits into from
Jun 11, 2019

Conversation

tormol
Copy link
Contributor

@tormol tormol commented Jun 3, 2019

OpenBSD header | DragonFly header | Linux search
For Linux I've used godbolt compiler explorer to get final values where possible.

Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither.
I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a branch with how far I got.

@rust-highfive
Copy link

r? @gnzlbg

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

@bors
Copy link
Contributor

bors commented Jun 4, 2019

☔ The latest upstream changes (presumably #1389) made this pull request unmergeable. Please resolve the merge conflicts.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 7, 2019

Needs rebasing.

tormol added 3 commits June 7, 2019 20:00
* Change the type of FIONCLEX on apple platforms from c_uint to c_ulong
* Add FIONCLEX, FIONREAD, FIOASYNC, FIOSETOWN and FIOGETOWN
  for DragonFly and OpenBSD
@tormol
Copy link
Contributor Author

tormol commented Jun 7, 2019

Done.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 8, 2019

@tormol three targets are failing, the failures look real.

@tormol
Copy link
Contributor Author

tormol commented Jun 8, 2019

Yes, I didn't check back yesterday, but I've started fixing them.

@tormol
Copy link
Contributor Author

tormol commented Jun 8, 2019

I've dropped the FIOQSIZE commit due to #1391 and the mistake making me doubt the values for the architectures that aren't tested.

I feel more certain about FIONCLEX as the value is similar to FIOCLEX.

@tormol
Copy link
Contributor Author

tormol commented Jun 11, 2019

Github didn't really show it, but I peeled off / removed the commit that added FIOQSIZE, and CI is now green.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 11, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Jun 11, 2019

📌 Commit 2c10c4c has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Jun 11, 2019

⌛ Testing commit 2c10c4c with merge e0ff1e6...

bors added a commit that referenced this pull request Jun 11, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD

[OpenBSD header](https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/filio.h?annotate=1.5) | [DragonFly header](http://gitweb.dragonflybsd.org/dragonfly.git/blame/refs/heads/master:/sys/sys/filio.h) | [Linux search](https://github.com/torvalds/linux/search?q=FIONCLEX+FIOQSIZE&unscoped_q=FIONCLEX+FIOQSIZE&type=Code)
For Linux I've used [godbolt compiler explorer](https://godbolt.org/z/h-C7qM) to get final values where possible.

Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither.
I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a [branch with how far I got](https://github.com/tormol/rust-libc/tree/sigio).
@bors
Copy link
Contributor

bors commented Jun 11, 2019

☀️ Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing e0ff1e6 to master...

@bors bors merged commit 2c10c4c into rust-lang:master Jun 11, 2019
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.

None yet

4 participants