2016-03-02 13:06:13 +11:00
|
|
|
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
|
2015-05-09 03:31:56 +10:00
|
|
|
#![allow(dead_code)]
|
2015-04-26 06:14:30 +10:00
|
|
|
|
2015-12-01 12:11:54 +11:00
|
|
|
use std::os::raw::{c_void, c_char, c_int};
|
2015-04-26 06:14:30 +10:00
|
|
|
|
2015-12-01 12:11:54 +11:00
|
|
|
pub const RTLD_LAZY: c_int = 0x001;
|
|
|
|
pub const RTLD_NOW: c_int = 0x002;
|
2015-04-26 06:14:30 +10:00
|
|
|
|
|
|
|
#[link="dl"]
|
|
|
|
extern {
|
2015-12-01 12:11:54 +11:00
|
|
|
pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void;
|
|
|
|
pub fn dlerror() -> *mut c_char;
|
|
|
|
pub fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void;
|
|
|
|
pub fn dlclose(handle: *mut c_void) -> c_int;
|
2015-04-26 06:14:30 +10:00
|
|
|
}
|