Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit39ec43a

Browse files
committed
Revert getaddrinfo configure changes until we get a solution that isproperly tested on Tru64 - pre recent discussion (or lack thereof) on -hackers.
1 parent2f8a7bf commit39ec43a

File tree

2 files changed

+72
-36
lines changed

2 files changed

+72
-36
lines changed

‎configure

Lines changed: 69 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14600,26 +14600,66 @@ done
1460014600

1460114601
# System's version of getaddrinfo(), if any, may be used only if we found
1460214602
# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14603-
# (Note: theAC_TRY_LINK probe fails on Windows, where the available
14603+
# (Note: theAC_REPLACE_FUNCS probe fails on Windows, where the available
1460414604
# versions of getaddrinfo don't follow normal C call protocol. This is OK
1460514605
# because we want to use our own getaddrinfo.c on Windows anyway.)
1460614606
if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14607-
echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14608-
echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14607+
14608+
for ac_func in getaddrinfo
14609+
do
14610+
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14611+
echo "$as_me:$LINENO: checking for $ac_func" >&5
14612+
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14613+
if eval "test \"\${$as_ac_var+set}\" = set"; then
14614+
echo $ECHO_N "(cached) $ECHO_C" >&6
14615+
else
1460914616
cat >conftest.$ac_ext <<_ACEOF
1461014617
/* confdefs.h. */
1461114618
_ACEOF
1461214619
cat confdefs.h >>conftest.$ac_ext
1461314620
cat >>conftest.$ac_ext <<_ACEOF
1461414621
/* end confdefs.h. */
14622+
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14623+
For example, HP-UX 11i <limits.h> declares gettimeofday. */
14624+
#define $ac_func innocuous_$ac_func
1461514625

14616-
#include <sys/socket.h>
14617-
#include <netdb.h>
14626+
/* System header to define __stub macros and hopefully few prototypes,
14627+
which can conflict with char $ac_func (); below.
14628+
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14629+
<limits.h> exists even on freestanding compilers. */
14630+
14631+
#ifdef __STDC__
14632+
# include <limits.h>
14633+
#else
14634+
# include <assert.h>
14635+
#endif
14636+
14637+
#undef $ac_func
14638+
14639+
/* Override any gcc2 internal prototype to avoid an error. */
14640+
#ifdef __cplusplus
14641+
extern "C"
14642+
{
14643+
#endif
14644+
/* We use char because int might match the return type of a gcc2
14645+
builtin and then its argument prototype would still apply. */
14646+
char $ac_func ();
14647+
/* The GNU C library defines this for functions which it implements
14648+
to always fail with ENOSYS. Some functions are actually named
14649+
something starting with __ and the normal name is an alias. */
14650+
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14651+
choke me
14652+
#else
14653+
char (*f) () = $ac_func;
14654+
#endif
14655+
#ifdef __cplusplus
14656+
}
14657+
#endif
1461814658

1461914659
int
1462014660
main ()
1462114661
{
14622-
returngetaddrinfo("", "", NULL, NULL) ? 0 : 1;
14662+
returnf != $ac_func;
1462314663
;
1462414664
return 0;
1462514665
}
@@ -14646,30 +14686,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1464614686
ac_status=$?
1464714687
echo "$as_me:$LINENO: \$? = $ac_status" >&5
1464814688
(exit $ac_status); }; }; then
14649-
14650-
cat >>confdefs.h <<\_ACEOF
14651-
#define HAVE_GETADDRINFO 1
14652-
_ACEOF
14653-
14654-
echo "$as_me:$LINENO: result: yes" >&5
14655-
echo "${ECHO_T}yes" >&6
14689+
eval "$as_ac_var=yes"
1465614690
else
1465714691
echo "$as_me: failed program was:" >&5
1465814692
sed 's/^/| /' conftest.$ac_ext >&5
1465914693

14660-
echo "$as_me:$LINENO: result: no" >&5
14661-
echo "${ECHO_T}no" >&6
14662-
case $LIBOBJS in
14663-
"getaddrinfo.$ac_objext" | \
14664-
*" getaddrinfo.$ac_objext" | \
14665-
"getaddrinfo.$ac_objext "* | \
14666-
*" getaddrinfo.$ac_objext "* ) ;;
14667-
*) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14668-
esac
14669-
14694+
eval "$as_ac_var=no"
1467014695
fi
1467114696
rm -f conftest.err conftest.$ac_objext \
1467214697
conftest$ac_exeext conftest.$ac_ext
14698+
fi
14699+
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14700+
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14701+
if test `eval echo '${'$as_ac_var'}'` = yes; then
14702+
cat >>confdefs.h <<_ACEOF
14703+
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14704+
_ACEOF
14705+
14706+
else
14707+
case $LIBOBJS in
14708+
"$ac_func.$ac_objext" | \
14709+
*" $ac_func.$ac_objext" | \
14710+
"$ac_func.$ac_objext "* | \
14711+
*" $ac_func.$ac_objext "* ) ;;
14712+
*) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14713+
esac
14714+
14715+
fi
14716+
done
14717+
14718+
1467314719
else
1467414720
case $LIBOBJS in
1467514721
"getaddrinfo.$ac_objext" | \

‎configure.in

Lines changed: 3 additions & 13 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.455 2006/03/06 17:41:43 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.456 2006/04/07 17:50:03 adunstan Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -940,21 +940,11 @@ AC_REPLACE_FUNCS([crypt fseeko getopt getrusage inet_aton random rint srandom st
940940

941941
# System's version of getaddrinfo(), if any, may be used only if we found
942942
# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
943-
# (Note: theAC_TRY_LINK probe fails on Windows, where the available
943+
# (Note: theAC_REPLACE_FUNCS probe fails on Windows, where the available
944944
# versions of getaddrinfo don't follow normal C call protocol. This is OK
945945
# because we want to use our own getaddrinfo.c on Windows anyway.)
946946
if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
947-
dnl Cannot use AC_CHECK_FUNC because getaddrinfo may be a macro
948-
AC_MSG_CHECKING(for getaddrinfo)
949-
AC_TRY_LINK([
950-
#include <sys/socket.h>
951-
#include <netdb.h>
952-
],
953-
[return getaddrinfo("", "", NULL, NULL) ? 0 : 1;],
954-
[AC_DEFINE(HAVE_GETADDRINFO, 1, [Define to 1 if you have getaddrinfo().])
955-
AC_MSG_RESULT(yes)],
956-
[AC_MSG_RESULT(no)
957-
AC_LIBOBJ(getaddrinfo)])
947+
AC_REPLACE_FUNCS([getaddrinfo])
958948
else
959949
AC_LIBOBJ(getaddrinfo)
960950
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp