1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#![no_std]
#![allow(non_camel_case_types)]
#![cfg_attr(test, feature(test))]
#[cfg(test)]
extern crate test;
#[cfg(any(target_arch = "x86",
target_arch = "arm",
target_arch = "mips",
target_arch = "mipsel",
target_arch = "powerpc",
target_arch = "le32"))]
mod libc {
pub type c_char = i8;
pub type c_int = i32;
pub type size_t = u32;
pub type wchar_t = i32;
}
#[cfg(any(target_arch = "x86_64",
target_arch = "aarch64"))]
mod libc {
#[cfg(not(target_arch = "aarch64"))]
pub type c_char = i8;
#[cfg(target_arch = "aarch64")]
pub type c_char = u8;
pub type c_int = i32;
pub type size_t = u64;
#[cfg(not(target_arch = "aarch64"))]
pub type wchar_t = i32;
#[cfg(target_arch = "aarch64")]
pub type wchar_t = u32;
}
pub mod ctype;
pub mod string;