Skip to content

Commit cb6a08c

Browse files
committed
Remove unnecessary configure test for inet_ntop(), per Andrew Dunstan.
1 parent ff15b3d commit cb6a08c

File tree

2 files changed

+5
-99
lines changed

2 files changed

+5
-99
lines changed

configure

Lines changed: 1 addition & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -13804,105 +13804,12 @@ fi
1380413804
echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
1380513805
echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
1380613806
if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13807-
echo "$as_me:$LINENO: checking for inet_ntop" >&5
13808-
echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6
13809-
if test "${ac_cv_func_inet_ntop+set}" = set; then
13810-
echo $ECHO_N "(cached) $ECHO_C" >&6
13811-
else
13812-
cat >conftest.$ac_ext <<_ACEOF
13813-
/* confdefs.h. */
13814-
_ACEOF
13815-
cat confdefs.h >>conftest.$ac_ext
13816-
cat >>conftest.$ac_ext <<_ACEOF
13817-
/* end confdefs.h. */
13818-
/* Define inet_ntop to an innocuous variant, in case <limits.h> declares inet_ntop.
13819-
For example, HP-UX 11i <limits.h> declares gettimeofday. */
13820-
#define inet_ntop innocuous_inet_ntop
13821-
13822-
/* System header to define __stub macros and hopefully few prototypes,
13823-
which can conflict with char inet_ntop (); below.
13824-
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13825-
<limits.h> exists even on freestanding compilers. */
13826-
13827-
#ifdef __STDC__
13828-
# include <limits.h>
13829-
#else
13830-
# include <assert.h>
13831-
#endif
13832-
13833-
#undef inet_ntop
13834-
13835-
/* Override any gcc2 internal prototype to avoid an error. */
13836-
#ifdef __cplusplus
13837-
extern "C"
13838-
{
13839-
#endif
13840-
/* We use char because int might match the return type of a gcc2
13841-
builtin and then its argument prototype would still apply. */
13842-
char inet_ntop ();
13843-
/* The GNU C library defines this for functions which it implements
13844-
to always fail with ENOSYS. Some functions are actually named
13845-
something starting with __ and the normal name is an alias. */
13846-
#if defined (__stub_inet_ntop) || defined (__stub___inet_ntop)
13847-
choke me
13848-
#else
13849-
char (*f) () = inet_ntop;
13850-
#endif
13851-
#ifdef __cplusplus
13852-
}
13853-
#endif
13854-
13855-
int
13856-
main ()
13857-
{
13858-
return f != inet_ntop;
13859-
;
13860-
return 0;
13861-
}
13862-
_ACEOF
13863-
rm -f conftest.$ac_objext conftest$ac_exeext
13864-
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13865-
(eval $ac_link) 2>conftest.er1
13866-
ac_status=$?
13867-
grep -v '^ *+' conftest.er1 >conftest.err
13868-
rm -f conftest.er1
13869-
cat conftest.err >&5
13870-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13871-
(exit $ac_status); } &&
13872-
{ ac_try='test -z "$ac_c_werror_flag"
13873-
|| test ! -s conftest.err'
13874-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13875-
(eval $ac_try) 2>&5
13876-
ac_status=$?
13877-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13878-
(exit $ac_status); }; } &&
13879-
{ ac_try='test -s conftest$ac_exeext'
13880-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13881-
(eval $ac_try) 2>&5
13882-
ac_status=$?
13883-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
13884-
(exit $ac_status); }; }; then
13885-
ac_cv_func_inet_ntop=yes
13886-
else
13887-
echo "$as_me: failed program was:" >&5
13888-
sed 's/^/| /' conftest.$ac_ext >&5
13889-
13890-
ac_cv_func_inet_ntop=no
13891-
fi
13892-
rm -f conftest.err conftest.$ac_objext \
13893-
conftest$ac_exeext conftest.$ac_ext
13894-
fi
13895-
echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5
13896-
echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6
13897-
if test $ac_cv_func_inet_ntop = yes; then
1389813807

1389913808
cat >>confdefs.h <<\_ACEOF
1390013809
#define HAVE_IPV6 1
1390113810
_ACEOF
1390213811

13903-
HAVE_IPV6=yes
13904-
fi
13905-
13812+
HAVE_IPV6=yes
1390613813
fi
1390713814

1390813815

configure.in

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.418 2005/08/02 19:02:30 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.419 2005/08/17 20:20:10 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -825,10 +825,9 @@ AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
825825

826826
HAVE_IPV6=no
827827
AC_CHECK_TYPE([struct sockaddr_in6],
828-
[AC_CHECK_FUNC(inet_ntop,
829-
[AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])
830-
HAVE_IPV6=yes])],
831-
[],
828+
[AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])
829+
HAVE_IPV6=yes],
830+
[],
832831
[$ac_includes_default
833832
#include <netinet/in.h>])
834833
AC_SUBST(HAVE_IPV6)

0 commit comments

Comments
 (0)