-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,6 +5,16 @@ pub type regoff_t = ::c_int; | |||||||||||||||||||||||||||||||||||||||||||||||||||
pub type __rlimit_resource_t = ::c_uint; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
pub type __priority_which_t = ::c_uint; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
cfg_if! { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
if #[cfg(doc)] { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
// Used in `linux::arch` to define ioctl constants. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
pub(crate) type Ioctl = ::c_int; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
#[doc(hidden)] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
pub type Ioctl = ::c_int; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
de-vri-es
Author
Contributor
|
pub const TCFLSH: ::c_int = 0x540B; | |
pub const TCGETA: ::c_int = 0x5405; | |
pub const TCGETS: ::c_int = 0x5401; | |
pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; | |
pub const TCSBRK: ::c_int = 0x5409; | |
pub const TCSETA: ::c_int = 0x5406; | |
pub const TCSETAF: ::c_int = 0x5408; | |
pub const TCSETAW: ::c_int = 0x5407; | |
pub const TCSETS: ::c_int = 0x5402; | |
pub const TCSETSF: ::c_int = 0x5404; | |
pub const TCSETSW: ::c_int = 0x5403; | |
pub const TCXONC: ::c_int = 0x540A; | |
pub const TIOCCONS: ::c_int = 0x541D; | |
pub const TIOCEXCL: ::c_int = 0x540C; | |
pub const TIOCGPGRP: ::c_int = 0x540F; | |
pub const TIOCGSERIAL: ::c_int = 0x541E; | |
pub const TIOCGSOFTCAR: ::c_int = 0x5419; | |
pub const TIOCINQ: ::c_int = FIONREAD; | |
pub const TIOCLINUX: ::c_int = 0x541C; | |
pub const TIOCNXCL: ::c_int = 0x540D; | |
pub const TIOCOUTQ: ::c_int = 0x5411; | |
pub const TIOCSCTTY: ::c_int = 0x540E; | |
pub const TIOCSPGRP: ::c_int = 0x5410; | |
pub const TIOCSSOFTCAR: ::c_int = 0x541A; | |
pub const TIOCSTI: ::c_int = 0x5412; |
Turning them all into c_ulong
would be a breaking change :(
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
skrap
Jan 4, 2022
•
edited
Loading
Contributor
edited
I've been slowly fixing up that arch, but I haven't had the need to look at termios-related functionality. PRs like #2615 make me wonder if it's always been broken in uclibc!
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
skrap
Jan 4, 2022
Contributor
Also I'd note that uclibc
is tier-3 at best, so IMO backwards compatibility takes a back seat to correctness and cross-platform compatibility, at least right now.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
de-vri-es
Jan 4, 2022
•
edited
Loading
Author
Contributor
edited
Right. Whenever I do an ioctl I write something like ioctl(..., SOME_CONSTANT as _, ...)
to avoid dealing with wrong integer types across platforms. Not super pretty, but it works and it's future proof :]
Anyway, I'm all for fixing the type, but I don't think my opinion on the matter matters much as I'm not a maintainer. Either way, you have my thanks for trying to clean it up :)
ship has sorta sailed on this one, but since
ioctl
is defined on uclibc asextern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
, should this be::c_ulong
instead? I can make the PR, if so.(ref https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/include/sys/ioctl.h#n41 )