Commit 5f4098e4 authored by Mark Andrews's avatar Mark Andrews
Browse files

1290. [bug] Check that system inet_pton() and inet_ntop() support

                        AF_INET6.
parent 57e0f58b
1290. [bug] Check that system inet_pton() and inet_ntop() support
AF_INET6.
1289. [port] Openserver: ifconfig.sh support.
1288. [port] Openserver: the value FD_SETSIZE depends on whether
......
......@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.322 $)
AC_REVISION($Revision: 1.323 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
......@@ -1199,12 +1199,14 @@ AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
# which provides some (all?) of the desired functions.
#
AC_MSG_CHECKING([for inet_ntop])
AC_TRY_LINK([
AC_MSG_CHECKING([for inet_ntop with IPv6 support])
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>],
[inet_ntop(0, 0, 0, 0); return (0);],
#include <arpa/inet.h>
main() {
char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
......@@ -1218,14 +1220,15 @@ AC_TRY_LINK([
# addresses with less than four octets, like "1.2.3". Also leading
# zeros should also be rejected.
AC_MSG_CHECKING([for inet_pton])
AC_MSG_CHECKING([for working inet_pton with IPv6 support])
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); }],
main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
(inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
[AC_MSG_RESULT(no)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment