Skip to content
Snippets Groups Projects
Commit c4b88cc1 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Build ctype with header

parent 083fd72e
No related branches found
No related tags found
No related merge requests found
...@@ -62,6 +62,14 @@ dependencies = [ ...@@ -62,6 +62,14 @@ dependencies = [
"platform 0.1.0", "platform 0.1.0",
] ]
[[package]]
name = "ctype"
version = "0.1.0"
dependencies = [
"cbindgen 0.5.0",
"platform 0.1.0",
]
[[package]] [[package]]
name = "dtoa" name = "dtoa"
version = "0.4.2" version = "0.4.2"
...@@ -212,6 +220,7 @@ name = "relibc" ...@@ -212,6 +220,7 @@ name = "relibc"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins.git)", "compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins.git)",
"ctype 0.1.0",
"fcntl 0.1.0", "fcntl 0.1.0",
"platform 0.1.0", "platform 0.1.0",
"stdio 0.1.0", "stdio 0.1.0",
......
...@@ -13,6 +13,7 @@ members = ["crt0"] ...@@ -13,6 +13,7 @@ members = ["crt0"]
[dependencies] [dependencies]
compiler_builtins = { git = "https://github.com/rust-lang-nursery/compiler-builtins.git", default-features = false, features = ["mem"] } compiler_builtins = { git = "https://github.com/rust-lang-nursery/compiler-builtins.git", default-features = false, features = ["mem"] }
platform = { path = "platform" } platform = { path = "platform" }
ctype = { path = "src/ctype" }
fcntl = { path = "src/fcntl" } fcntl = { path = "src/fcntl" }
stdio = { path = "src/stdio" } stdio = { path = "src/stdio" }
stdlib = { path = "src/stdlib" } stdlib = { path = "src/stdlib" }
......
[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" }
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");
}
sys_includes = []
include_guard = "_CTYPE_H"
language = "C"
[enum]
prefix_with_name = true
/* automatically generated by rust-bindgen */ //! 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] #[no_mangle]
pub extern "C" fn isalnum(c: libc::c_int) -> libc::c_int { pub extern "C" fn isalnum(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isalpha(c: libc::c_int) -> libc::c_int { pub extern "C" fn isalpha(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isascii(c: libc::c_int) -> libc::c_int { pub extern "C" fn isascii(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn iscntrl(c: libc::c_int) -> libc::c_int { pub extern "C" fn iscntrl(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isdigit(c: libc::c_int) -> libc::c_int { pub extern "C" fn isdigit(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isgraph(c: libc::c_int) -> libc::c_int { pub extern "C" fn isgraph(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn islower(c: libc::c_int) -> libc::c_int { pub extern "C" fn islower(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isprint(c: libc::c_int) -> libc::c_int { pub extern "C" fn isprint(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn ispunct(c: libc::c_int) -> libc::c_int { pub extern "C" fn ispunct(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isspace(c: libc::c_int) -> libc::c_int { pub extern "C" fn isspace(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isupper(c: libc::c_int) -> libc::c_int { pub extern "C" fn isupper(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn isxdigit(c: libc::c_int) -> libc::c_int { pub extern "C" fn isxdigit(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn toascii(c: libc::c_int) -> libc::c_int { pub extern "C" fn toascii(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn tolower(c: libc::c_int) -> libc::c_int { pub extern "C" fn tolower(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
#[no_mangle] #[no_mangle]
pub extern "C" fn toupper(c: libc::c_int) -> libc::c_int { pub extern "C" fn toupper(c: c_int) -> c_int {
unimplemented!(); unimplemented!();
} }
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
extern crate compiler_builtins; extern crate compiler_builtins;
extern crate platform; extern crate platform;
extern crate ctype;
extern crate fcntl; extern crate fcntl;
extern crate stdio; extern crate stdio;
extern crate stdlib; extern crate stdlib;
......
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