diff options
| author | dgp <dgp@users.sourceforge.net> | 2019-10-02 15:45:36 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2019-10-02 15:45:36 (GMT) |
| commit | b73c0aa0aaf5149b231681e20f4ddaf49d736ca2 (patch) | |
| tree | 4ca7caa3819376a52cc4844ed73e6be020a4c656 /unix | |
| parent | 22d8a012ca324913bca0420568f176b122fface4 (diff) | |
| parent | 67e037520d52c273bf697c5eb14217f675da6ba9 (diff) | |
| download | tcl-b73c0aa0aaf5149b231681e20f4ddaf49d736ca2.zip tcl-b73c0aa0aaf5149b231681e20f4ddaf49d736ca2.tar.gz tcl-b73c0aa0aaf5149b231681e20f4ddaf49d736ca2.tar.bz2 | |
merge 8.7
Diffstat (limited to 'unix')
| -rwxr-xr-x | unix/configure | 54 | ||||
| -rw-r--r-- | unix/tcl.m4 | 38 |
2 files changed, 84 insertions, 8 deletions
diff --git a/unix/configure b/unix/configure index 34a1e0d..3bc4bb6 100755 --- a/unix/configure +++ b/unix/configure @@ -7926,7 +7926,30 @@ $as_echo "#define HAVE_MTSAFE_GETHOSTBYADDR 1" >>confdefs.h else - ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" + + # Avoids picking hidden internal symbol from libc + ac_fn_c_check_decl "$LINENO" "gethostbyname_r" "ac_cv_have_decl_gethostbyname_r" "#include <netdb.h> +" +if test "x$ac_cv_have_decl_gethostbyname_r" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETHOSTBYNAME_R $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + tcl_cv_api_gethostbyname_r=yes +else + tcl_cv_api_gethostbyname_r=no +fi + + + + if test "$tcl_cv_api_gethostbyname_r" = yes; then + ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" if test "x$ac_cv_func_gethostbyname_r" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r with 6 args" >&5 @@ -8063,7 +8086,32 @@ $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h fi - ac_fn_c_check_func "$LINENO" "gethostbyaddr_r" "ac_cv_func_gethostbyaddr_r" + fi + + + # Avoids picking hidden internal symbol from libc + ac_fn_c_check_decl "$LINENO" "gethostbyaddr_r" "ac_cv_have_decl_gethostbyaddr_r" "#include <netdb.h> +" +if test "x$ac_cv_have_decl_gethostbyaddr_r" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETHOSTBYADDR_R $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + + tcl_cv_api_gethostbyaddr_r=yes +else + tcl_cv_api_gethostbyaddr_r=no +fi + + + + if test "$tcl_cv_api_gethostbyaddr_r" = yes; then + ac_fn_c_check_func "$LINENO" "gethostbyaddr_r" "ac_cv_func_gethostbyaddr_r" if test "x$ac_cv_func_gethostbyaddr_r" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr_r with 7 args" >&5 @@ -8165,6 +8213,8 @@ $as_echo "#define HAVE_GETHOSTBYADDR_R 1" >>confdefs.h fi + fi + fi #--------------------------------------------------------------------------- diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 70303ce..93efb49 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2518,7 +2518,20 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ # #-------------------------------------------------------------------- -AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [ +AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [ + # Avoids picking hidden internal symbol from libc + SC_TCL_GETHOSTBYADDR_R_DECL + + if test "$tcl_cv_api_gethostbyaddr_r" = yes; then + SC_TCL_GETHOSTBYADDR_R_TYPE + fi +]) + +AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_DECL], [AC_CHECK_DECLS(gethostbyaddr_r, [ + tcl_cv_api_gethostbyaddr_r=yes],[tcl_cv_api_gethostbyaddr_r=no],[#include <netdb.h>]) +]) + +AC_DEFUN([SC_TCL_GETHOSTBYADDR_R_TYPE], [AC_CHECK_FUNC(gethostbyaddr_r, [ AC_CACHE_CHECK([for gethostbyaddr_r with 7 args], tcl_cv_api_gethostbyaddr_r_7, [ AC_TRY_COMPILE([ #include <netdb.h> @@ -2579,14 +2592,27 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [ # Results: # # Might define the following vars: -# HAVE_GETHOSTBYADDR_R -# HAVE_GETHOSTBYADDR_R_3 -# HAVE_GETHOSTBYADDR_R_5 -# HAVE_GETHOSTBYADDR_R_6 +# HAVE_GETHOSTBYNAME_R +# HAVE_GETHOSTBYNAME_R_3 +# HAVE_GETHOSTBYNAME_R_5 +# HAVE_GETHOSTBYNAME_R_6 # #-------------------------------------------------------------------- -AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [ +AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [ + # Avoids picking hidden internal symbol from libc + SC_TCL_GETHOSTBYNAME_R_DECL + + if test "$tcl_cv_api_gethostbyname_r" = yes; then + SC_TCL_GETHOSTBYNAME_R_TYPE + fi +]) + +AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_DECL], [AC_CHECK_DECLS(gethostbyname_r, [ + tcl_cv_api_gethostbyname_r=yes],[tcl_cv_api_gethostbyname_r=no],[#include <netdb.h>]) +]) + +AC_DEFUN([SC_TCL_GETHOSTBYNAME_R_TYPE], [AC_CHECK_FUNC(gethostbyname_r, [ AC_CACHE_CHECK([for gethostbyname_r with 6 args], tcl_cv_api_gethostbyname_r_6, [ AC_TRY_COMPILE([ #include <netdb.h> |
