-
Notifications
You must be signed in to change notification settings - Fork 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
Added baudrate constants. #530
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
OpenBSD seems to be reporting the same baud constants as linux? Is this correct? I based my constants off termios-rs and ftp://ftp.usa.openbsd.org/pub/OpenBSD/src/sys/sys/termios.h |
about OpenBSD, it is due to @alexcrichton any way to deal with this situation ? Ideally |
@berkowski could you try to add cfg.header("termios.h"); inside OpenBSD block (but after |
Attempting to correct for conflicting defines from `rpcsvc/rex.h`
Pulled in the |
Having the B* constants in `unix/notbsd/mod.rs` passed CI tests except for powerpc. So we'll try moving into individual arch/ABI that the CI tests cover for now. This commit should pass for the following: - mips32 - mips64 - musl32 - musl64 - android32 - android64 - arm32 - aarch64 - x86 - x86_64 Then we can figure out the powerpc variants. This also prevents potential errors for sparc64 which is not covered by CI.
Ok, so at this point we seem to have workable solutions except for:
|
Looks great to me! I'm fine r+'ing once CI passes |
@bors: r+ |
📌 Commit fb11c7a has been approved by |
Added baudrate constants. Addresses #528, adding baudrate constants for `bsd` and `notbsd` flavors of `unix`. Passes `libc-test` locally on ubuntu 14.04 LTS with the additional (uncommitted) entries into in `build.rs`: ``` cfg.skip_const( move |name| { match name { # ... snip ... "PTRACE_O_SUSPEND_SECCOMP" | "CLONE_NEWCGROUP" | "NETLINK_LIST_MEMBERSHIPS" | "NETLINK_LISTEN_ALL_NSID" | "NETLINK_CAP_ACK" | "PR_CAP_AMBIENT_CLEAR_ALL" | "PR_CAP_AMBIENT_LOWER" | "PR_CAP_AMBIENT_RAISE" | "PR_CAP_AMBIENT_IS_SET" | "PR_CAP_AMBIENT" | "PR_FP_MODE_FRE" | "PR_FP_MODE_FR" | "PR_GET_FP_MODE" | "PR_SET_FP_MODE" | "PR_MPX_DISABLE_MANAGEMENT" | "PR_MPX_ENABLE_MANAGEMENT" | "PR_GET_THP_DISABLE" | "PR_SET_THP_DISABLE" | "PR_SET_MM_MAP_SIZE" | "PR_GET_MM_MAP_SIZE" | "PR_SET_MM_MAP" | "NLM_F_DUMP_FILTERED" | "EPOLLEXCLUSIVE" => true, _ => false, } }); ``` I'm assuming this is because I'm stuck using `linux-libc-dev:3.13.0-24.46` for the moment and those constants are defined in newer versions.
💔 Test failed - status-travis |
Traveling over the next couple of days - I'll peck at the issues when I can |
The powerpc errors are confusing:
while
—https://github.com/torvalds/linux/blob/v4.9/arch/powerpc/include/uapi/asm/termbits.h#L139 |
The openbsd errors are also confusing:
while
(50 is 0x32 and 75 is 0x4b) |
@kamalmarhubi for openbsd the reason is values from for powerpc, it could be the same problem (I don't check source code deeper). |
@semarie: I tried including The PPC stuff is interesting. I found https://lists.ozlabs.org/pipermail/linuxppc-dev/1999-January/000634.html which looks similar. Maybe this is an issue with |
@berkowski yes it is where I intended but it isn't enough (I didn't think about that before).
|
@semarie Ah, ok. In that case I'll revert the change to build.rs in a new commit. |
Adding `termios.h` behind `rpcsvc/rex.h` does not solve the #define clash since `rex.h` also defines the `_SYS_TERMIOS_H_` include guard.
``` export TARGET=x86_64-unknown-openbsd export QEMU=openbsd.qcow2 sh ci/run-docker.sh $TARGET ``` Passes when run localy.
it seems a bit odd that the test still pass without |
I couldn't find anything in Anyway, seems to be good to go now. |
@bors: r+ |
📌 Commit 0048148 has been approved by |
Added baudrate constants. Addresses #528, adding baudrate constants for `bsd` and `notbsd` flavors of `unix`. Passes `libc-test` locally on ubuntu 14.04 LTS with the additional (uncommitted) entries into in `build.rs`: ``` cfg.skip_const( move |name| { match name { # ... snip ... "PTRACE_O_SUSPEND_SECCOMP" | "CLONE_NEWCGROUP" | "NETLINK_LIST_MEMBERSHIPS" | "NETLINK_LISTEN_ALL_NSID" | "NETLINK_CAP_ACK" | "PR_CAP_AMBIENT_CLEAR_ALL" | "PR_CAP_AMBIENT_LOWER" | "PR_CAP_AMBIENT_RAISE" | "PR_CAP_AMBIENT_IS_SET" | "PR_CAP_AMBIENT" | "PR_FP_MODE_FRE" | "PR_FP_MODE_FR" | "PR_GET_FP_MODE" | "PR_SET_FP_MODE" | "PR_MPX_DISABLE_MANAGEMENT" | "PR_MPX_ENABLE_MANAGEMENT" | "PR_GET_THP_DISABLE" | "PR_SET_THP_DISABLE" | "PR_SET_MM_MAP_SIZE" | "PR_GET_MM_MAP_SIZE" | "PR_SET_MM_MAP" | "NLM_F_DUMP_FILTERED" | "EPOLLEXCLUSIVE" => true, _ => false, } }); ``` I'm assuming this is because I'm stuck using `linux-libc-dev:3.13.0-24.46` for the moment and those constants are defined in newer versions.
☀️ Test successful - status-appveyor, status-travis |
Addresses #528, adding baudrate constants for
bsd
andnotbsd
flavors ofunix
.Passes
libc-test
locally on ubuntu 14.04 LTS with the additional (uncommitted) entries into inbuild.rs
:I'm assuming this is because I'm stuck using
linux-libc-dev:3.13.0-24.46
for the moment and those constants are defined in newer versions.