Skip to content

Commit a0952c2

Browse files
committed
Add TIOCSBRK/TIOCCBRK to more supported platforms
Reorganized some constants as well so they're grouped a bit better.
1 parent a3e2b5d commit a0952c2

File tree

12 files changed

+25
-11
lines changed

12 files changed

+25
-11
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,8 +1719,6 @@ pub const TIOCGETD: ::c_ulong = 0x4004741a;
17191719
pub const TIOCSETD: ::c_ulong = 0x8004741b;
17201720
pub const TIOCIXON: ::c_uint = 0x20007481;
17211721
pub const TIOCIXOFF: ::c_uint = 0x20007480;
1722-
pub const TIOCSBRK: ::c_uint = 0x2000747b;
1723-
pub const TIOCCBRK: ::c_uint = 0x2000747a;
17241722
pub const TIOCSDTR: ::c_uint = 0x20007479;
17251723
pub const TIOCCDTR: ::c_uint = 0x20007478;
17261724
pub const TIOCGPGRP: ::c_ulong = 0x40047477;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,6 @@ pub const TIOCSPGRP: ::c_ulong = 0x80047476;
10141014
pub const TIOCGPGRP: ::c_uint = 0x40047477;
10151015
pub const TIOCCDTR: ::c_uint = 0x20007478;
10161016
pub const TIOCSDTR: ::c_uint = 0x20007479;
1017-
pub const TIOCCBRK: ::c_uint = 0x2000747a;
1018-
pub const TIOCSBRK: ::c_uint = 0x2000747b;
10191017
pub const TTYDISC: ::c_int = 0x0;
10201018
pub const SLIPDISC: ::c_int = 0x4;
10211019
pub const PPPDISC: ::c_int = 0x5;

src/unix/bsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ pub const BIOCGHDRCMPLT: ::c_ulong = 0x40044274;
450450
pub const BIOCSHDRCMPLT: ::c_ulong = 0x80044275;
451451
pub const SIOCGIFADDR: ::c_ulong = 0xc0206921;
452452

453+
pub const TIOCCBRK: ::c_uint = 0x2000747a;
454+
pub const TIOCSBRK: ::c_uint = 0x2000747b;
455+
453456
f! {
454457
pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr {
455458
if (*mhdr).msg_controllen as usize >= ::mem::size_of::<::cmsghdr>() {

src/unix/linux_like/linux/gnu/b32/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ pub const PTRACE_SETFPREGS: ::c_uint = 15;
237237
pub const PTRACE_GETREGS: ::c_uint = 12;
238238
pub const PTRACE_SETREGS: ::c_uint = 13;
239239

240+
pub const TIOCSBRK: ::c_int = 0x5427;
241+
pub const TIOCCBRK: ::c_int = 0x5428;
242+
240243
#[link(name = "util")]
241244
extern "C" {
242245
pub fn sysctl(

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,6 @@ pub const RTLD_DEEPBIND: ::c_int = 0x8;
204204
pub const RTLD_GLOBAL: ::c_int = 0x100;
205205
pub const RTLD_NOLOAD: ::c_int = 0x4;
206206

207-
pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
208-
pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
209-
pub const TIOCGRS485: ::c_int = 0x542E;
210-
pub const TIOCSRS485: ::c_int = 0x542F;
211-
212207
pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
213208
pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
214209
pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
@@ -436,7 +431,13 @@ pub const TIOCMGET: ::c_ulong = 0x5415;
436431
pub const TIOCMBIS: ::c_ulong = 0x5416;
437432
pub const TIOCMBIC: ::c_ulong = 0x5417;
438433
pub const TIOCMSET: ::c_ulong = 0x5418;
434+
pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
435+
pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
439436
pub const TIOCCONS: ::c_ulong = 0x541D;
437+
pub const TIOCSBRK: ::c_ulong = 0x5427;
438+
pub const TIOCCBRK: ::c_ulong = 0x5428;
439+
pub const TIOCGRS485: ::c_int = 0x542E;
440+
pub const TIOCSRS485: ::c_int = 0x542F;
440441

441442
pub const TIOCM_ST: ::c_int = 0x008;
442443
pub const TIOCM_SR: ::c_int = 0x010;

src/unix/linux_like/linux/gnu/b64/mips64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,8 @@ pub const TCSETAF: ::c_ulong = 0x5404;
862862
pub const TCSBRK: ::c_ulong = 0x5405;
863863
pub const TCXONC: ::c_ulong = 0x5406;
864864
pub const TCFLSH: ::c_ulong = 0x5407;
865+
pub const TIOCSBRK: ::c_ulong = 0x5427;
866+
pub const TIOCCBRK: ::c_ulong = 0x5428;
865867
pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
866868
pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
867869
pub const TIOCINQ: ::c_ulong = 0x467f;

src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ pub const TIOCMBIS: ::c_ulong = 0x5416;
430430
pub const TIOCMBIC: ::c_ulong = 0x5417;
431431
pub const TIOCMSET: ::c_ulong = 0x5418;
432432
pub const TIOCCONS: ::c_ulong = 0x541D;
433+
pub const TIOCSBRK: ::c_ulong = 0x5427;
434+
pub const TIOCCBRK: ::c_ulong = 0x5428;
433435
pub const TIOCGRS485: ::c_int = 0x542E;
434436
pub const TIOCSRS485: ::c_int = 0x542F;
435437

src/unix/linux_like/linux/gnu/b64/s390x.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ pub const TIOCMBIC: ::c_ulong = 0x5417;
564564
pub const TIOCMSET: ::c_ulong = 0x5418;
565565
pub const FIONREAD: ::c_ulong = 0x541B;
566566
pub const TIOCCONS: ::c_ulong = 0x541D;
567+
pub const TIOCSBRK: ::c_ulong = 0x5427;
568+
pub const TIOCCBRK: ::c_ulong = 0x5428;
567569

568570
pub const TCSANOW: ::c_int = 0;
569571
pub const TCSADRAIN: ::c_int = 1;

src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ pub const TIOCMBIC: ::c_ulong = 0x8004746b;
409409
pub const TIOCMBIS: ::c_ulong = 0x8004746c;
410410
pub const TIOCMSET: ::c_ulong = 0x8004746d;
411411
pub const TIOCSTI: ::c_ulong = 0x80017472;
412+
pub const TIOCCBRK: ::c_ulong = 0x2000747a;
413+
pub const TIOCSBRK: ::c_ulong = 0x2000747b;
412414
pub const TIOCSCTTY: ::c_ulong = 0x20007484;
413415

414416
pub const TIOCM_ST: ::c_int = 0x008;

src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,8 @@ pub const TIOCOUTQ: ::c_ulong = 0x5411;
821821
pub const TIOCGWINSZ: ::c_ulong = 0x5413;
822822
pub const TIOCSWINSZ: ::c_ulong = 0x5414;
823823
pub const FIONREAD: ::c_ulong = 0x541B;
824+
pub const TIOCSBRK: ::c_ulong = 0x5427;
825+
pub const TIOCCBRK: ::c_ulong = 0x5428;
824826

825827
// offsets in user_regs_structs, from sys/reg.h
826828
pub const R15: ::c_int = 0;

src/unix/linux_like/linux/musl/b32/hexagon.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ pub const TCSETX: ::c_int = 21555;
726726
pub const TCSETXF: ::c_int = 21556;
727727
pub const TCSETXW: ::c_int = 21557;
728728
pub const TCXONC: ::c_int = 21514;
729-
pub const TIOCCBRK: ::c_int = 21544;
730729
pub const TIOCCONS: ::c_int = 21533;
731730
pub const TIOCEXCL: ::c_int = 21516;
732731
pub const TIOCGETD: ::c_int = 21540;
@@ -770,7 +769,6 @@ pub const TIOCPKT_IOCTL: ::c_int = 64;
770769
pub const TIOCPKT_NOSTOP: ::c_int = 16;
771770
pub const TIOCPKT_START: ::c_int = 8;
772771
pub const TIOCPKT_STOP: ::c_int = 4;
773-
pub const TIOCSBRK: ::c_int = 21543;
774772
pub const TIOCSCTTY: ::c_int = 21518;
775773
pub const TIOCSERCONFIG: ::c_int = 21587;
776774
pub const TIOCSERGETLSR: ::c_int = 21593;

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ pub const RLIMIT_MSGQUEUE: ::c_int = 12;
367367
pub const RLIMIT_NICE: ::c_int = 13;
368368
pub const RLIMIT_RTPRIO: ::c_int = 14;
369369

370+
pub const TIOCSBRK: ::c_int = 0x5427;
371+
pub const TIOCCBRK: ::c_int = 0x5428;
372+
370373
extern "C" {
371374
pub fn sendmmsg(
372375
sockfd: ::c_int,

0 commit comments

Comments
 (0)