Skip to content
Snippets Groups Projects
Verified Commit bf6db919 authored by Tom Almeida's avatar Tom Almeida
Browse files

Actually remove stdlib from stdio. This should have been done with wchar being...

Actually remove stdlib from stdio. This should have been done with wchar being put in, but I messed something up
parent 72177be0
No related branches found
No related tags found
1 merge request!136Fixing some things in stdio
...@@ -14,5 +14,4 @@ lazy_static = { version = "*", features = ["nightly", "spin_no_std"] } ...@@ -14,5 +14,4 @@ lazy_static = { version = "*", features = ["nightly", "spin_no_std"] }
platform = { path = "../platform" } platform = { path = "../platform" }
ralloc = { path = "../../ralloc", default-features = false } ralloc = { path = "../../ralloc", default-features = false }
string = { path = "../string" } string = { path = "../string" }
stdlib = { path = "../stdlib" }
va_list = { path = "../../va_list", features = ["no_std"] } va_list = { path = "../../va_list", features = ["no_std"] }
...@@ -40,7 +40,6 @@ pub unsafe fn parse_mode_flags(mode_str: *const c_char) -> i32 { ...@@ -40,7 +40,6 @@ pub unsafe fn parse_mode_flags(mode_str: *const c_char) -> i32 {
/// Open a file with the file descriptor `fd` in the mode `mode` /// Open a file with the file descriptor `fd` in the mode `mode`
pub unsafe fn _fdopen(fd: c_int, mode: *const c_char) -> Option<*mut FILE> { pub unsafe fn _fdopen(fd: c_int, mode: *const c_char) -> Option<*mut FILE> {
use string::strchr; use string::strchr;
use stdlib::malloc;
use core::mem::size_of; use core::mem::size_of;
if *mode != b'r' as i8 && *mode != b'w' as i8 && *mode != b'a' as i8 { if *mode != b'r' as i8 && *mode != b'w' as i8 && *mode != b'a' as i8 {
platform::errno = errno::EINVAL; platform::errno = errno::EINVAL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment