Is there a reason why c-ares places 'configure / build' time in various
headers? For example, in ares_build.h there's CARES_SIZEOF_LONG.
The reason why I'm asking is I recently tried to build some code in 64-bit
mode and the compiler started kicking back stuff like:
Source/Headers/C-Ares/ares_rules.h:102: error: size of array
'__cares_rule_01__' is negative
At first glance, this would seem to make it almost impossible to support
platforms that support more than one type of architecture simultaneously.
On Mac OS X, it's possible to simultaneously support big-endian ppc
(32-bit), ppc64, and little endian i386 (32-bit), x86_64 all at the same
time, and in the same library (the executable format supports 'fat' binaries
with an arbitrary number of architectures included in the final binary /
static library / dynamic library).
Having this type of information hard coded in the headers really, really
complicates things when trying to build universal binaries. I'm now trying
to figure out a simple way of dealing with this problem, but the easiest
would seem to be to supply hand hacked versions of ares_rules.h / etc that
conditionally check and set a lot of the stuff in there depending on various
compiler preprocessor defines... which would seem to defeat the entire
purpose of having those files (based on the comments).
Received on 2009-11-03