Yang Tse wrote:
2009/6/9, Gregor Jasny wrote:

[...] I'll prepare a visibility patch within the next days for the GCC compiler.

That's very nice.

I'd like to go the following way:

* Check during configure if gcc-visibility is available.
* If yes, add -fvisibility=hidden to CFLAGS
* In ares.h define ARES_PUBLIC to
  __attribute__ ((visibility("default"))) if gcc-visibility is available
  declspec*foo* on Windows (or ignore it like now

The configure part gives me some headaches. In glibc and mozilla configure.in I've found some visibility checking code (grep for HAVE_VISIBILITY) but I don't know where to start integrating it into c-ares. The mozilla code looks more promising.

As you've already worked on the autoconf stuff, can you try integrate the mozilla visibility checks into c-ares?

Another option would be the usage of export maps [1]. But I don't know if they're broken on Solaris, too.

Thanks,
Gregor

[1] http://people.redhat.com/drepper/dsohowto.pdf
[2] http://mxr.mozilla.org/mozilla-central/source/configure.in

Reply via email to