Skip to content

Commit 9dbdbb1

Browse files
committed
Auto merge of rust-lang#574 - Susurrus:more_constants, r=alexcrichton
More constants I searched through the codebases for libc and the various platforms to come to these conclusions.
2 parents 81310f5 + d67c961 commit 9dbdbb1

File tree

8 files changed

+10
-6
lines changed

8 files changed

+10
-6
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,9 @@ pub const P_PID: idtype_t = 0;
505505
pub const P_PGID: idtype_t = 2;
506506
pub const P_ALL: idtype_t = 7;
507507

508+
pub const B460800: ::speed_t = 460800;
509+
pub const B921600: ::speed_t = 921600;
510+
508511
extern {
509512
pub fn __error() -> *mut ::c_int;
510513

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,13 +869,13 @@ pub const B57600: speed_t = 57600;
869869
pub const B76800: speed_t = 76800;
870870
pub const B115200: speed_t = 115200;
871871
pub const B230400: speed_t = 230400;
872-
pub const B460800: speed_t = 460800;
873-
pub const B921600: speed_t = 921600;
874872
pub const EXTA: speed_t = 19200;
875873
pub const EXTB: speed_t = 38400;
876874

877875
pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
878876

877+
pub const CRTSCTS: ::tcflag_t = 0x00030000;
878+
879879
f! {
880880
pub fn WIFCONTINUED(status: ::c_int) -> bool {
881881
status == 0x13

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,9 @@ pub const P_ALL: idtype_t = 0;
641641
pub const P_PID: idtype_t = 1;
642642
pub const P_PGID: idtype_t = 4;
643643

644+
pub const B460800: ::speed_t = 460800;
645+
pub const B921600: ::speed_t = 921600;
646+
644647
extern {
645648
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
646649
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;

src/unix/notbsd/android/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ pub const TCSBRKP: ::c_int = 0x5425;
464464
pub const TCSANOW: ::c_int = 0;
465465
pub const TCSADRAIN: ::c_int = 0x1;
466466
pub const TCSAFLUSH: ::c_int = 0x2;
467-
pub const IUTF8: ::tcflag_t = 0x00004000;
468467
pub const VEOF: usize = 4;
469468
pub const VEOL: usize = 11;
470469
pub const VEOL2: usize = 16;

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ pub const VMIN: usize = 4;
322322
pub const IEXTEN: ::tcflag_t = 0x00000100;
323323
pub const TOSTOP: ::tcflag_t = 0x00008000;
324324
pub const FLUSHO: ::tcflag_t = 0x00002000;
325-
pub const IUTF8: ::tcflag_t = 0x00004000;
325+
pub const EXTPROC: ::tcflag_t = 0o200000;
326326
pub const TCSANOW: ::c_int = 0x540e;
327327
pub const TCSADRAIN: ::c_int = 0x540f;
328328
pub const TCSAFLUSH: ::c_int = 0x5410;

src/unix/notbsd/linux/other/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ pub const TMPFS_MAGIC: ::c_long = 0x01021994;
314314
pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
315315

316316
pub const VEOF: usize = 4;
317-
pub const IUTF8: ::tcflag_t = 0x00004000;
318317

319318
pub const CPU_SETSIZE: ::c_int = 0x400;
320319

src/unix/notbsd/linux/s390x.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ pub const VMIN: usize = 6;
576576
pub const IEXTEN: ::tcflag_t = 0x00008000;
577577
pub const TOSTOP: ::tcflag_t = 0x00000100;
578578
pub const FLUSHO: ::tcflag_t = 0x00001000;
579-
pub const IUTF8: ::tcflag_t = 0x00004000;
580579

581580
pub const CPU_SETSIZE: ::c_int = 0x400;
582581

src/unix/notbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ pub const IGNCR: ::tcflag_t = 0x00000080;
675675
pub const ICRNL: ::tcflag_t = 0x00000100;
676676
pub const IXANY: ::tcflag_t = 0x00000800;
677677
pub const IMAXBEL: ::tcflag_t = 0x00002000;
678+
pub const IUTF8: ::tcflag_t = 0x00004000;
678679
pub const OPOST: ::tcflag_t = 0x1;
679680
pub const CS5: ::tcflag_t = 0x00000000;
680681
pub const CRTSCTS: ::tcflag_t = 0x80000000;

0 commit comments

Comments
 (0)