|I'm compiling libevent on Solaris. |
ev_off_t appears to be #define'd as off_t on UNIX machines ("#define ev_off_t off_t" in util.h).
However, on this machine, off_t is first defined in *stdio.h*!
Additionally, my app uses the following defines to make stdio 64-bit aware:
Of course, libevent does *not* compile with these flags, and so off_t is 32 bits when the library is built, and then it's 64 bits in my app!
This makes for all sorts of fun when calling evbuffer_add_file.
I suspect other OSes have a consistent off_t and so this case isn't insane.
But *why* is ev_off_t based on stdio in this case (is this a Solaris accident)?
My patch for now is to use "always be 64-bit" for ev_off_t (like the Windows code does). Any other suggestions to make this more bulletproof?
i.e. #define ev_off_t ev_int64_t