Skip to content

Commit e43066f

Browse files
committed
Auto merge of #2521 - de-vri-es:tiocm-solarish, r=JohnTitor
Add TIOCM_* constants for Illumos and Solaris. Values taken from https://github.com/illumos/illumos-gate/blob/252adeb303174e992b64771bf9639e63a4d55418/usr/src/uts/common/sys/termios.h#L466-L476 Since Illumos forked from OpenSolaris 10, I'm assuming that Solaris is still using the same values for binary compatibility. But since Solaris is no longer open source, I couldn't find a way to verify it myself.
2 parents cd5de2f + 5563982 commit e43066f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/unix/solarish/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,6 +1981,18 @@ pub const TIOCMGET: ::c_int = tIOC | 29;
19811981
pub const TIOCREMOTE: ::c_int = tIOC | 30;
19821982
pub const TIOCSIGNAL: ::c_int = tIOC | 31;
19831983

1984+
pub const TIOCM_LE: ::c_int = 0o0001;
1985+
pub const TIOCM_DTR: ::c_int = 0o0002;
1986+
pub const TIOCM_RTS: ::c_int = 0o0004;
1987+
pub const TIOCM_ST: ::c_int = 0o0010;
1988+
pub const TIOCM_SR: ::c_int = 0o0020;
1989+
pub const TIOCM_CTS: ::c_int = 0o0040;
1990+
pub const TIOCM_CAR: ::c_int = 0o0100;
1991+
pub const TIOCM_CD: ::c_int = TIOCM_CAR;
1992+
pub const TIOCM_RNG: ::c_int = 0o0200;
1993+
pub const TIOCM_RI: ::c_int = TIOCM_RNG;
1994+
pub const TIOCM_DSR: ::c_int = 0o0400;
1995+
19841996
pub const EPOLLIN: ::c_int = 0x1;
19851997
pub const EPOLLPRI: ::c_int = 0x2;
19861998
pub const EPOLLOUT: ::c_int = 0x4;

0 commit comments

Comments
 (0)