]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Remove unnecessary configure test for inet_ntop(), per Andrew Dunstan.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Aug 2005 20:20:22 +0000 (20:20 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Aug 2005 20:20:22 +0000 (20:20 +0000)
configure
configure.in

index dc965872e8dfd35202ac2d161b06a031cfd76a45..40543101b6b6b5f6b891a75cf0ca5a90d3467298 100755 (executable)
--- a/configure
+++ b/configure
 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
-  echo "$as_me:$LINENO: checking for inet_ntop" >&5
-echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6
-if test "${ac_cv_func_inet_ntop+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char inet_ntop (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char inet_ntop ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_inet_ntop) || defined (__stub___inet_ntop)
-choke me
-#else
-f = inet_ntop;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_inet_ntop=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_func_inet_ntop=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5
-echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6
-if test $ac_cv_func_inet_ntop = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_IPV6 1
 _ACEOF
 
-                                                         HAVE_IPV6=yes
-fi
-
+         HAVE_IPV6=yes
 fi
 
 
index 1f092d7f86a4c89539eac9229cbd3512f9a4ce8f..4c81a14aa5dc91460a87b4982256a5d1378b9b77 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.398.4.5 2005/05/05 20:07:34 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.398.4.6 2005/08/17 20:20:22 tgl Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -855,10 +855,9 @@ AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
 
 HAVE_IPV6=no
 AC_CHECK_TYPE([struct sockaddr_in6],
-              [AC_CHECK_FUNC(inet_ntop,
-                             [AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])
-                                                         HAVE_IPV6=yes])],
-              [],
+        [AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if you have support for IPv6.])
+         HAVE_IPV6=yes],
+        [],
 [$ac_includes_default
 #include <netinet/in.h>])
 AC_SUBST(HAVE_IPV6)