diff options
author | Torbjørn Birch Moltu <t.b.moltu@lyse.net> | 2019-05-27 19:23:54 +0200 |
---|---|---|
committer | Torbjørn Birch Moltu <t.b.moltu@lyse.net> | 2019-06-07 20:00:55 +0200 |
commit | a319b62fbd8d5e6799f04c6ba1660055f5e5ecab (patch) | |
tree | 90a3470d85c9e7af959f61ab1be26ea07ec2d739 | |
parent | d5a599ece74cde441577db7ece34b59017ff7e6c (diff) | |
download | libc-a319b62fbd8d5e6799f04c6ba1660055f5e5ecab.tar.gz |
Generalize some FIO* constants to all BSDs
* Change the type of FIONCLEX on apple platforms from c_uint to c_ulong
* Add FIONCLEX, FIONREAD, FIOASYNC, FIOSETOWN and FIOGETOWN
for DragonFly and OpenBSD
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 5 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 5 | ||||
-rw-r--r-- | src/unix/bsd/mod.rs | 5 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/netbsd/mod.rs | 5 |
4 files changed, 5 insertions, 15 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index af28dba7..6fd017c1 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -1704,11 +1704,6 @@ pub const TIOCPTYGRANT: ::c_uint = 0x20007454; pub const TIOCPTYGNAME: ::c_uint = 0x40807453; pub const TIOCPTYUNLK: ::c_uint = 0x20007452; -pub const FIONCLEX: ::c_uint = 0x20006602; -pub const FIONREAD: ::c_ulong = 0x4004667f; -pub const FIOASYNC: ::c_ulong = 0x8004667d; -pub const FIOSETOWN: ::c_ulong = 0x8004667c; -pub const FIOGETOWN: ::c_ulong = 0x4004667b; pub const FIODTYPE: ::c_ulong = 0x4004667a; pub const B0: speed_t = 0; diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index e5945517..2fd5eef7 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -540,11 +540,6 @@ pub const TIOCSIG: ::c_uint = 0x2004745f; pub const TIOCM_DCD: ::c_int = 0x40; pub const H4DISC: ::c_int = 0x7; -pub const FIONCLEX: ::c_ulong = 0x20006602; -pub const FIONREAD: ::c_ulong = 0x4004667f; -pub const FIOASYNC: ::c_ulong = 0x8004667d; -pub const FIOSETOWN: ::c_ulong = 0x8004667c; -pub const FIOGETOWN: ::c_ulong = 0x4004667b; pub const FIODTYPE: ::c_ulong = 0x4004667a; pub const FIOGETLBA: ::c_ulong = 0x40046679; pub const FIODGNAME: ::c_ulong = 0x80106678; diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 8bc6c7c6..77f82b18 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -233,7 +233,12 @@ pub const LC_TIME: ::c_int = 5; pub const LC_MESSAGES: ::c_int = 6; pub const FIOCLEX: ::c_ulong = 0x20006601; +pub const FIONCLEX: ::c_ulong = 0x20006602; +pub const FIONREAD: ::c_ulong = 0x4004667f; pub const FIONBIO: ::c_ulong = 0x8004667e; +pub const FIOASYNC: ::c_ulong = 0x8004667d; +pub const FIOSETOWN: ::c_ulong = 0x8004667c; +pub const FIOGETOWN: ::c_ulong = 0x4004667b; pub const PATH_MAX: ::c_int = 1024; diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 9d710eb0..b1316bc2 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -1347,14 +1347,9 @@ pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS; pub const SOCK_CLOEXEC: ::c_int = 0x10000000; pub const SOCK_NONBLOCK: ::c_int = 0x20000000; -pub const FIONCLEX: ::c_ulong = 0x20006602; // Uncomment on next NetBSD release // pub const FIOSEEKDATA: ::c_ulong = 0xc0086661; // pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662; -pub const FIONREAD: ::c_ulong = 0x4004667f; -pub const FIOASYNC: ::c_ulong = 0x8004667d; -pub const FIOSETOWN: ::c_ulong = 0x8004667c; -pub const FIOGETOWN: ::c_ulong = 0x4004667b; pub const OFIOGETBMAP: ::c_ulong = 0xc004667a; pub const FIOGETBMAP: ::c_ulong = 0xc008667a; pub const FIONWRITE: ::c_ulong = 0x40046679; |