On 04/29/2011 01:17 AM, Simon Josefsson wrote:
>> test-getaddrinfo.c:28:1: warning: initialization from incompatible
>> pointer type
> 
> Improving this seems like a good idea to me.
> 
> Couldn't you use the same approach as getaddrinfo.c does to find the
> function?  Mingw's inline prototype seems unfortunate, and I'm not sure
> why it works that way -- I believe gai_strerror is a real function on
> Windows.

In mingw (I'm not sure how it would be with native headers), the
<ws2tcpip.h> header has an inline definition of gai_strerrorA and
gai_strerrorW, then does #define gai_strerror gai_strerrorA (or W).
That is, I don't think you can link against gai_strerror, which is why
the m4 file uses AC_CHECK_DECLS rather than AC_REPLACE_FUNC.

> 
> Also, there IS a lib/gai_strerror.c, isn't it used?

Prior to this thread, not on mingw - we were using the Windows version
as-is.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to