Subject: c-ares not compiling with mingw32ce

c-ares not compiling with mingw32ce

From: Vincent Torri <vincent.torri_at_gmail.com>
Date: Sat, 19 Mar 2011 13:12:00 +0100

Hey,

I'm configuring c-ares with:

./configure --host=arm-mingw32ce

make gives me these warning and errors:

/bin/bash ./libtool --tag=CC --mode=compile arm-mingw32ce-gcc
-DHAVE_CONFIG_H -I. -I. -isystem /home/torri/local/wince/include -g0 -O2
-Wno-system-headers -MT ares__close_sockets.lo -MD -MP -MF
.deps/ares__close_sockets.Tpo -c -o ares__close_sockets.lo
ares__close_sockets.c
libtool: compile: arm-mingw32ce-gcc -DHAVE_CONFIG_H -I. -I. -isystem
/home/torri/local/wince/include -g0 -O2 -Wno-system-headers -MT
ares__close_sockets.lo -MD -MP -MF .deps/ares__close_sockets.Tpo -c
ares__close_sockets.c -DDLL_EXPORT -DPIC -o .libs/ares__close_sockets.o
In file included from ares__close_sockets.c:17:
ares_setup.h:185:1: warning: "AF_INET6" redefined
In file included from ares_setup.h:119,
                 from ares__close_sockets.c:17:
/home/torri/local/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.4.0/../../../../arm-mingw32ce/include/winsock.h:323:1:
warning: this is the location of the previous definition
In file included from setup_once.h:38,
                 from ares_setup.h:194,
                 from ares__close_sockets.c:17:
/home/torri/local/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.4.0/../../../../arm-mingw32ce/include/errno.h:12:25:
error: no include path in which to search for errno.h
In file included from ares.h:57,
                 from ares__close_sockets.c:24:
/home/torri/local/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.4.0/../../../../arm-mingw32ce/include/ws2tcpip.h:16:2:
error: #error "ws2tcpip.h is not compatible with winsock.h. Include
winsock2.h instead."
In file included from ares.h:57,
                 from ares__close_sockets.c:24:
/home/torri/local/opt/mingw32ce/lib/gcc/arm-mingw32ce/4.4.0/../../../../arm-mingw32ce/include/ws2tcpip.h:137:
error: redefinition of 'struct ip_mreq'
In file included from ares_private.h:89,
                 from ares__close_sockets.c:25:
ares_ipv6.h:26: error: redefinition of 'struct sockaddr_in6'
ares_ipv6.h:37: error: redefinition of 'struct addrinfo'
make[1]: *** [ares__close_sockets.lo] Error 1
make[1]: Leaving directory `/home/torri/gitroot/c-ares'
make: *** [all] Error 2

What I can say is that

1) errno does not exist on Windows CE.
2) the test for AF_INET6 is probably not good for Windows CE
3) c-ares uses only winsock 1.*, so ws2tcpip.h should not be included on
that platform.

one can use _WIN32_WCE or UNDER_CE macros to select that OS

regards

Vincent Torri
Received on 2011-03-19