Skip to content

Commit

Permalink
Add constants for sysconf(3) and pathconf(3)
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Jun 25, 2017
1 parent f4bdf1e commit fa276b0
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/unix/bsd/freebsdlike/dragonfly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ pub const AT_REMOVEDIR: ::c_int = 2;
pub const AT_EACCESS: ::c_int = 4;
pub const AT_SYMLINK_FOLLOW: ::c_int = 8;

pub const _PC_2_SYMLINKS: ::c_int = 22;
pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 23;

pub const _SC_V7_ILP32_OFF32: ::c_int = 122;
pub const _SC_V7_ILP32_OFFBIG: ::c_int = 123;
pub const _SC_V7_LP64_OFF64: ::c_int = 124;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
pub const AT_REMOVEDIR: ::c_int = 0x800;

pub const _PC_ACL_NFS4: ::c_int = 64;

pub const _SC_CPUSET_SIZE: ::c_int = 122;

extern {
Expand Down
26 changes: 26 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,32 @@ pub const MAP_NOCORE: ::c_int = 0x020000;

pub const IPPROTO_RAW: ::c_int = 255;

pub const _PC_LINK_MAX: ::c_int = 1;
pub const _PC_MAX_CANON: ::c_int = 2;
pub const _PC_MAX_INPUT: ::c_int = 3;
pub const _PC_NAME_MAX: ::c_int = 4;
pub const _PC_PATH_MAX: ::c_int = 5;
pub const _PC_PIPE_BUF: ::c_int = 6;
pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
pub const _PC_NO_TRUNC: ::c_int = 8;
pub const _PC_VDISABLE: ::c_int = 9;
pub const _PC_ALLOC_SIZE_MIN: ::c_int = 10;
pub const _PC_FILESIZEBITS: ::c_int = 12;
pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
pub const _PC_SYMLINK_MAX: ::c_int = 18;
pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
pub const _PC_ASYNC_IO: ::c_int = 53;
pub const _PC_PRIO_IO: ::c_int = 54;
pub const _PC_SYNC_IO: ::c_int = 55;
pub const _PC_ACL_EXTENDED: ::c_int = 59;
pub const _PC_ACL_PATH_MAX: ::c_int = 60;
pub const _PC_CAP_PRESENT: ::c_int = 61;
pub const _PC_INF_PRESENT: ::c_int = 62;
pub const _PC_MAC_PRESENT: ::c_int = 63;

pub const _SC_ARG_MAX: ::c_int = 1;
pub const _SC_CHILD_MAX: ::c_int = 2;
pub const _SC_CLK_TCK: ::c_int = 3;
Expand Down
16 changes: 16 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,22 @@ pub const MAP_NORESERVE : ::c_int = 0x40;
pub const MAP_HASSEMAPHORE : ::c_int = 0x200;
pub const MAP_WIRED: ::c_int = 0x800;

pub const _PC_LINK_MAX : ::c_int = 1;
pub const _PC_MAX_CANON : ::c_int = 2;
pub const _PC_MAX_INPUT : ::c_int = 3;
pub const _PC_NAME_MAX : ::c_int = 4;
pub const _PC_PATH_MAX : ::c_int = 5;
pub const _PC_PIPE_BUF : ::c_int = 6;
pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
pub const _PC_NO_TRUNC : ::c_int = 8;
pub const _PC_VDISABLE : ::c_int = 9;
pub const _PC_SYNC_IO : ::c_int = 10;
pub const _PC_FILESIZEBITS : ::c_int = 11;
pub const _PC_SYMLINK_MAX : ::c_int = 12;
pub const _PC_2_SYMLINKS : ::c_int = 13;
pub const _PC_ACL_EXTENDED : ::c_int = 14;
pub const _PC_MIN_HOLE_SIZE : ::c_int = 15;

pub const _SC_PAGE_SIZE : ::c_int = 0;
pub const _SC_ARG_MAX : ::c_int = 1;
pub const _SC_CHILD_MAX : ::c_int = 2;
Expand Down
22 changes: 22 additions & 0 deletions src/unix/bsd/netbsdlike/openbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,28 @@ pub const RUSAGE_THREAD: ::c_int = 1;
pub const MAP_COPY : ::c_int = 0x0002;
pub const MAP_NOEXTEND : ::c_int = 0x0000;

pub const _PC_LINK_MAX : ::c_int = 1;
pub const _PC_MAX_CANON : ::c_int = 2;
pub const _PC_MAX_INPUT : ::c_int = 3;
pub const _PC_NAME_MAX : ::c_int = 4;
pub const _PC_PATH_MAX : ::c_int = 5;
pub const _PC_PIPE_BUF : ::c_int = 6;
pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
pub const _PC_NO_TRUNC : ::c_int = 8;
pub const _PC_VDISABLE : ::c_int = 9;
pub const _PC_2_SYMLINKS : ::c_int = 10;
pub const _PC_ALLOC_SIZE_MIN : ::c_int = 11;
pub const _PC_ASYNC_IO : ::c_int = 12;
pub const _PC_FILESIZEBITS : ::c_int = 13;
pub const _PC_PRIO_IO : ::c_int = 14;
pub const _PC_REC_INCR_XFER_SIZE : ::c_int = 15;
pub const _PC_REC_MAX_XFER_SIZE : ::c_int = 16;
pub const _PC_REC_MIN_XFER_SIZE : ::c_int = 17;
pub const _PC_REC_XFER_ALIGN : ::c_int = 18;
pub const _PC_SYMLINK_MAX : ::c_int = 19;
pub const _PC_SYNC_IO : ::c_int = 20;
pub const _PC_TIMESTAMP_RESOLUTION : ::c_int = 21;

pub const _SC_PAGE_SIZE : ::c_int = 0;
pub const _SC_ARG_MAX : ::c_int = 1;
pub const _SC_CHILD_MAX : ::c_int = 2;
Expand Down
10 changes: 10 additions & 0 deletions src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,19 @@ pub const _PC_MAX_INPUT: ::c_int = 3;
pub const _PC_NAME_MAX: ::c_int = 4;
pub const _PC_PATH_MAX: ::c_int = 5;
pub const _PC_PIPE_BUF: ::c_int = 6;
pub const _PC_2_SYMLINKS: ::c_int = 7;
pub const _PC_ALLOC_SIZE_MIN: ::c_int = 8;
pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 9;
pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 10;
pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 11;
pub const _PC_REC_XFER_ALIGN: ::c_int = 12;
pub const _PC_SYMLINK_MAX: ::c_int = 13;
pub const _PC_CHOWN_RESTRICTED: ::c_int = 14;
pub const _PC_NO_TRUNC: ::c_int = 15;
pub const _PC_VDISABLE: ::c_int = 16;
pub const _PC_ASYNC_IO: ::c_int = 17;
pub const _PC_PRIO_IO: ::c_int = 18;
pub const _PC_SYNC_IO: ::c_int = 19;

pub const FIONBIO: ::c_int = 0x5421;

Expand Down
12 changes: 12 additions & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,18 @@ pub const _PC_PIPE_BUF: ::c_int = 5;
pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
pub const _PC_NO_TRUNC: ::c_int = 7;
pub const _PC_VDISABLE: ::c_int = 8;
pub const _PC_SYNC_IO: ::c_int = 9;
pub const _PC_ASYNC_IO: ::c_int = 10;
pub const _PC_PRIO_IO: ::c_int = 11;
pub const _PC_SOCK_MAXBUF: ::c_int = 12;
pub const _PC_FILESIZEBITS: ::c_int = 13;
pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18;
pub const _PC_SYMLINK_MAX: ::c_int = 19;
pub const _PC_2_SYMLINKS: ::c_int = 20;

pub const _SC_ARG_MAX: ::c_int = 0;
pub const _SC_CHILD_MAX: ::c_int = 1;
Expand Down
31 changes: 31 additions & 0 deletions src/unix/solaris/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,37 @@ pub const O_NONBLOCK: ::c_int = 128;

pub const IPPROTO_RAW: ::c_int = 255;

pub const _PC_LINK_MAX: ::c_int = 1;
pub const _PC_MAX_CANON: ::c_int = 2;
pub const _PC_MAX_INPUT: ::c_int = 3;
pub const _PC_NAME_MAX: ::c_int = 4;
pub const _PC_PATH_MAX: ::c_int = 5;
pub const _PC_PIPE_BUF: ::c_int = 6;
pub const _PC_NO_TRUNC: ::c_int = 7;
pub const _PC_VDISABLE: ::c_int = 8;
pub const _PC_CHOWN_RESTRICTED: ::c_int = 9;
pub const _PC_ASYNC_IO: ::c_int = 10;
pub const _PC_PRIO_IO: ::c_int = 11;
pub const _PC_SYNC_IO: ::c_int = 12;
pub const _PC_ALLOC_SIZE_MIN: ::c_int = 13;
pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
pub const _PC_SYMLINK_MAX: ::c_int = 18;
pub const _PC_2_SYMLINKS: ::c_int = 19;
pub const _PC_ACL_ENABLED: ::c_int = 20;
pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
pub const _PC_CASE_BEHAVIOR: ::c_int = 22;
pub const _PC_SATTR_ENABLED: ::c_int = 23;
pub const _PC_SATTR_EXISTS: ::c_int = 24;
pub const _PC_ACCESS_FILTERING: ::c_int = 25;
pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 26;
pub const _PC_FILESIZEBITS: ::c_int = 67;
pub const _PC_XATTR_ENABLED: ::c_int = 100;
pub const _PC_LAST: ::c_int = 101;
pub const _PC_XATTR_EXISTS: ::c_int = 101;

pub const _SC_ARG_MAX: ::c_int = 1;
pub const _SC_CHILD_MAX: ::c_int = 2;
pub const _SC_CLK_TCK: ::c_int = 3;
Expand Down

0 comments on commit fa276b0

Please sign in to comment.