File tree Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Expand file tree Collapse file tree 2 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ cfg_if! {
157
157
158
158
mod xous;
159
159
pub use xous:: * ;
160
+ } else if #[ cfg( target_os = "zephyr" ) ] {
161
+ mod zephyr;
162
+ pub use zephyr:: * ;
160
163
} else {
161
164
// non-supported targets: empty...
162
165
}
Original file line number Diff line number Diff line change
1
+ //! Definitions found commonly among almost all Unix derivatives
2
+ //!
3
+ //! More functions and definitions can be found in the more specific modules
4
+ //! according to the platform in question.
5
+
6
+ pub type int8_t = i8 ;
7
+ pub type int16_t = i16 ;
8
+ pub type int32_t = i32 ;
9
+ pub type int64_t = i64 ;
10
+ pub type uint8_t = u8 ;
11
+ pub type uint16_t = u16 ;
12
+ pub type uint32_t = u32 ;
13
+ pub type uint64_t = u64 ;
14
+
15
+ pub type c_schar = i8 ;
16
+ pub type c_uchar = u8 ;
17
+ pub type c_short = i16 ;
18
+ pub type c_ushort = u16 ;
19
+ pub type c_int = i32 ;
20
+ pub type c_uint = u32 ;
21
+ pub type c_float = f32 ;
22
+ pub type c_double = f64 ;
23
+ pub type c_longlong = i64 ;
24
+ pub type c_ulonglong = u64 ;
25
+ pub type intmax_t = i64 ;
26
+ pub type uintmax_t = u64 ;
27
+
28
+ pub type size_t = usize ;
29
+ pub type ptrdiff_t = isize ;
30
+ pub type intptr_t = isize ;
31
+ pub type uintptr_t = usize ;
32
+ pub type ssize_t = isize ;
33
+
34
+ cfg_if ! {
35
+ if #[ cfg( libc_core_cvoid) ] {
36
+ pub use :: ffi:: c_void;
37
+ } else {
38
+ // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help
39
+ // enable more optimization opportunities around it recognizing things
40
+ // like malloc/free.
41
+ #[ repr( u8 ) ]
42
+ #[ allow( missing_copy_implementations) ]
43
+ #[ allow( missing_debug_implementations) ]
44
+ pub enum c_void {
45
+ // Two dummy variants so the #[repr] attribute can be used.
46
+ #[ doc( hidden) ]
47
+ __variant1,
48
+ #[ doc( hidden) ]
49
+ __variant2,
50
+ }
51
+ }
52
+ }
You can’t perform that action at this time.
0 commit comments