summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-06-12 19:14:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-06-12 19:14:47 (GMT)
commit9e3e0498e7809842960b810cbad933f8f6679231 (patch)
tree653dfd51eed2dfef7f77de94ba81dc02d3a250f8
parent38be8d3de6482550ac70bbb23c6e7f260b01d9ab (diff)
parentb5e61d9f54b0a0579e07552cbca1e7b7a13444f8 (diff)
downloadtcl-9e3e0498e7809842960b810cbad933f8f6679231.zip
tcl-9e3e0498e7809842960b810cbad933f8f6679231.tar.gz
tcl-9e3e0498e7809842960b810cbad933f8f6679231.tar.bz2
merge 8.7
-rw-r--r--tests/async.test19
-rw-r--r--tests/safe.test12
-rw-r--r--unix/Makefile.in2
-rwxr-xr-xunix/configure34
-rw-r--r--unix/tcl.m411
-rw-r--r--unix/tclConfig.h.in3
-rw-r--r--unix/tclUnixPort.h13
-rw-r--r--win/Makefile.in2
8 files changed, 73 insertions, 23 deletions
diff --git a/tests/async.test b/tests/async.test
index 6de814b..fa3aae1 100644
--- a/tests/async.test
+++ b/tests/async.test
@@ -159,10 +159,12 @@ test async-4.1 {async interrupting bytecode sequence} -constraints {
global aresult
set aresult {Async event not delivered}
testasync marklater $handle
- for {set i 0} {
- $i < 2500000 && $aresult eq "Async event not delivered"
- } {incr i} {
- nothing
+ # allow plenty of time to pass in case valgrind is running
+ set start [clock seconds]
+ while {
+ [clock seconds] - $start < 180 && $aresult eq "Async event not delivered"
+ } {
+ nothing
}
return $aresult
}} $hm
@@ -178,9 +180,12 @@ test async-4.2 {async interrupting straight bytecode sequence} -constraints {
global aresult
set aresult {Async event not delivered}
testasync marklater $handle
- for {set i 0} {
- $i < 2500000 && $aresult eq "Async event not delivered"
- } {incr i} {}
+ # allow plenty of time to pass in case valgrind is running
+ set start [clock seconds]
+ while {
+ [clock seconds] - $start < 180 && $aresult eq "Async event not delivered"
+ } {
+ }
return $aresult
}} $hm
} -result {test pattern} -cleanup {
diff --git a/tests/safe.test b/tests/safe.test
index df60de6..217507e 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -308,14 +308,10 @@ test safe-8.7 {safe source control on file} -setup {
unset log
safe::interpDelete $i
} -result [list 1 {no such file or directory} [list "ERROR for slave a : [file join [info library] xxxxxxxxxxx.tcl]:no such file or directory"]]
-test safe-8.8 {safe source forbids -rsrc} -setup {
- catch {safe::interpDelete $i}
- safe::interpCreate $i
-} -body {
- $i eval {source -rsrc Init}
-} -returnCodes error -cleanup {
- safe::interpDelete $i
-} -result {wrong # args: should be "source ?-encoding E? fileName"}
+test safe-8.8 {safe source forbids -rsrc} emptyTest {
+ # Disabled this test. It was only useful for long unsupported
+ # Mac OS 9 systems. [Bug 860a9f1945]
+} {}
test safe-8.9 {safe source and return} -setup {
set returnScript [makeFile {return "ok"} return.tcl]
catch {safe::interpDelete $i}
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 0d6c664..cb98773 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -903,7 +903,7 @@ install-libraries: libraries
else true; \
fi; \
done;
- @for i in opt0.4 encoding ../tcl8 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6; \
+ @for i in opt0.4 encoding ../tcl8 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6 ../tcl8/8.7; \
do \
if [ ! -d "$(SCRIPT_INSTALL_DIR)"/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
diff --git a/unix/configure b/unix/configure
index bdbf809..6800261 100755
--- a/unix/configure
+++ b/unix/configure
@@ -6884,6 +6884,40 @@ $as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5
+$as_echo_n "checking for DIR64... " >&6; }
+if ${tcl_cv_DIR64+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <dirent.h>
+int
+main ()
+{
+struct dirent64 *p; DIR64 d = opendir64(".");
+ p = readdir64(d); rewinddir64(d); closedir64(d);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ tcl_cv_DIR64=yes
+else
+ tcl_cv_DIR64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5
+$as_echo "$tcl_cv_DIR64" >&6; }
+ if test "x${tcl_cv_DIR64}" = "xyes" ; then
+
+$as_echo "#define HAVE_DIR64 1" >>confdefs.h
+
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
$as_echo_n "checking for struct stat64... " >&6; }
if ${tcl_cv_struct_stat64+:} false; then :
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 2d2f190..d705480 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2413,7 +2413,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[
# Might define the following vars:
# TCL_WIDE_INT_IS_LONG
# TCL_WIDE_INT_TYPE
-# HAVE_STRUCT_DIRENT64
+# HAVE_STRUCT_DIRENT64, HAVE_DIR64
# HAVE_STRUCT_STAT64
# HAVE_TYPE_OFF64_T
#
@@ -2449,6 +2449,15 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
fi
+ AC_CACHE_CHECK([for DIR64], tcl_cv_DIR64,[
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <dirent.h>],[struct dirent64 *p; DIR64 d = opendir64(".");
+ p = readdir64(d); rewinddir64(d); closedir64(d);],
+ tcl_cv_DIR64=yes,tcl_cv_DIR64=no)])
+ if test "x${tcl_cv_DIR64}" = "xyes" ; then
+ AC_DEFINE(HAVE_DIR64, 1, [Is 'DIR64' in <sys/types.h>?])
+ fi
+
AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[
AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
],
diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in
index b9d0059..21c3bef 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -196,6 +196,9 @@
/* Is 'struct dirent64' in <sys/types.h>? */
#undef HAVE_STRUCT_DIRENT64
+/* Is 'DIR64' in <sys/types.h>? */
+#undef HAVE_DIR64
+
/* Define to 1 if the system has the type `struct in6_addr'. */
#undef HAVE_STRUCT_IN6_ADDR
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index e4277a3..a90b471 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -57,16 +57,19 @@
*/
#ifdef HAVE_STRUCT_DIRENT64
-typedef DIR64 TclDIR;
-typedef struct dirent64 Tcl_DirEntry;
+typedef struct dirent64 Tcl_DirEntry;
# define TclOSreaddir readdir64
+#else
+typedef struct dirent Tcl_DirEntry;
+# define TclOSreaddir readdir
+#endif
+#ifdef HAVE_DIR64
+typedef DIR64 TclDIR;
# define TclOSopendir opendir64
# define TclOSrewinddir rewinddir64
# define TclOSclosedir closedir64
#else
-typedef DIR TclDIR;
-typedef struct dirent Tcl_DirEntry;
-# define TclOSreaddir readdir
+typedef DIR TclDIR;
# define TclOSopendir opendir
# define TclOSrewinddir rewinddir
# define TclOSclosedir closedir
diff --git a/win/Makefile.in b/win/Makefile.in
index 37ce1a0..a7be485 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -770,7 +770,7 @@ install-libraries: libraries install-tzdata install-msgs
else true; \
fi; \
done;
- @for i in opt0.4 encoding ../tcl8 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6; \
+ @for i in opt0.4 encoding ../tcl8 ../tcl8/8.4 ../tcl8/8.4/platform ../tcl8/8.5 ../tcl8/8.6 ../tcl8/8.7; \
do \
if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \
echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \