|
@@ -11,14 +11,17 @@ extern crate stdio;
|
|
extern crate string;
|
|
extern crate string;
|
|
extern crate sys_utsname;
|
|
extern crate sys_utsname;
|
|
|
|
|
|
|
|
+use core::ptr;
|
|
|
|
+
|
|
|
|
+use platform::types::*;
|
|
|
|
+
|
|
pub use brk::*;
|
|
pub use brk::*;
|
|
pub use getopt::*;
|
|
pub use getopt::*;
|
|
-pub use platform::types::*;
|
|
|
|
-
|
|
|
|
-use core::ptr;
|
|
|
|
|
|
+pub use pathconf::*;
|
|
|
|
|
|
mod brk;
|
|
mod brk;
|
|
mod getopt;
|
|
mod getopt;
|
|
|
|
+mod pathconf;
|
|
|
|
|
|
pub const R_OK: c_int = 1;
|
|
pub const R_OK: c_int = 1;
|
|
pub const W_OK: c_int = 2;
|
|
pub const W_OK: c_int = 2;
|
|
@@ -39,7 +42,7 @@ pub const STDOUT_FILENO: c_int = 1;
|
|
pub const STDERR_FILENO: c_int = 2;
|
|
pub const STDERR_FILENO: c_int = 2;
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
-pub static mut environ: *const *mut c_char = ptr::null();
|
|
|
|
|
|
+pub static mut environ: *mut *mut c_char = ptr::null();
|
|
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
pub extern "C" fn _exit(status: c_int) {
|
|
pub extern "C" fn _exit(status: c_int) {
|
|
@@ -159,11 +162,6 @@ pub extern "C" fn fork() -> pid_t {
|
|
platform::fork()
|
|
platform::fork()
|
|
}
|
|
}
|
|
|
|
|
|
-#[no_mangle]
|
|
|
|
-pub extern "C" fn fpathconf(fildes: c_int, name: c_int) -> c_long {
|
|
|
|
- unimplemented!();
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
pub extern "C" fn fsync(fildes: c_int) -> c_int {
|
|
pub extern "C" fn fsync(fildes: c_int) -> c_int {
|
|
platform::fsync(fildes)
|
|
platform::fsync(fildes)
|
|
@@ -346,11 +344,6 @@ pub extern "C" fn nice(incr: c_int) -> c_int {
|
|
unimplemented!();
|
|
unimplemented!();
|
|
}
|
|
}
|
|
|
|
|
|
-#[no_mangle]
|
|
|
|
-pub extern "C" fn pathconf(path: *const c_char, name: c_int) -> c_long {
|
|
|
|
- unimplemented!();
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
#[no_mangle]
|
|
#[no_mangle]
|
|
pub extern "C" fn pause() -> c_int {
|
|
pub extern "C" fn pause() -> c_int {
|
|
unimplemented!();
|
|
unimplemented!();
|