Skip to content

Commit

Permalink
Auto merge of rust-lang#9 - Amanieu:patch-1, r=japaric
Browse files Browse the repository at this point in the history
Include additional types from libc

Copied a few extra definitions from the libc crate.
  • Loading branch information
homunkulus committed Oct 13, 2017
2 parents 40007c5 + f9ab9f9 commit 4d8b252
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 4d8b252

Please sign in to comment.