Skip to content
Snippets Groups Projects
Verified Commit 87820848 authored by jD91mZM2's avatar jD91mZM2
Browse files

strcoll as strcmp because no locale

parent 482bd9c5
No related branches found
No related tags found
No related merge requests found
...@@ -143,8 +143,9 @@ pub unsafe extern "C" fn strcmp(s1: *const c_char, s2: *const c_char) -> c_int { ...@@ -143,8 +143,9 @@ pub unsafe extern "C" fn strcmp(s1: *const c_char, s2: *const c_char) -> c_int {
} }
// #[no_mangle] // #[no_mangle]
pub extern "C" fn strcoll(s1: *const c_char, s2: *const c_char) -> c_int { pub unsafe extern "C" fn strcoll(s1: *const c_char, s2: *const c_char) -> c_int {
unimplemented!(); // relibc has no locale stuff (yet)
strcmp(s1, s2)
} }
#[no_mangle] #[no_mangle]
...@@ -400,7 +401,12 @@ pub extern "C" fn strtok_r( ...@@ -400,7 +401,12 @@ pub extern "C" fn strtok_r(
} }
} }
// #[no_mangle] #[no_mangle]
pub extern "C" fn strxfrm(s1: *mut c_char, s2: *const c_char, n: usize) -> size_t { pub unsafe extern "C" fn strxfrm(s1: *mut c_char, s2: *const c_char, n: usize) -> size_t {
unimplemented!(); // relibc has no locale stuff (yet)
let len = strlen(s2);
if len < n {
strcpy(s1, s2);
}
len
} }
...@@ -84,7 +84,7 @@ pub unsafe fn strftime<W: Write>( ...@@ -84,7 +84,7 @@ pub unsafe fn strftime<W: Write>(
format = format.offset(1); format = format.offset(1);
if *format == b'E' || *format == b'O' { if *format as u8 == b'E' || *format as u8 == b'O' {
// Ignore because these do nothing without locale // Ignore because these do nothing without locale
format = format.offset(1); format = format.offset(1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment