Fix warnings and add c_str
This commit is contained in:
@@ -45,19 +45,13 @@ install: all
|
||||
cp -rv "openlibm/src"/*.h "$(DESTDIR)/include"
|
||||
cp -v "$(BUILD)/openlibm/libopenlibm.a" "$(DESTDIR)/lib/libm.a"
|
||||
|
||||
libc: $(BUILD)/include $(BUILD)/release/libc.a $(BUILD)/release/crt0.o
|
||||
libc: $(BUILD)/release/libc.a $(BUILD)/release/crt0.o $(BUILD)/include
|
||||
|
||||
libm: $(BUILD)/openlibm/libopenlibm.a
|
||||
|
||||
test: all
|
||||
make -C tests run
|
||||
|
||||
$(BUILD)/include: $(SRC)
|
||||
rm -rf $@ $@.partial
|
||||
mkdir -p $@.partial
|
||||
./include.sh $@.partial
|
||||
mv $@.partial $@
|
||||
|
||||
$(BUILD)/debug/libc.a: $(SRC)
|
||||
cargo build $(CARGOFLAGS)
|
||||
touch $@
|
||||
@@ -74,6 +68,12 @@ $(BUILD)/release/crt0.o: $(SRC)
|
||||
CARGO_INCREMENTAL=0 cargo rustc --release --manifest-path src/crt0/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@
|
||||
touch $@
|
||||
|
||||
$(BUILD)/include: $(SRC)
|
||||
rm -rf $@ $@.partial
|
||||
mkdir -p $@.partial
|
||||
./include.sh $@.partial
|
||||
mv $@.partial $@
|
||||
|
||||
$(BUILD)/openlibm: openlibm
|
||||
rm -rf $@ $@.partial
|
||||
mkdir -p $(BUILD)
|
||||
|
||||
+1238
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,10 @@
|
||||
//! arpa/inet implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/arpainet.h.html
|
||||
|
||||
use core::str::FromStr;
|
||||
use core::{mem, ptr, slice, str};
|
||||
use core::{ptr, slice, str};
|
||||
|
||||
use header::errno::*;
|
||||
use header::netinet_in::in_addr;
|
||||
use header::sys_socket;
|
||||
use platform;
|
||||
use platform::c_str;
|
||||
use platform::types::*;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! ctype implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/ctype.h.html
|
||||
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use alloc::boxed::Box;
|
||||
use core::{mem, ptr};
|
||||
|
||||
use header::{errno, fcntl, stdio, unistd};
|
||||
use header::{errno, fcntl, unistd};
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! fcntl implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/fcntl.h.html
|
||||
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//! fenv.h implementation for Redox, following
|
||||
//! http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fenv.h.html
|
||||
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
pub const FE_ALL_EXCEPT: c_int = 0;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
//! http://pubs.opengroup.org/onlinepubs/7908799/xsh/float.h.html
|
||||
|
||||
use header::fenv::{fegetround, FE_TONEAREST};
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
pub const FLT_RADIX: c_int = 2;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
use alloc::vec::Vec;
|
||||
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
pub const FNM_NOMATCH: c_int = 1;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! grp implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/grp.h.html
|
||||
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
#[repr(C)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use header::{ctype, stdlib};
|
||||
use header::ctype;
|
||||
use header::errno::*;
|
||||
use header::stdlib::*;
|
||||
use platform;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
use core::ptr;
|
||||
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
const EMPTY_PTR: *const c_char = "\0" as *const _ as *const c_char;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
use header::sys_socket::{self, sa_family_t, sockaddr};
|
||||
use platform;
|
||||
use header::sys_socket::sa_family_t;
|
||||
use platform::types::*;
|
||||
|
||||
pub type in_addr_t = u32;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
#[repr(C)]
|
||||
|
||||
@@ -8,7 +8,7 @@ use core::{ptr, str};
|
||||
use va_list::VaList as va_list;
|
||||
|
||||
use header::errno::{self, STR_ERROR};
|
||||
use header::{fcntl, string};
|
||||
use header::fcntl;
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//! stdlib implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/stdlib.h.html
|
||||
|
||||
use core::{intrinsics, iter, mem, ptr, slice, str};
|
||||
use core::{intrinsics, iter, mem, ptr};
|
||||
use rand::distributions::Alphanumeric;
|
||||
use rand::prng::XorShiftRng;
|
||||
use rand::rngs::JitterRng;
|
||||
use rand::{Rng, SeedableRng};
|
||||
|
||||
use header::{ctype, errno, time, unistd, wchar};
|
||||
use header::{ctype, errno, unistd};
|
||||
use header::errno::*;
|
||||
use header::fcntl::*;
|
||||
use header::string::*;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! string implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/string.h.html
|
||||
|
||||
use core::cmp;
|
||||
use core::mem;
|
||||
use core::ptr;
|
||||
use core::usize;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
use alloc::Vec;
|
||||
use core::ptr;
|
||||
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! ioctl implementation for linux
|
||||
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//! sys/select.h implementation
|
||||
|
||||
use core::mem;
|
||||
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ use platform;
|
||||
use platform::{PalSocket, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
use self::constants::*;
|
||||
mod constants;
|
||||
|
||||
pub type in_addr_t = [u8; 4];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#![no_std]
|
||||
|
||||
use header::sys_socket::sa_family_t;
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
#[repr(C)]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
//! http://pubs.opengroup.org/onlinepubs/7908799/xsh/syswait.h.html
|
||||
|
||||
use header::sys_resource::rusage;
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
use core::mem::transmute;
|
||||
|
||||
use header::errno;
|
||||
use header::errno::EIO;
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use core::{ptr, slice};
|
||||
|
||||
use header::{errno, stdio, string, sys_time};
|
||||
use header::sys_time;
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! utime implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/utime.h.html
|
||||
|
||||
use platform;
|
||||
use platform::{Pal, Sys};
|
||||
use platform::types::*;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
use core::ptr;
|
||||
use va_list::VaList as va_list;
|
||||
|
||||
use header::errno;
|
||||
use header::stdio::*;
|
||||
use header::time::*;
|
||||
use platform;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! wctype implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/wctype.h.html
|
||||
|
||||
use platform;
|
||||
use platform::types::*;
|
||||
|
||||
// #[no_mangle]
|
||||
|
||||
@@ -32,6 +32,7 @@ extern crate spin;
|
||||
|
||||
#[macro_use]
|
||||
mod macros;
|
||||
pub mod c_str;
|
||||
pub mod header;
|
||||
pub mod platform;
|
||||
pub mod start;
|
||||
|
||||
Reference in New Issue
Block a user