summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-06 20:39:03 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-06 20:39:03 (GMT)
commitf73034b8e3d67ad9eeb12d06976588e3fbac24b5 (patch)
treefefbce2ad30a3c3b2f758647a80c98f9607082e6 /unix
parentc4606765eb2e224df1b49b48fbb74d5fde757b29 (diff)
parente53ea0c452e0c9b1292164c18d90c420f1ca331a (diff)
downloadtcl-f73034b8e3d67ad9eeb12d06976588e3fbac24b5.zip
tcl-f73034b8e3d67ad9eeb12d06976588e3fbac24b5.tar.gz
tcl-f73034b8e3d67ad9eeb12d06976588e3fbac24b5.tar.bz2
Merge 8.7
Diffstat (limited to 'unix')
-rw-r--r--unix/README2
-rwxr-xr-xunix/configure54
-rw-r--r--unix/tcl.m438
3 files changed, 85 insertions, 9 deletions
diff --git a/unix/README b/unix/README
index 381cbdd..3340dc6 100644
--- a/unix/README
+++ b/unix/README
@@ -163,5 +163,5 @@ don't run the tests as superuser: this will cause several of them to fail. If
a test is failing consistently, please send us a bug report with as much
detail as you can manage to our tracker:
- http://core.tcl.tk/tcl/reportlist
+ https://core.tcl-lang.org/tcl/reportlist
diff --git a/unix/configure b/unix/configure
index 545291c..00a12c6 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 fdcb3d3..30b1851 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>