Skip to content

Commit

Permalink
Include additional types from libc
Browse files Browse the repository at this point in the history
Copied a few extra definitions from the libc crate.
  • Loading branch information
Amanieu authored Oct 13, 2017
1 parent 40007c5 commit f9ab9f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ pub type c_uchar = u8;
pub type c_ushort = u16;
pub type c_ulonglong = u64;

pub type c_float = f32;
pub type c_double = f64;

pub type intmax_t = i64;
pub type uintmax_t = u64;

pub type size_t = usize;
pub type ptrdiff_t = isize;
pub type intptr_t = isize;
pub type uintptr_t = usize;
pub type ssize_t = isize;

// NOTE from libc v0.2.23
// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable
// more optimization opportunities around it recognizing things like
Expand Down

0 comments on commit f9ab9f9

Please sign in to comment.