Skip to content
Snippets Groups Projects
Verified Commit ca7f3a00 authored by Dan Robertson's avatar Dan Robertson
Browse files

wait: Add crate for sys/wait.h

Add the basics of sys/wait.h so that we get a bit closer to being able
to compile libc-test.
parent c6f16547
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,7 @@ dependencies = [
"sys_time 0.1.0",
"time 0.1.0",
"unistd 0.1.0",
"wait 0.1.0",
"wctype 0.1.0",
]
......@@ -622,6 +623,15 @@ name = "vec_map"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "wait"
version = "0.1.0"
dependencies = [
"cbindgen 0.5.0",
"platform 0.1.0",
"resource 0.1.0",
]
[[package]]
name = "wctype"
version = "0.1.0"
......
......@@ -27,6 +27,7 @@ string = { path = "src/string" }
sys_time = { path = "src/sys_time" }
time = { path = "src/time" }
unistd = { path = "src/unistd" }
wait = { path = "src/wait" }
wctype = { path = "src/wctype" }
[profile.dev]
......
[package]
name = "wait"
version = "0.1.0"
authors = ["Dan Robertson <danlrobertson89@gmail.com>"]
[build-dependencies]
cbindgen = { path = "../../cbindgen" }
[dependencies]
platform = { path = "../platform" }
resource = { path = "../resource" }
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/sys/wait.h");
}
sys_includes = ["sys/types.h", "sys/resource.h"]
include_guard = "_SYS_WAIT_H"
language = "C"
[enum]
prefix_with_name = true
//! sys/wait.h implementation for Redox, following
//! http://pubs.opengroup.org/onlinepubs/7908799/xsh/syswait.h.html
#![no_std]
extern crate platform;
extern crate resource;
use platform::types::*;
use resource::rusage;
#[no_mangle]
pub unsafe extern "C" fn wait(stat_loc: *mut c_int) -> pid_t {
unimplemented!();
}
#[no_mangle]
pub unsafe extern "C" fn wait3(
stat_loc: *mut c_int,
options: c_int,
resource_usage: *mut rusage,
) -> pid_t {
unimplemented!();
}
/*
* TODO: implement idtype_t, id_t, and siginfo_t
*
* #[no_mangle]
* pub unsafe extern "C" fn waitid(
* idtype: idtype_t,
* id: id_t,
* infop: siginfo_t,
* options: c_int
* ) -> c_int {
* unimplemented!();
* }
*/
#[no_mangle]
pub unsafe extern "C" fn waitpid(pid: pid_t, stat_loc: *mut c_int, options: c_int) -> pid_t {
unimplemented!();
}
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