Re: [rust-dev] FFI: how to deal with different platforms

2014-09-08 Thread Sean McArthur
You can use define the CSIZE a couple times in your file, with conditional compilation: http://doc.rust-lang.org/rust.html#conditional-compilation On Sun, Sep 7, 2014 at 6:03 PM, Fox, Michael wrote: > How can FFI work across platforms unless you compile against the specific > platform’s headers

Re: [rust-dev] FFI: how to deal with different platforms

2014-09-08 Thread Jack Moffitt
> Sometimes a common header defines the same-named structure, type or macro > differently depending on your platform. > > For example, here’s a definition from termios.h on OSX: > > #define CSIZE 0x0300 /* character size mask */ > > And here’s the same one on some old Linux: > > #defi

[rust-dev] FFI: how to deal with different platforms

2014-09-08 Thread Fox, Michael
How can FFI work across platforms unless you compile against the specific platform’s headers? Sometimes a common header defines the same-named structure, type or macro differently depending on your platform. For example, here’s a definition from termios.h on OSX: #define CSIZE 0x030