On Fri, Nov 21, 2014 at 10:03:12AM +0200, Vlad Khorsun wrote: > 19.11.2014 16:08, Michal Kubecek пишет: > > > Could you check if first getaddrinfo() call returns EAI_FAMILY on > > Windows XP without IPv6 support? The way I read the manual page it > > should but I would rather make sure. > > On W2K3 without IPv6 i see that getaddrinfo() returns 0 and gai_result > contains one entry with ai_family == AF_INET6. But later, call to socket() > returns error 10047 (WSAEAFNOSUPPORT). Note, EAI_* codes is just an aliases > for WSA* codes. In this case WSAEAFNOSUPPORT is an real error code for > EAI_FAMILY.
That's unfortunate... I suppose the easiest way out of this would be adding something like #ifdef WIN_NT if (!host_str && /* Windows version < Vista */) gai_hints.ai_family = AF_INET; #endif This should also take care of XP/2003 with IPv6 support (making the server listen on 0.0.0.0 by default). > BTW, always write OS error code with custom error message ! You mean the number in addition to its text representation? Michal Kubecek ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel