Skip to content

Commit aabff31

Browse files
committed
Auto merge of #226 - m4rw3r:master, r=alexcrichton
apple: Add TIOC* constants From `sys/ioctl.h`. Extracted on OS X 10.11.3.
2 parents 0521187 + f500051 commit aabff31

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

src/unix/bsd/apple/b32.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ s! {
1313
pub const __PTHREAD_MUTEX_SIZE__: usize = 40;
1414
pub const __PTHREAD_COND_SIZE__: usize = 24;
1515
pub const __PTHREAD_RWLOCK_SIZE__: usize = 124;
16+
17+
pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
18+
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;

src/unix/bsd/apple/b64.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ s! {
1313
pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
1414
pub const __PTHREAD_COND_SIZE__: usize = 40;
1515
pub const __PTHREAD_RWLOCK_SIZE__: usize = 192;
16+
17+
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
18+
pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;

src/unix/bsd/apple/mod.rs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,70 @@ pub const F_VOLPOSMODE: ::c_int = 4;
492492

493493
pub const O_ACCMODE: ::c_int = 3;
494494

495+
pub const TIOCMODG: ::c_ulong = 0x40047403;
496+
pub const TIOCMODS: ::c_ulong = 0x80047404;
497+
pub const TIOCM_LE: ::c_int = 0x1;
498+
pub const TIOCM_DTR: ::c_int = 0x2;
499+
pub const TIOCM_RTS: ::c_int = 0x4;
500+
pub const TIOCM_ST: ::c_int = 0x8;
501+
pub const TIOCM_SR: ::c_int = 0x10;
502+
pub const TIOCM_CTS: ::c_int = 0x20;
503+
pub const TIOCM_CAR: ::c_int = 0x40;
504+
pub const TIOCM_CD: ::c_int = 0x40;
505+
pub const TIOCM_RNG: ::c_int = 0x80;
506+
pub const TIOCM_RI: ::c_int = 0x80;
507+
pub const TIOCM_DSR: ::c_int = 0x100;
508+
pub const TIOCEXCL: ::c_int = 0x2000740d;
509+
pub const TIOCNXCL: ::c_int = 0x2000740e;
510+
pub const TIOCFLUSH: ::c_ulong = 0x80047410;
511+
pub const TIOCGETD: ::c_ulong = 0x4004741a;
512+
pub const TIOCSETD: ::c_ulong = 0x8004741b;
513+
pub const TIOCIXON: ::c_uint = 0x20007481;
514+
pub const TIOCIXOFF: ::c_uint = 0x20007480;
515+
pub const TIOCSBRK: ::c_uint = 0x2000747b;
516+
pub const TIOCCBRK: ::c_uint = 0x2000747a;
517+
pub const TIOCSDTR: ::c_uint = 0x20007479;
518+
pub const TIOCCDTR: ::c_uint = 0x20007478;
519+
pub const TIOCGPGRP: ::c_ulong = 0x40047477;
520+
pub const TIOCSPGRP: ::c_ulong = 0x80047476;
521+
pub const TIOCOUTQ: ::c_ulong = 0x40047473;
522+
pub const TIOCSTI: ::c_ulong = 0x80017472;
523+
pub const TIOCNOTTY: ::c_uint = 0x20007471;
524+
pub const TIOCPKT: ::c_ulong = 0x80047470;
525+
pub const TIOCPKT_DATA: ::c_int = 0x0;
526+
pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1;
527+
pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2;
528+
pub const TIOCPKT_STOP: ::c_int = 0x4;
529+
pub const TIOCPKT_START: ::c_int = 0x8;
530+
pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
531+
pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
532+
pub const TIOCPKT_IOCTL: ::c_int = 0x40;
533+
pub const TIOCSTOP: ::c_uint = 0x2000746f;
534+
pub const TIOCSTART: ::c_uint = 0x2000746e;
535+
pub const TIOCMSET: ::c_ulong = 0x8004746d;
536+
pub const TIOCMBIS: ::c_ulong = 0x8004746c;
537+
pub const TIOCMBIC: ::c_ulong = 0x8004746b;
538+
pub const TIOCMGET: ::c_ulong = 0x4004746a;
539+
pub const TIOCREMOTE: ::c_ulong = 0x80047469;
540+
pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
541+
pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
542+
pub const TIOCUCNTL: ::c_ulong = 0x80047466;
543+
pub const TIOCSTAT: ::c_uint = 0x20007465;
544+
pub const TIOCSCONS: ::c_uint = 0x20007463;
545+
pub const TIOCCONS: ::c_ulong = 0x80047462;
546+
pub const TIOCSCTTY: ::c_uint = 0x20007461;
547+
pub const TIOCEXT: ::c_ulong = 0x80047460;
548+
pub const TIOCSIG: ::c_uint = 0x2000745f;
549+
pub const TIOCDRAIN: ::c_uint = 0x2000745e;
550+
pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b;
551+
pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a;
552+
pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457;
553+
pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456;
554+
pub const TIOCDSIMICROCODE: ::c_uint = 0x20007455;
555+
pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
556+
pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
557+
pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
558+
495559
pub const SIGTRAP: ::c_int = 5;
496560

497561
pub const GLOB_APPEND : ::c_int = 0x0001;

0 commit comments

Comments
 (0)