Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 52ea290

Browse files
committed
Remove configure probe for gethostbyname_r.
It was only used by src/port/getaddrinfo.c, removed by the previous commit. Discussion: https://postgr.es/m/CA%2BhUKGJFLPCtAC58EAimF6a6GPw30TU_59FUY%3DGWB_kC%3DJEmVQ%40mail.gmail.com
1 parent 5579388 commit 52ea290

File tree

5 files changed

+6
-68
lines changed

5 files changed

+6
-68
lines changed

configure

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -11750,13 +11750,12 @@ fi
1175011750

1175111751

1175211752

11753-
for ac_func in strerror_r gethostbyname_r
11753+
for ac_func in strerror_r
1175411754
do :
11755-
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11756-
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11757-
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11755+
ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11756+
if test "x$ac_cv_func_strerror_r" = xyes; then :
1175811757
cat >>confdefs.h <<_ACEOF
11759-
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11758+
#define HAVE_STRERROR_R 1
1176011759
_ACEOF
1176111760

1176211761
fi
@@ -12431,62 +12430,6 @@ fi
1243112430

1243212431

1243312432
if test "$enable_thread_safety" = yes; then
12434-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12435-
$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12436-
if ${ac_cv_search_gethostbyname_r+:} false; then :
12437-
$as_echo_n "(cached) " >&6
12438-
else
12439-
ac_func_search_save_LIBS=$LIBS
12440-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12441-
/* end confdefs.h. */
12442-
12443-
/* Override any GCC internal prototype to avoid an error.
12444-
Use char because int might match the return type of a GCC
12445-
builtin and then its argument prototype would still apply. */
12446-
#ifdef __cplusplus
12447-
extern "C"
12448-
#endif
12449-
char gethostbyname_r ();
12450-
int
12451-
main ()
12452-
{
12453-
return gethostbyname_r ();
12454-
;
12455-
return 0;
12456-
}
12457-
_ACEOF
12458-
for ac_lib in '' nsl; do
12459-
if test -z "$ac_lib"; then
12460-
ac_res="none required"
12461-
else
12462-
ac_res=-l$ac_lib
12463-
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12464-
fi
12465-
if ac_fn_c_try_link "$LINENO"; then :
12466-
ac_cv_search_gethostbyname_r=$ac_res
12467-
fi
12468-
rm -f core conftest.err conftest.$ac_objext \
12469-
conftest$ac_exeext
12470-
if ${ac_cv_search_gethostbyname_r+:} false; then :
12471-
break
12472-
fi
12473-
done
12474-
if ${ac_cv_search_gethostbyname_r+:} false; then :
12475-
12476-
else
12477-
ac_cv_search_gethostbyname_r=no
12478-
fi
12479-
rm conftest.$ac_ext
12480-
LIBS=$ac_func_search_save_LIBS
12481-
fi
12482-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12483-
$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12484-
ac_res=$ac_cv_search_gethostbyname_r
12485-
if test "$ac_res" != no; then :
12486-
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12487-
12488-
fi
12489-
1249012433
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
1249112434
$as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
1249212435
if ${ac_cv_search_pthread_barrier_wait+:} false; then :

configure.ac

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ LIBS="$LIBS $PTHREAD_LIBS"
12141214
AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([
12151215
pthread.h not found; use --disable-thread-safety to disable thread safety])])
12161216
1217-
AC_CHECK_FUNCS([strerror_r gethostbyname_r])
1217+
AC_CHECK_FUNCS([strerror_r])
12181218
12191219
# Do test here with the proper thread flags
12201220
PGAC_FUNC_STRERROR_R_INT
@@ -1260,7 +1260,6 @@ AC_SEARCH_LIBS(shmget, cygipc)
12601260
AC_SEARCH_LIBS(backtrace_symbols, execinfo)
12611261

12621262
if test "$enable_thread_safety" = yes; then
1263-
AC_SEARCH_LIBS(gethostbyname_r, nsl)
12641263
AC_SEARCH_LIBS(pthread_barrier_wait, pthread)
12651264
fi
12661265

src/include/pg_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@
178178
*/
179179
#undef HAVE_GCC__SYNC_INT64_CAS
180180

181-
/* Define to 1 if you have the `gethostbyname_r' function. */
182-
#undef HAVE_GETHOSTBYNAME_R
183-
184181
/* Define to 1 if you have the `getifaddrs' function. */
185182
#undef HAVE_GETIFADDRS
186183

src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ connectDBComplete(PGconn *conn)
22292229
* will not block.
22302230
* o If you do not supply an IP address for the remote host (i.e. you
22312231
* supply a host name instead) then PQconnectStart will block on
2232-
* gethostbyname. You will be fine if using Unix sockets (i.e. by
2232+
* getaddrinfo. You will be fine if using Unix sockets (i.e. by
22332233
* supplying neither a host name nor a host address).
22342234
* o If your backend wants to use Kerberos authentication then you must
22352235
* supply both a host name and a host address, otherwise this function

src/tools/msvc/Solution.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ sub GenerateFiles
256256
HAVE_GCC__SYNC_INT32_CAS => undef,
257257
HAVE_GCC__SYNC_INT32_TAS => undef,
258258
HAVE_GCC__SYNC_INT64_CAS => undef,
259-
HAVE_GETHOSTBYNAME_R => undef,
260259
HAVE_GETIFADDRS => undef,
261260
HAVE_GETOPT => undef,
262261
HAVE_GETOPT_H => undef,

0 commit comments

Comments
 (0)