-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
r? @gnzlbg (rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #1389) made this pull request unmergeable. Please resolve the merge conflicts. |
Needs rebasing. |
* 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
Done. |
@tormol three targets are failing, the failures look real. |
Yes, I didn't check back yesterday, but I've started fixing them. |
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. |
Github didn't really show it, but I peeled off / removed the commit that added FIOQSIZE, and CI is now green. |
@bors: r+ |
📌 Commit 2c10c4c has been approved by |
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).
☀️ Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-travis, status-appveyor |
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.