Christian Leutloff
|
_XOPEN_SOURCE / _XOPEN_SOURCE_EXTENDED strips addinfo intentional?
|
Christian Leutloff
06/10/2008 8:54 AM
post8908
|
_XOPEN_SOURCE / _XOPEN_SOURCE_EXTENDED strips addinfo intentional?
./configure from Python 2.5 fails when testing for getaddrinfo, which is part of QNX (http://www.qnx.com/developers/docs
/6.3.2/neutrino/lib_ref/g/getaddrinfo.html)
These are the error messages:
$ gcc -o conftest -O2 conftest.c -lsocket
conftest.c: In function `main':
conftest.c:304: error: storage size of `hints' isn't known
conftest.c:310: error: `AI_PASSIVE' undeclared (first use in this function)
conftest.c:310: error: (Each undeclared identifier is reported only once
conftest.c:310: error: for each function it appears in.)
conftest.c:313: warning: passing arg 4 of `getaddrinfo' from incompatible pointer type
conftest.c:317: error: dereferencing pointer to incomplete type
conftest.c:318: error: dereferencing pointer to incomplete type
conftest.c:319: error: dereferencing pointer to incomplete type
conftest.c:320: error: dereferencing pointer to incomplete type
conftest.c:320: error: dereferencing pointer to incomplete type
conftest.c:322: error: `NI_NUMERICHOST' undeclared (first use in this function)
conftest.c:322: error: `NI_NUMERICSERV' undeclared (first use in this function)
conftest.c:325: error: dereferencing pointer to incomplete type
conftest.c:372: warning: passing arg 1 of `freeaddrinfo' from incompatible pointer type
conftest.c:377: warning: passing arg 1 of `freeaddrinfo' from incompatible pointer type
The solution is to not define
#define _XOPEN_SOURCE 600
#define _XOPEN_SOURCE_EXTENDED 1
and everything works as expected.
Is this behavior intentional?
I'll fix this behavior through the definition
define_xopen_source=no
in the configure script.
The conftest.c is attached. The file does include the relevant section of the config.log, too.
|
|
|