Skip to content
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

Add more RTLD_* constants #173

Merged
merged 1 commit into from
Feb 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,12 @@ pub const NI_MAXHOST: ::socklen_t = 1025;
pub const Q_GETQUOTA: ::c_int = 0x300;
pub const Q_SETQUOTA: ::c_int = 0x400;

pub const RTLD_LOCAL: ::c_int = 0x4;
pub const RTLD_FIRST: ::c_int = 0x100;
pub const RTLD_NODELETE: ::c_int = 0x80;
pub const RTLD_NOLOAD: ::c_int = 0x10;
pub const RTLD_GLOBAL: ::c_int = 0x8;

extern {
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
Expand Down
5 changes: 5 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ pub const NI_MAXHOST: ::size_t = 1025;
pub const Q_GETQUOTA: ::c_int = 0x700;
pub const Q_SETQUOTA: ::c_int = 0x800;

pub const RTLD_LOCAL: ::c_int = 0;
pub const RTLD_NODELETE: ::c_int = 0x1000;
pub const RTLD_NOLOAD: ::c_int = 0x2000;
pub const RTLD_GLOBAL: ::c_int = 0x100;

extern {
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ pub const NOFLSH: ::tcflag_t = 0x80000000;

pub const WNOHANG: ::c_int = 1;

pub const RTLD_NOW: ::c_int = 0x2;

f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/openbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ pub const KERN_PROC_ARGV: ::c_int = 1;
pub const Q_GETQUOTA: ::c_int = 0x300;
pub const Q_SETQUOTA: ::c_int = 0x400;

pub const RTLD_GLOBAL: ::c_int = 0x100;

extern {
pub fn mincore(addr: *mut ::c_void, len: ::size_t,
vec: *mut ::c_char) -> ::c_int;
Expand Down
3 changes: 3 additions & 0 deletions src/unix/bsd/openbsdlike/netbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ pub const TMP_MAX : ::c_uint = 308915776;

pub const NI_MAXHOST: ::socklen_t = 1025;

pub const RTLD_NOLOAD: ::c_int = 0x2000;
pub const RTLD_LOCAL: ::c_int = 0x200;

extern {
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
Expand Down
2 changes: 2 additions & 0 deletions src/unix/bsd/openbsdlike/openbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ pub const TMP_MAX : ::c_uint = 0x7fffffff;

pub const NI_MAXHOST: ::size_t = 256;

pub const RTLD_LOCAL: ::c_int = 0;

extern {
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
Expand Down
2 changes: 2 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ pub const POLLNVAL: ::c_short = 0x20;

pub const IF_NAMESIZE: ::size_t = 16;

pub const RTLD_LAZY: ::c_int = 0x1;

cfg_if! {
if #[cfg(not(stdbuild))] {
// cargo build, don't pull in anything extra as the libstd dep
Expand Down
4 changes: 4 additions & 0 deletions src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,10 @@ pub const TIOCMSET: ::c_int = 0x5418;
pub const FIONREAD: ::c_int = 0x541B;
pub const TIOCCONS: ::c_int = 0x541D;

pub const RTLD_GLOBAL: ::c_int = 0x2;
pub const RTLD_NOLOAD: ::c_int = 0x4;
pub const RTLD_NOW: ::c_int = 0;

f! {
pub fn sigemptyset(set: *mut sigset_t) -> ::c_int {
*set = 0;
Expand Down
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ pub const TIOCMSET: ::c_ulong = 0x741a;
pub const FIONREAD: ::c_ulong = 0x467f;
pub const TIOCCONS: ::c_ulong = 0x80047478;

pub const RTLD_DEEPBIND: ::c_int = 0x10;
pub const RTLD_GLOBAL: ::c_int = 0x4;
pub const RTLD_NOLOAD: ::c_int = 0x8;

extern {
pub fn sysctl(name: *mut ::c_int,
namelen: ::c_int,
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ pub const ST_NODIRATIME: ::c_ulong = 2048;

pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
pub const RTLD_NODELETE: ::c_int = 0x1000;
pub const RTLD_NOW: ::c_int = 0x2;

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub const MAP_32BIT: ::c_int = 0x0040;
Expand Down
3 changes: 3 additions & 0 deletions src/unix/notbsd/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ pub const TCSAFLUSH: ::c_int = 2;

pub const TIOCINQ: ::c_ulong = ::FIONREAD;

pub const RTLD_GLOBAL: ::c_int = 0x100;
pub const RTLD_NOLOAD: ::c_int = 0x4;

extern {
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
Expand Down
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/other/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ pub const TIOCMSET: ::c_ulong = 0x5418;
pub const FIONREAD: ::c_ulong = 0x541B;
pub const TIOCCONS: ::c_ulong = 0x541D;

pub const RTLD_DEEPBIND: ::c_int = 0x8;
pub const RTLD_GLOBAL: ::c_int = 0x100;
pub const RTLD_NOLOAD: ::c_int = 0x4;

cfg_if! {
if #[cfg(any(target_arch = "arm", target_arch = "x86",
target_arch = "x86_64"))] {
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
pub const SPLICE_F_MORE: ::c_uint = 0x04;
pub const SPLICE_F_GIFT: ::c_uint = 0x08;

pub const RTLD_LOCAL: ::c_int = 0;

f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let fd = fd as usize;
Expand Down