Skip to content

Reduce the reliance on PATH_MAX #27930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 27, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
libc: Fix constants used by libc::pathconf
  • Loading branch information
barosl committed Aug 27, 2015
commit 4ff44ff8faabb7e0545dfefa96b0d601f0f17b94
19 changes: 17 additions & 2 deletions src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3920,6 +3920,8 @@ pub mod consts {
pub const _SC_XBS5_ILP32_OFFBIG : c_int = 126;
pub const _SC_XBS5_LPBIG_OFFBIG : c_int = 128;

pub const _PC_NAME_MAX: c_int = 3;
pub const _PC_PATH_MAX: c_int = 4;
}
#[cfg(target_os = "nacl")]
pub mod sysconf {
Expand All @@ -3928,6 +3930,9 @@ pub mod consts {
pub static _SC_SENDMSG_MAX_SIZE : c_int = 0;
pub static _SC_NPROCESSORS_ONLN : c_int = 1;
pub static _SC_PAGESIZE : c_int = 2;

pub const _PC_NAME_MAX: c_int = 3;
pub const _PC_PATH_MAX: c_int = 4;
}

#[cfg(target_os = "android")]
Expand Down Expand Up @@ -3963,6 +3968,9 @@ pub mod consts {
pub const _SC_STREAM_MAX : c_int = 27;
pub const _SC_TZNAME_MAX : c_int = 28;
pub const _SC_PAGESIZE : c_int = 39;

pub const _PC_NAME_MAX: c_int = 4;
pub const _PC_PATH_MAX: c_int = 5;
}
}

Expand Down Expand Up @@ -4433,6 +4441,9 @@ pub mod consts {
pub const _SC_SEM_VALUE_MAX : c_int = 50;
pub const _SC_SIGQUEUE_MAX : c_int = 51;
pub const _SC_TIMER_MAX : c_int = 52;

pub const _PC_NAME_MAX: c_int = 4;
pub const _PC_PATH_MAX: c_int = 5;
}
}

Expand Down Expand Up @@ -4868,6 +4879,9 @@ pub mod consts {
pub const _SC_SYNCHRONIZED_IO : c_int = 75;
pub const _SC_TIMER_MAX : c_int = 93;
pub const _SC_TIMERS : c_int = 94;

pub const _PC_NAME_MAX: c_int = 4;
pub const _PC_PATH_MAX: c_int = 5;
}
}

Expand Down Expand Up @@ -5379,6 +5393,9 @@ pub mod consts {
pub const _SC_TRACE_SYS_MAX : c_int = 129;
pub const _SC_TRACE_USER_EVENT_MAX : c_int = 130;
pub const _SC_PASS_MAX : c_int = 131;

pub const _PC_NAME_MAX: c_int = 4;
pub const _PC_PATH_MAX: c_int = 5;
}
}
}
Expand Down Expand Up @@ -5835,8 +5852,6 @@ pub mod funcs {
use types::os::arch::posix88::{gid_t, off_t, pid_t};
use types::os::arch::posix88::{ssize_t, uid_t};

pub const _PC_NAME_MAX: c_int = 4;

#[cfg(not(target_os = "nacl"))]
extern {
pub fn access(path: *const c_char, amode: c_int) -> c_int;
Expand Down