Skip to content

Commit a64ee24

Browse files
committed
Merge pull request #173 from alexcrichton/rtld-names
Add more RTLD_* constants
2 parents e9db959 + 29de598 commit a64ee24

File tree

13 files changed

+41
-0
lines changed

13 files changed

+41
-0
lines changed

src/unix/bsd/apple/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,12 @@ pub const NI_MAXHOST: ::socklen_t = 1025;
838838
pub const Q_GETQUOTA: ::c_int = 0x300;
839839
pub const Q_SETQUOTA: ::c_int = 0x400;
840840

841+
pub const RTLD_LOCAL: ::c_int = 0x4;
842+
pub const RTLD_FIRST: ::c_int = 0x100;
843+
pub const RTLD_NODELETE: ::c_int = 0x80;
844+
pub const RTLD_NOLOAD: ::c_int = 0x10;
845+
pub const RTLD_GLOBAL: ::c_int = 0x8;
846+
841847
extern {
842848
pub fn getnameinfo(sa: *const ::sockaddr,
843849
salen: ::socklen_t,

src/unix/bsd/freebsdlike/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,11 @@ pub const NI_MAXHOST: ::size_t = 1025;
573573
pub const Q_GETQUOTA: ::c_int = 0x700;
574574
pub const Q_SETQUOTA: ::c_int = 0x800;
575575

576+
pub const RTLD_LOCAL: ::c_int = 0;
577+
pub const RTLD_NODELETE: ::c_int = 0x1000;
578+
pub const RTLD_NOLOAD: ::c_int = 0x2000;
579+
pub const RTLD_GLOBAL: ::c_int = 0x100;
580+
576581
extern {
577582
pub fn getnameinfo(sa: *const ::sockaddr,
578583
salen: ::socklen_t,

src/unix/bsd/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ pub const NOFLSH: ::tcflag_t = 0x80000000;
263263

264264
pub const WNOHANG: ::c_int = 1;
265265

266+
pub const RTLD_NOW: ::c_int = 0x2;
267+
266268
f! {
267269
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
268270
let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;

src/unix/bsd/openbsdlike/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ pub const KERN_PROC_ARGV: ::c_int = 1;
370370
pub const Q_GETQUOTA: ::c_int = 0x300;
371371
pub const Q_SETQUOTA: ::c_int = 0x400;
372372

373+
pub const RTLD_GLOBAL: ::c_int = 0x100;
374+
373375
extern {
374376
pub fn mincore(addr: *mut ::c_void, len: ::size_t,
375377
vec: *mut ::c_char) -> ::c_int;

src/unix/bsd/openbsdlike/netbsd.rs

+3
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ pub const TMP_MAX : ::c_uint = 308915776;
325325

326326
pub const NI_MAXHOST: ::socklen_t = 1025;
327327

328+
pub const RTLD_NOLOAD: ::c_int = 0x2000;
329+
pub const RTLD_LOCAL: ::c_int = 0x200;
330+
328331
extern {
329332
pub fn getnameinfo(sa: *const ::sockaddr,
330333
salen: ::socklen_t,

src/unix/bsd/openbsdlike/openbsd.rs

+2
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ pub const TMP_MAX : ::c_uint = 0x7fffffff;
222222

223223
pub const NI_MAXHOST: ::size_t = 256;
224224

225+
pub const RTLD_LOCAL: ::c_int = 0;
226+
225227
extern {
226228
pub fn getnameinfo(sa: *const ::sockaddr,
227229
salen: ::socklen_t,

src/unix/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ pub const POLLNVAL: ::c_short = 0x20;
131131

132132
pub const IF_NAMESIZE: ::size_t = 16;
133133

134+
pub const RTLD_LAZY: ::c_int = 0x1;
135+
134136
cfg_if! {
135137
if #[cfg(not(stdbuild))] {
136138
// cargo build, don't pull in anything extra as the libstd dep

src/unix/notbsd/android/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,10 @@ pub const TIOCMSET: ::c_int = 0x5418;
505505
pub const FIONREAD: ::c_int = 0x541B;
506506
pub const TIOCCONS: ::c_int = 0x541D;
507507

508+
pub const RTLD_GLOBAL: ::c_int = 0x2;
509+
pub const RTLD_NOLOAD: ::c_int = 0x4;
510+
pub const RTLD_NOW: ::c_int = 0;
511+
508512
f! {
509513
pub fn sigemptyset(set: *mut sigset_t) -> ::c_int {
510514
*set = 0;

src/unix/notbsd/linux/mips.rs

+4
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,10 @@ pub const TIOCMSET: ::c_ulong = 0x741a;
468468
pub const FIONREAD: ::c_ulong = 0x467f;
469469
pub const TIOCCONS: ::c_ulong = 0x80047478;
470470

471+
pub const RTLD_DEEPBIND: ::c_int = 0x10;
472+
pub const RTLD_GLOBAL: ::c_int = 0x4;
473+
pub const RTLD_NOLOAD: ::c_int = 0x8;
474+
471475
extern {
472476
pub fn sysctl(name: *mut ::c_int,
473477
namelen: ::c_int,

src/unix/notbsd/linux/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ pub const ST_NODIRATIME: ::c_ulong = 2048;
317317

318318
pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
319319
pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
320+
pub const RTLD_NODELETE: ::c_int = 0x1000;
321+
pub const RTLD_NOW: ::c_int = 0x2;
320322

321323
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
322324
pub const MAP_32BIT: ::c_int = 0x0040;

src/unix/notbsd/linux/musl/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ pub const TCSAFLUSH: ::c_int = 2;
145145

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

148+
pub const RTLD_GLOBAL: ::c_int = 0x100;
149+
pub const RTLD_NOLOAD: ::c_int = 0x4;
150+
148151
extern {
149152
pub fn getnameinfo(sa: *const ::sockaddr,
150153
salen: ::socklen_t,

src/unix/notbsd/linux/other/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ pub const TIOCMSET: ::c_ulong = 0x5418;
399399
pub const FIONREAD: ::c_ulong = 0x541B;
400400
pub const TIOCCONS: ::c_ulong = 0x541D;
401401

402+
pub const RTLD_DEEPBIND: ::c_int = 0x8;
403+
pub const RTLD_GLOBAL: ::c_int = 0x100;
404+
pub const RTLD_NOLOAD: ::c_int = 0x4;
405+
402406
cfg_if! {
403407
if #[cfg(any(target_arch = "arm", target_arch = "x86",
404408
target_arch = "x86_64"))] {

src/unix/notbsd/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
532532
pub const SPLICE_F_MORE: ::c_uint = 0x04;
533533
pub const SPLICE_F_GIFT: ::c_uint = 0x08;
534534

535+
pub const RTLD_LOCAL: ::c_int = 0;
536+
535537
f! {
536538
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
537539
let fd = fd as usize;

0 commit comments

Comments
 (0)