Skip to content

Commit a319b62

Browse files
committed
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
1 parent d5a599e commit a319b62

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,11 +1704,6 @@ pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
17041704
pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
17051705
pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
17061706

1707-
pub const FIONCLEX: ::c_uint = 0x20006602;
1708-
pub const FIONREAD: ::c_ulong = 0x4004667f;
1709-
pub const FIOASYNC: ::c_ulong = 0x8004667d;
1710-
pub const FIOSETOWN: ::c_ulong = 0x8004667c;
1711-
pub const FIOGETOWN: ::c_ulong = 0x4004667b;
17121707
pub const FIODTYPE: ::c_ulong = 0x4004667a;
17131708

17141709
pub const B0: speed_t = 0;

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -540,11 +540,6 @@ pub const TIOCSIG: ::c_uint = 0x2004745f;
540540
pub const TIOCM_DCD: ::c_int = 0x40;
541541
pub const H4DISC: ::c_int = 0x7;
542542

543-
pub const FIONCLEX: ::c_ulong = 0x20006602;
544-
pub const FIONREAD: ::c_ulong = 0x4004667f;
545-
pub const FIOASYNC: ::c_ulong = 0x8004667d;
546-
pub const FIOSETOWN: ::c_ulong = 0x8004667c;
547-
pub const FIOGETOWN: ::c_ulong = 0x4004667b;
548543
pub const FIODTYPE: ::c_ulong = 0x4004667a;
549544
pub const FIOGETLBA: ::c_ulong = 0x40046679;
550545
pub const FIODGNAME: ::c_ulong = 0x80106678;

src/unix/bsd/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ pub const LC_TIME: ::c_int = 5;
233233
pub const LC_MESSAGES: ::c_int = 6;
234234

235235
pub const FIOCLEX: ::c_ulong = 0x20006601;
236+
pub const FIONCLEX: ::c_ulong = 0x20006602;
237+
pub const FIONREAD: ::c_ulong = 0x4004667f;
236238
pub const FIONBIO: ::c_ulong = 0x8004667e;
239+
pub const FIOASYNC: ::c_ulong = 0x8004667d;
240+
pub const FIOSETOWN: ::c_ulong = 0x8004667c;
241+
pub const FIOGETOWN: ::c_ulong = 0x4004667b;
237242

238243
pub const PATH_MAX: ::c_int = 1024;
239244

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,14 +1347,9 @@ pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
13471347
pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
13481348
pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
13491349

1350-
pub const FIONCLEX: ::c_ulong = 0x20006602;
13511350
// Uncomment on next NetBSD release
13521351
// pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;
13531352
// pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662;
1354-
pub const FIONREAD: ::c_ulong = 0x4004667f;
1355-
pub const FIOASYNC: ::c_ulong = 0x8004667d;
1356-
pub const FIOSETOWN: ::c_ulong = 0x8004667c;
1357-
pub const FIOGETOWN: ::c_ulong = 0x4004667b;
13581353
pub const OFIOGETBMAP: ::c_ulong = 0xc004667a;
13591354
pub const FIOGETBMAP: ::c_ulong = 0xc008667a;
13601355
pub const FIONWRITE: ::c_ulong = 0x40046679;

0 commit comments

Comments
 (0)