This commit is contained in:
Jeremy Soller
2018-08-27 06:35:30 -06:00
parent 7ab700315d
commit bab4e2896a
70 changed files with 363 additions and 404 deletions
+1 -1
View File
@@ -2,8 +2,8 @@ use core::ptr;
use header::errno::ENOMEM;
use platform;
use platform::{Pal, Sys};
use platform::types::*;
use platform::{Pal, Sys};
static mut BRK: *mut c_void = ptr::null_mut();
+5 -2
View File
@@ -4,8 +4,8 @@ use core::{ptr, slice};
use header::sys_time;
use platform;
use platform::{Pal, Sys};
use platform::types::*;
use platform::{Pal, Sys};
pub use self::brk::*;
pub use self::getopt::*;
@@ -195,7 +195,10 @@ pub extern "C" fn getcwd(mut buf: *mut c_char, mut size: size_t) -> *mut c_char
}
if alloc {
let mut len = stack_buf.iter().position(|b| *b == 0).expect("no nul-byte in getcwd string") + 1;
let mut len = stack_buf
.iter()
.position(|b| *b == 0)
.expect("no nul-byte in getcwd string") + 1;
let mut heap_buf = unsafe { platform::alloc(len) as *mut c_char };
for i in 0..len {
unsafe {