Fixed the library to use the new Rust 2018 module system.
This commit is contained in:
parent
4c817749dc
commit
1a3a5a26e3
@ -8,6 +8,7 @@ repository = "https://gitlab.com/CyberMages/Core/pact.git"
|
|||||||
documentation = ""
|
documentation = ""
|
||||||
keywords = ["c", "libc", "binding", "ffi", "pact", "nostd"]
|
keywords = ["c", "libc", "binding", "ffi", "pact", "nostd"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
4
build.rs
4
build.rs
@ -189,12 +189,12 @@ fn compile_and_run(output_name: &str, src_files: &[PathBuf], args: &[PathBuf])
|
|||||||
|
|
||||||
pub fn main()
|
pub fn main()
|
||||||
{
|
{
|
||||||
|
let _gen_file: PathBuf;
|
||||||
let mut errno_file: PathBuf;
|
let mut errno_file: PathBuf;
|
||||||
let mut gen_file: PathBuf;
|
|
||||||
let mut gen_errno_file: PathBuf;
|
let mut gen_errno_file: PathBuf;
|
||||||
|
|
||||||
errno_file = build_src_file(ERRNO_GENERATOR_FILENAME);
|
errno_file = build_src_file(ERRNO_GENERATOR_FILENAME);
|
||||||
gen_file = build_output_file(ERRNO_GENERATOR_OUTPUT_FILENAME);
|
_gen_file = build_output_file(ERRNO_GENERATOR_OUTPUT_FILENAME);
|
||||||
gen_errno_file = build_output_file(GENERATED_ERRNO_FILENAME);
|
gen_errno_file = build_output_file(GENERATED_ERRNO_FILENAME);
|
||||||
|
|
||||||
compile_and_run(ERRNO_GENERATOR_OUTPUT_FILENAME,
|
compile_and_run(ERRNO_GENERATOR_OUTPUT_FILENAME,
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
/// This defines the size_t type.
|
/// This defines the size_t type.
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
pub type size_t = usize;
|
pub type size_t = usize;
|
||||||
|
@ -12,12 +12,8 @@
|
|||||||
#[cfg(not(feature="use_std"))]
|
#[cfg(not(feature="use_std"))]
|
||||||
extern crate core as std;
|
extern crate core as std;
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate scribe;
|
extern crate scribe;
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate binding;
|
extern crate binding;
|
||||||
|
|
||||||
extern crate weave;
|
extern crate weave;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user