summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-10-24 14:36:00 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-10-24 14:36:00 (GMT)
commit861a65bc2fa83485bdc66f86cb13d4ad4798a68d (patch)
treed1ba7aa34ade87665af8710c19388945b613e9b6 /configure.in
parent6bc55c435ac398a4a6bc5c21e4b85a1bfd289a54 (diff)
downloadcpython-861a65bc2fa83485bdc66f86cb13d4ad4798a68d.zip
cpython-861a65bc2fa83485bdc66f86cb13d4ad4798a68d.tar.gz
cpython-861a65bc2fa83485bdc66f86cb13d4ad4798a68d.tar.bz2
Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
not properly processing numeric IPv4 addresses. Fixes V5.1 part of #472675.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 17 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index c9d2c1a..d9fdadf 100644
--- a/configure.in
+++ b/configure.in
@@ -1426,7 +1426,17 @@ AC_CHECK_FUNCS(getpgrp, AC_TRY_COMPILE([#include <unistd.h>], [getpgrp(0);], AC_
AC_CHECK_FUNCS(setpgrp, AC_TRY_COMPILE([#include <unistd.h>], [setpgrp(0,0);], AC_DEFINE(SETPGRP_HAVE_ARG)))
AC_CHECK_FUNCS(gettimeofday, AC_TRY_COMPILE([#include <sys/time.h>], [gettimeofday((struct timeval*)0,(struct timezone*)0);], ,AC_DEFINE(GETTIMEOFDAY_NO_TZ)))
-AC_CHECK_FUNCS(getaddrinfo, [dnl
+
+# On OSF/1 V5.1, getaddrinfo is available, but a define
+# for [no]getaddrinfo in netdb.h.
+AC_MSG_CHECKING(for getaddrinfo)
+AC_TRY_LINK([
+#include <sys/socket.h>
+#include <netdb.h>
+],[
+getaddrinfo(NULL, NULL, NULL, NULL);
+], [
+AC_MSG_RESULT(yes)
AC_MSG_CHECKING(getaddrinfo bug)
AC_TRY_RUN([
#include <sys/types.h>
@@ -1519,7 +1529,10 @@ buggygetaddrinfo=no,
AC_MSG_RESULT(buggy)
buggygetaddrinfo=yes,
AC_MSG_RESULT(buggy)
-buggygetaddrinfo=yes)], [buggygetaddrinfo=yes])
+buggygetaddrinfo=yes)], [
+AC_MSG_RESULT(no)
+buggygetaddrinfo=yes
+])
if test "$buggygetaddrinfo" = "yes"; then
if test "$ipv6" = "yes"; then
@@ -1527,6 +1540,8 @@ if test "$buggygetaddrinfo" = "yes"; then
echo ' or you can specify "--disable-ipv6"'.
exit 1
fi
+else
+ AC_DEFINE(HAVE_GETADDRINFO)
fi
AC_CHECK_FUNCS(getnameinfo)