12add0d91Sopenharmony_ci//! SGX C types definition
22add0d91Sopenharmony_ci
32add0d91Sopenharmony_cipub type c_schar = i8;
42add0d91Sopenharmony_cipub type c_uchar = u8;
52add0d91Sopenharmony_cipub type c_short = i16;
62add0d91Sopenharmony_cipub type c_ushort = u16;
72add0d91Sopenharmony_cipub type c_int = i32;
82add0d91Sopenharmony_cipub type c_uint = u32;
92add0d91Sopenharmony_cipub type c_float = f32;
102add0d91Sopenharmony_cipub type c_double = f64;
112add0d91Sopenharmony_cipub type c_longlong = i64;
122add0d91Sopenharmony_cipub type c_ulonglong = u64;
132add0d91Sopenharmony_cipub type intmax_t = i64;
142add0d91Sopenharmony_cipub type uintmax_t = u64;
152add0d91Sopenharmony_ci
162add0d91Sopenharmony_cipub type size_t = usize;
172add0d91Sopenharmony_cipub type ptrdiff_t = isize;
182add0d91Sopenharmony_cipub type intptr_t = isize;
192add0d91Sopenharmony_cipub type uintptr_t = usize;
202add0d91Sopenharmony_cipub type ssize_t = isize;
212add0d91Sopenharmony_ci
222add0d91Sopenharmony_cipub type c_char = i8;
232add0d91Sopenharmony_cipub type c_long = i64;
242add0d91Sopenharmony_cipub type c_ulong = u64;
252add0d91Sopenharmony_ci
262add0d91Sopenharmony_cipub const INT_MIN: c_int = -2147483648;
272add0d91Sopenharmony_cipub const INT_MAX: c_int = 2147483647;
282add0d91Sopenharmony_ci
292add0d91Sopenharmony_cicfg_if! {
302add0d91Sopenharmony_ci    if #[cfg(libc_core_cvoid)] {
312add0d91Sopenharmony_ci        pub use ::ffi::c_void;
322add0d91Sopenharmony_ci    } else {
332add0d91Sopenharmony_ci        // Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help
342add0d91Sopenharmony_ci        // enable more optimization opportunities around it recognizing things
352add0d91Sopenharmony_ci        // like malloc/free.
362add0d91Sopenharmony_ci        #[repr(u8)]
372add0d91Sopenharmony_ci        #[allow(missing_copy_implementations)]
382add0d91Sopenharmony_ci        #[allow(missing_debug_implementations)]
392add0d91Sopenharmony_ci        pub enum c_void {
402add0d91Sopenharmony_ci            // Two dummy variants so the #[repr] attribute can be used.
412add0d91Sopenharmony_ci            #[doc(hidden)]
422add0d91Sopenharmony_ci            __variant1,
432add0d91Sopenharmony_ci            #[doc(hidden)]
442add0d91Sopenharmony_ci            __variant2,
452add0d91Sopenharmony_ci        }
462add0d91Sopenharmony_ci    }
472add0d91Sopenharmony_ci}
48