2017-09-29 14:54:29 -04:00
|
|
|
#[cfg(any(windows, unix))]
|
2017-09-27 03:04:12 -04:00
|
|
|
#[repr(C)]
|
|
|
|
struct Foo {
|
2017-09-29 14:54:29 -04:00
|
|
|
x: i32,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
#[repr(C)]
|
|
|
|
struct Bar {
|
|
|
|
y: Foo,
|
2017-09-27 03:04:12 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(unix)]
|
|
|
|
#[repr(C)]
|
2017-09-29 14:54:29 -04:00
|
|
|
struct Bar {
|
|
|
|
z: Foo,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[repr(C)]
|
|
|
|
struct Root {
|
|
|
|
w: Bar,
|
2017-09-27 03:04:12 -04:00
|
|
|
}
|
|
|
|
|
2018-03-09 20:30:40 +00:00
|
|
|
#[cfg(windows)]
|
|
|
|
pub const DEFAULT_X: i32 = 0x08;
|
|
|
|
|
|
|
|
#[cfg(unix)]
|
|
|
|
pub const DEFAULT_X: i32 = 0x2a;
|
|
|
|
|
2017-09-27 03:04:12 -04:00
|
|
|
#[no_mangle]
|
2018-01-04 14:42:02 -06:00
|
|
|
pub extern "C" fn root(a: Root)
|
2017-09-27 03:04:12 -04:00
|
|
|
{ }
|