Merge branch 'master' of github.com:redox-os/relibc
This commit is contained in:
Generated
+18
@@ -62,6 +62,14 @@ dependencies = [
|
||||
"platform 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ctype"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cbindgen 0.5.0",
|
||||
"platform 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.2"
|
||||
@@ -89,6 +97,14 @@ name = "fuchsia-zircon-sys"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "grp"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cbindgen 0.5.0",
|
||||
"platform 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.3.4"
|
||||
@@ -212,7 +228,9 @@ name = "relibc"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins.git)",
|
||||
"ctype 0.1.0",
|
||||
"fcntl 0.1.0",
|
||||
"grp 0.1.0",
|
||||
"platform 0.1.0",
|
||||
"stdio 0.1.0",
|
||||
"stdlib 0.1.0",
|
||||
|
||||
@@ -13,7 +13,9 @@ members = ["crt0"]
|
||||
[dependencies]
|
||||
compiler_builtins = { git = "https://github.com/rust-lang-nursery/compiler-builtins.git", default-features = false, features = ["mem"] }
|
||||
platform = { path = "platform" }
|
||||
ctype = { path = "src/ctype" }
|
||||
fcntl = { path = "src/fcntl" }
|
||||
grp = { path = "src/grp" }
|
||||
stdio = { path = "src/stdio" }
|
||||
stdlib = { path = "src/stdlib" }
|
||||
string = { path = "src/string" }
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#ifndef _BITS_WCHAR_H
|
||||
#define _BITS_WCHAR_H
|
||||
|
||||
typedef signed short wchar_t;
|
||||
typedef signed int wint_t;
|
||||
|
||||
#endif /* _BITS_WCHAR_H */
|
||||
@@ -43,6 +43,7 @@ pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
|
||||
pub type wchar_t = i16;
|
||||
pub type wint_t = i32;
|
||||
|
||||
pub type off_t = c_long;
|
||||
pub type mode_t = u16;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "ctype"
|
||||
version = "0.1.0"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
build = "build.rs"
|
||||
|
||||
[build-dependencies]
|
||||
cbindgen = { path = "../../cbindgen" }
|
||||
|
||||
[dependencies]
|
||||
platform = { path = "../../platform" }
|
||||
@@ -0,0 +1,11 @@
|
||||
extern crate cbindgen;
|
||||
|
||||
use std::{env, fs};
|
||||
|
||||
fn main() {
|
||||
let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
|
||||
fs::create_dir_all("../../target/include").expect("failed to create include directory");
|
||||
cbindgen::generate(crate_dir)
|
||||
.expect("failed to generate bindings")
|
||||
.write_to_file("../../target/include/ctype.h");
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
sys_includes = []
|
||||
include_guard = "_CTYPE_H"
|
||||
language = "C"
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
@@ -0,0 +1,82 @@
|
||||
//! ctype implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/ctype.h.html
|
||||
|
||||
#![no_std]
|
||||
|
||||
extern crate platform;
|
||||
|
||||
use platform::types::*;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isalnum(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isalpha(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isascii(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn iscntrl(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isdigit(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isgraph(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn islower(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isprint(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ispunct(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isspace(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isupper(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isxdigit(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn toascii(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn tolower(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn toupper(c: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "grp"
|
||||
version = "0.1.0"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
build = "build.rs"
|
||||
|
||||
[build-dependencies]
|
||||
cbindgen = { path = "../../cbindgen" }
|
||||
|
||||
[dependencies]
|
||||
platform = { path = "../../platform" }
|
||||
@@ -0,0 +1,11 @@
|
||||
extern crate cbindgen;
|
||||
|
||||
use std::{env, fs};
|
||||
|
||||
fn main() {
|
||||
let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
|
||||
fs::create_dir_all("../../target/include").expect("failed to create include directory");
|
||||
cbindgen::generate(crate_dir)
|
||||
.expect("failed to generate bindings")
|
||||
.write_to_file("../../target/include/grp.h");
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
sys_includes = []
|
||||
include_guard = "_GRP_H"
|
||||
language = "C"
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
@@ -1,24 +1,26 @@
|
||||
/* automatically generated by rust-bindgen */
|
||||
//! grp implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/grp.h.html
|
||||
|
||||
#![no_std]
|
||||
|
||||
extern crate platform;
|
||||
|
||||
use platform::types::*;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct group {
|
||||
pub gr_name: *mut libc::c_char,
|
||||
pub gr_passwd: *mut libc::c_char,
|
||||
pub gr_name: *mut c_char,
|
||||
pub gr_passwd: *mut c_char,
|
||||
pub gr_gid: gid_t,
|
||||
pub gr_mem: *mut *mut libc::c_char,
|
||||
}
|
||||
impl Clone for group {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
pub gr_mem: *mut *mut c_char,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn getgrgid(gid: gid_t) -> *mut group {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn getgrnam(name: *const libc::c_char) -> *mut group {
|
||||
pub extern "C" fn getgrnam(name: *const c_char) -> *mut group {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
@@ -26,21 +28,21 @@ pub extern "C" fn getgrnam(name: *const libc::c_char) -> *mut group {
|
||||
pub extern "C" fn getgrgid_r(
|
||||
gid: gid_t,
|
||||
grp: *mut group,
|
||||
buffer: *mut libc::c_char,
|
||||
buffer: *mut c_char,
|
||||
bufsize: usize,
|
||||
result: *mut *mut group,
|
||||
) -> libc::c_int {
|
||||
) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn getgrnam_r(
|
||||
name: *const libc::c_char,
|
||||
name: *const c_char,
|
||||
grp: *mut group,
|
||||
buffer: *mut libc::c_char,
|
||||
buffer: *mut c_char,
|
||||
bufsize: usize,
|
||||
result: *mut *mut group,
|
||||
) -> libc::c_int {
|
||||
) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
@@ -58,3 +60,10 @@ pub extern "C" fn endgrent() {
|
||||
pub extern "C" fn setgrent() {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
/*
|
||||
#[no_mangle]
|
||||
pub extern "C" fn func(args) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
*/
|
||||
@@ -4,7 +4,9 @@
|
||||
extern crate compiler_builtins;
|
||||
extern crate platform;
|
||||
|
||||
extern crate ctype;
|
||||
extern crate fcntl;
|
||||
extern crate grp;
|
||||
extern crate stdio;
|
||||
extern crate stdlib;
|
||||
extern crate string;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "template"
|
||||
version = "0.1.0"
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
|
||||
build = "build.rs"
|
||||
|
||||
[build-dependencies]
|
||||
cbindgen = { path = "../../cbindgen" }
|
||||
|
||||
[dependencies]
|
||||
platform = { path = "../../platform" }
|
||||
@@ -0,0 +1,11 @@
|
||||
extern crate cbindgen;
|
||||
|
||||
use std::{env, fs};
|
||||
|
||||
fn main() {
|
||||
let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
|
||||
fs::create_dir_all("../../target/include").expect("failed to create include directory");
|
||||
cbindgen::generate(crate_dir)
|
||||
.expect("failed to generate bindings")
|
||||
.write_to_file("../../target/include/template.h");
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
sys_includes = []
|
||||
include_guard = "_TEMPLATE_H"
|
||||
language = "C"
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
@@ -0,0 +1,14 @@
|
||||
//! template implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/template.h.html
|
||||
|
||||
#![no_std]
|
||||
|
||||
extern crate platform;
|
||||
|
||||
use platform::types::*;
|
||||
|
||||
/*
|
||||
#[no_mangle]
|
||||
pub extern "C" fn func(args) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
*/
|
||||
@@ -1,76 +0,0 @@
|
||||
/* automatically generated by rust-bindgen */
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isalnum(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isalpha(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isascii(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn iscntrl(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isdigit(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isgraph(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn islower(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isprint(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ispunct(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isspace(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isupper(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn isxdigit(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn toascii(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn tolower(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn toupper(c: libc::c_int) -> libc::c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
Reference in New Issue
Block a user