#![crate_name="ctypes"]
#![crate_type="lib"]
#![feature(globs, phase)]
#![no_std]
#![allow(non_camel_case_types)]
extern crate core;
#[cfg(test)] #[phase(plugin, link)] extern crate std;
#[cfg(target_word_size = "32")]
pub use lp32::*;
#[cfg(all(unix, target_word_size = "64"))]
pub use lp64::*;
#[cfg(all(target_word_size = "64", target_os = "windows"))]
pub use llp64::*;
#[cfg(all(target_os = "linux", x32abi))]
pub use x32::*;
#[repr(u8)]
#[allow(missing_copy_implementations)]
pub enum void {
__variant1,
__variant2,
}
mod common {
pub type ichar = i8; pub type uchar = u8;
pub type iint = i32; pub type uint_ = u32;
pub type ishort = i16; pub type ushort = u16;
pub type ilonglong = i64; pub type ulonglong = u64;
pub type float = f32; pub type double = f64;
pub type imax = i64; pub type umax = u64;
}
pub mod lp32 {
pub use common::*;
pub type ilong = i32; pub type ulong = u32;
pub type imem = i32; pub type umem = u32;
pub type ireg = i32; pub type ureg = u32;
}
pub mod lp64 {
pub use common::*;
pub type ilong = i64; pub type ulong = u64;
pub type imem = i64; pub type umem = u64;
pub type ireg = i64; pub type ureg = u64;
}
pub mod llp64 {
pub use common::*;
pub type ilong = i32; pub type ulong = u32;
pub type imem = i64; pub type umem = u64;
pub type ireg = i64; pub type ureg = u64;
}
pub mod x32 {
pub use common::*;
pub type ilong = i64; pub type ulong = u64;
pub type imem = i32; pub type umem = u32;
pub type ireg = i64; pub type ureg = u64;
}
#[cfg(test)] mod tests {
#[test]
fn int_is_not_always_int() {
use core::mem::size_of;
use super::*;
if cfg!(target_word_size = "64") {
assert!(size_of::<iint>() != size_of::<int>());
}
}
}