<div dir="ltr">Hello,<div><br></div><div>I am working on a ctypes binding to libuv [<a href="https://github.com/joyent/libuv">https://github.com/joyent/libuv</a>], and I have two questions:</div><div><br></div><div>1) Is the recommended way to interact with C-defines the way described in this thread? <a href="http://lists.ocaml.org/pipermail/ctypes/2014-February/000064.html">http://lists.ocaml.org/pipermail/ctypes/2014-February/000064.html</a></div><div><br></div><div>2) What is the recommended way to deal with struct fields that vary depending upon platform?</div><div><br></div><div>Libuv is a cross platform library, and has platform-specific fields for its structs. For example see the struct uv_loop_s.</div><div><br></div><div>Defined here <a href="https://github.com/joyent/libuv/blob/v1.0.0-rc1/include/uv.h">https://github.com/joyent/libuv/blob/v1.0.0-rc1/include/uv.h</a></div><div>Unix specific fields: <a href="https://github.com/joyent/libuv/blob/v1.0.0-rc1/include/uv-unix.h">https://github.com/joyent/libuv/blob/v1.0.0-rc1/include/uv-unix.h</a></div><div>Windows specific fields: <a href="https://github.com/joyent/libuv/blob/v1.0.0-rc1/include/uv-win.h">https://github.com/joyent/libuv/blob/v1.0.0-rc1/include/uv-win.h</a></div><div><br></div><div>Thank you.</div><div><br>Trevor</div></div>