blob: b717c8a59ee2fa7fbad8dcabe72e12cf78c1c91a [file] [log] [blame]
Alex Crichton8e5f0cd2015-09-09 22:46:19 -07001extern crate libc;
2extern crate libc_test;
3
Alex Crichton16083062015-09-09 22:59:24 -07004use std::mem;
5
Alex Crichtona9adfbf2015-09-09 23:21:27 -07006use libc::*;
7use libc::types::os::common::bsd43::*;
8
Alex Crichton3e5155b2015-09-09 23:46:19 -07009fn same(rust: u64, c: u64, attr: &str) {
10 if rust != c {
11 panic!("bad {}: rust: {} != c {}", attr, rust, c);
12 }
13}
14
15macro_rules! offset_of {
16 ($ty:ident, $field:ident) => (
17 (&((*(0 as *const $ty)).$field)) as *const _ as u64
18 )
19}
20
Alex Crichton8e5f0cd2015-09-09 22:46:19 -070021#[cfg(test)]
22include!(concat!(env!("OUT_DIR"), "/all.rs"));