-
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 more termios constants #625
Conversation
7da6b53
to
dbb9239
Compare
Tests pass and I've successfully used these constants in a downstream PR, so I think this should be RTM. |
Nvm, missing some constants on a few platforms I think. |
src/unix/bsd/apple/mod.rs
Outdated
pub const TAB3: ::c_int = 0x00000004; | ||
pub const VT0: ::c_int = 0x00000000; | ||
pub const VT1: ::c_int = 0x00010000; | ||
pub const NL0: ::tcflag_t = 0x00000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately while likely more correct this is a breaking change, so it'll have to happen in a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can file that as a separate PR for that change then. Unfortunate that breaking changes can't be done to libc
even though it's < 1.0. Is there a roadmap for getting addressing these breaking changes in a reasonable timeframe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not currently, no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I've not changed the datatypes for the non-apply BSD platforms in this PR, can I keep those as tcflag_t
types then and just make sure I don't touch the old ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or do you want those constants to be c_int
across all platforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah switching to tcflag_t
seems fine by me.
This failed CI because the Mac builds mostly timed out, but they should pass. Could someone with Travis permissions rerun the build or r+ it so homu will? |
@bors: r+ |
📌 Commit 8f4de54 has been approved by |
Add more termios constants Went through and found some more termios constants that were missing and added them. I skipped some platforms (solaris, uclibc) and assumed Android has the same constants are Linux, as I couldn't find a good reference for what Android exposes, but it generally follows linux, so I assumed the same was true for some of those values. ## References: FreeBSD: * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/sys/sys/_termios.h * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/include/termios.h NetBSD: https://github.com/NetBSD/src/blob/0bff031265b50be8e8b7719aed82212928d6c1df/sys/sys/termios.h musl: /usr/x86_64-linux-musl/include/bits/termios.h (identical to Linux-x86_64) linux: /usr/include/bits/termios.h OpenBSD: https://github.com/openbsd/src/blob/5271000b44abe23907b73bbb3aa38ddf4a0bce08/sys/sys/termios.h DragonFlyBSD: * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/_termios.h * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/termios.h Android: Just use the same as Linux uclibc: skipped haiku-os: http://cgit.haiku-os.org/haiku/tree/headers/posix/termios.h mac: /usr/include/sys/termios.h and /usr/include/sys/_types/_posix_vdisable.h solaris: skipped bitrig (follows openbsd): https://github.com/bitrig/bitrig/blob/d31f5220a98fae4e74abafe27c8d150843cc8105/sys/sys/termios.h
💔 Test failed - status-travis |
Still failing because OS X builds in Travis aren't even running. I've pushed this branch again to force a new test run, and hopefully this one passes. |
@bors: retry |
@bors: r+ |
📌 Commit 297d5b7 has been approved by |
Add more termios constants Went through and found some more termios constants that were missing and added them. I skipped some platforms (solaris, uclibc) and assumed Android has the same constants are Linux, as I couldn't find a good reference for what Android exposes, but it generally follows linux, so I assumed the same was true for some of those values. ## References: FreeBSD: * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/sys/sys/_termios.h * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/include/termios.h NetBSD: https://github.com/NetBSD/src/blob/0bff031265b50be8e8b7719aed82212928d6c1df/sys/sys/termios.h musl: /usr/x86_64-linux-musl/include/bits/termios.h (identical to Linux-x86_64) linux: /usr/include/bits/termios.h OpenBSD: https://github.com/openbsd/src/blob/5271000b44abe23907b73bbb3aa38ddf4a0bce08/sys/sys/termios.h DragonFlyBSD: * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/_termios.h * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/termios.h Android: Just use the same as Linux uclibc: skipped haiku-os: http://cgit.haiku-os.org/haiku/tree/headers/posix/termios.h mac: /usr/include/sys/termios.h and /usr/include/sys/_types/_posix_vdisable.h solaris: skipped bitrig (follows openbsd): https://github.com/bitrig/bitrig/blob/d31f5220a98fae4e74abafe27c8d150843cc8105/sys/sys/termios.h
💔 Test failed - status-travis |
Looks like something's wrong with the mac runners on Travis right now, and I don't know how to fix that. travis's status page doesn't indicate anything bad is going on. |
@bors: retry |
@bors: r+ |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 297d5b7 has been approved by |
Add more termios constants Went through and found some more termios constants that were missing and added them. I skipped some platforms (solaris, uclibc) and assumed Android has the same constants are Linux, as I couldn't find a good reference for what Android exposes, but it generally follows linux, so I assumed the same was true for some of those values. ## References: FreeBSD: * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/sys/sys/_termios.h * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/include/termios.h NetBSD: https://github.com/NetBSD/src/blob/0bff031265b50be8e8b7719aed82212928d6c1df/sys/sys/termios.h musl: /usr/x86_64-linux-musl/include/bits/termios.h (identical to Linux-x86_64) linux: /usr/include/bits/termios.h OpenBSD: https://github.com/openbsd/src/blob/5271000b44abe23907b73bbb3aa38ddf4a0bce08/sys/sys/termios.h DragonFlyBSD: * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/_termios.h * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/termios.h Android: Just use the same as Linux uclibc: skipped haiku-os: http://cgit.haiku-os.org/haiku/tree/headers/posix/termios.h mac: /usr/include/sys/termios.h and /usr/include/sys/_types/_posix_vdisable.h solaris: skipped bitrig (follows openbsd): https://github.com/bitrig/bitrig/blob/d31f5220a98fae4e74abafe27c8d150843cc8105/sys/sys/termios.h
💔 Test failed - status-travis |
@bors: retry
…On Mon, Jun 26, 2017 at 3:40 PM, bors ***@***.***> wrote:
💔 Test failed - status-travis
<https://travis-ci.org/rust-lang/libc/builds/247104626?utm_source=github_status&utm_medium=notification>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#625 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95AhkaFk8fJYJ3pyixCyoWxMLx-dLks5sIBc9gaJpZM4OCu10>
.
|
Add more termios constants Went through and found some more termios constants that were missing and added them. I skipped some platforms (solaris, uclibc) and assumed Android has the same constants are Linux, as I couldn't find a good reference for what Android exposes, but it generally follows linux, so I assumed the same was true for some of those values. ## References: FreeBSD: * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/sys/sys/_termios.h * https://github.com/freebsd/freebsd/blob/d39171bb1f2256bd3bf018314aec600f79b89bc6/include/termios.h NetBSD: https://github.com/NetBSD/src/blob/0bff031265b50be8e8b7719aed82212928d6c1df/sys/sys/termios.h musl: /usr/x86_64-linux-musl/include/bits/termios.h (identical to Linux-x86_64) linux: /usr/include/bits/termios.h OpenBSD: https://github.com/openbsd/src/blob/5271000b44abe23907b73bbb3aa38ddf4a0bce08/sys/sys/termios.h DragonFlyBSD: * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/_termios.h * https://github.com/DragonFlyBSD/DragonFlyBSD/blob/ddad68003a1b070d6955ae737c834cd3267d3ead/sys/sys/termios.h Android: Just use the same as Linux uclibc: skipped haiku-os: http://cgit.haiku-os.org/haiku/tree/headers/posix/termios.h mac: /usr/include/sys/termios.h and /usr/include/sys/_types/_posix_vdisable.h solaris: skipped bitrig (follows openbsd): https://github.com/bitrig/bitrig/blob/d31f5220a98fae4e74abafe27c8d150843cc8105/sys/sys/termios.h
☀️ Test successful - status-appveyor, status-travis |
Man, Travis was super difficult on this PR. Thanks tho for helping push this through! |
Correct datatype for various termios constants This was a part of #625, but I moved it to a separate PR as it's a breaking change and those are currently blocked for Tier 1 platforms.
Correct datatype for various termios constants This was a part of #625, but I moved it to a separate PR as it's a breaking change and those are currently blocked for Tier 1 platforms.
Went through and found some more termios constants that were missing and added them. I skipped some platforms (solaris, uclibc) and assumed Android has the same constants are Linux, as I couldn't find a good reference for what Android exposes, but it generally follows linux, so I assumed the same was true for some of those values.
References:
FreeBSD:
NetBSD: https://github.com/NetBSD/src/blob/0bff031265b50be8e8b7719aed82212928d6c1df/sys/sys/termios.h
musl: /usr/x86_64-linux-musl/include/bits/termios.h (identical to Linux-x86_64)
linux: /usr/include/bits/termios.h
OpenBSD: https://github.com/openbsd/src/blob/5271000b44abe23907b73bbb3aa38ddf4a0bce08/sys/sys/termios.h
DragonFlyBSD:
Android: Just use the same as Linux
uclibc: skipped
haiku-os: http://cgit.haiku-os.org/haiku/tree/headers/posix/termios.h
mac: /usr/include/sys/termios.h and /usr/include/sys/_types/_posix_vdisable.h
solaris: skipped
bitrig (follows openbsd): https://github.com/bitrig/bitrig/blob/d31f5220a98fae4e74abafe27c8d150843cc8105/sys/sys/termios.h