unix: Add PIPE_BUF for bsd and notbsd

This is the maximum size of guaranteed-atomic writes to a pipe.
This commit is contained in:
Kamal Marhubi 2016-05-05 16:46:50 -04:00
parent 4fc03fe957
commit ce0dc73608
2 changed files with 4 additions and 0 deletions

View File

@ -298,6 +298,8 @@ pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
pub const LOG_FTP: ::c_int = 11 << 3;
pub const LOG_PERROR: ::c_int = 0x20;
pub const PIPE_BUF: usize = 512;
f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;

View File

@ -650,6 +650,8 @@ pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
pub const LOG_FTP: ::c_int = 11 << 3;
pub const LOG_PERROR: ::c_int = 0x20;
pub const PIPE_BUF: usize = 4096;
f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let fd = fd as usize;