diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-08-31 10:41:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-08-31 10:41:22 (GMT) |
commit | d798be3eaf55726dfd1259cb8f285cecff5ad39c (patch) | |
tree | c00c8e4ed596c500e03ca46811d7fe010bbc8916 | |
parent | 4e778d0112fb867161ef4b24103c493e73ce757b (diff) | |
parent | 573f9fd80810dede88587f8ec61fb5cbb4a100b8 (diff) | |
download | tcl-d798be3eaf55726dfd1259cb8f285cecff5ad39c.zip tcl-d798be3eaf55726dfd1259cb8f285cecff5ad39c.tar.gz tcl-d798be3eaf55726dfd1259cb8f285cecff5ad39c.tar.bz2 |
Merge trunk.
Add Gustaf's latest fix for unit-tests.
-rw-r--r-- | doc/library.n | 20 | ||||
-rw-r--r-- | generic/tclDisassemble.c | 8 | ||||
-rw-r--r-- | generic/tclEncoding.c | 17 | ||||
-rw-r--r-- | unix/tclUnixNotfy.c | 13 | ||||
-rwxr-xr-x | win/configure | 20 | ||||
-rw-r--r-- | win/tcl.m4 | 20 |
6 files changed, 81 insertions, 17 deletions
diff --git a/doc/library.n b/doc/library.n index 775b7d9..6f8f265 100644 --- a/doc/library.n +++ b/doc/library.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH library n "8.0" Tcl "Tcl Built-In Commands" .so man.macros .BS @@ -19,7 +19,7 @@ auto_execok, auto_import, auto_load, auto_mkindex, auto_qualify, auto_reset, tcl \fBauto_qualify \fIcommand namespace\fR \fBauto_reset\fR \fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR -\fBparray \fIarrayName\fR +\fBparray \fIarrayName\fR ?\fIpattern\fR? \fBtcl_endOfWord \fIstr start\fR \fBtcl_startOfNextWord \fIstr start\fR \fBtcl_startOfPreviousWord \fIstr start\fR @@ -139,7 +139,7 @@ as its first characters then it is assumed to be a procedure definition and the next word of the line is taken as the procedure's name. Procedure definitions that do not appear in this way (e.g.\ they -have spaces before the \fBproc\fR) will not be indexed. If your +have spaces before the \fBproc\fR) will not be indexed. If your script contains .QW dangerous code, such as global initialization @@ -178,7 +178,7 @@ performing the actual auto-loading of functions at runtime. This is a standard search procedure for use by extensions during their initialization. They call this procedure to look for their script library in several standard directories. -The last component of the name of the library directory is +The last component of the name of the library directory is normally \fIbasenameversion\fR (e.g., tk8.0), but it might be .QW library @@ -196,9 +196,11 @@ bin or bin/\fIarch\fR directory; relative to the executable file in the current build tree; relative to the executable file in a parallel build tree. .TP -\fBparray \fIarrayName\fR -Prints on standard output the names and values of all the elements -in the array \fIarrayName\fR. +\fBparray \fIarrayName\fR ?\fIpattern\fR? +Prints on standard output the names and values of all the elements in the +array \fIarrayName\fR, or just the names that match \fIpattern\fR (using the +matching rules of \fBstring match\fR) and their values if \fIpattern\fR is +given. \fIArrayName\fR must be an array accessible to the caller of \fBparray\fR. It may be either local or global. .TP @@ -283,7 +285,7 @@ a default value is used. .TP \fBenv(TCLLIBPATH)\fR If set, then it must contain a valid Tcl list giving directories to -search during auto-load operations. Directories must be specified in +search during auto-load operations. Directories must be specified in Tcl format, using .QW / as the path separator, regardless of platform. @@ -312,7 +314,7 @@ Unix, words are comprised of numbers, letters or underscores. .SH "SEE ALSO" env(n), info(n), re_syntax(n) .SH KEYWORDS -auto-exec, auto-load, library, unknown, word, whitespace +auto-exec, auto-load, library, unknown, word, whitespace '\"Local Variables: '\"mode: nroff '\"End: diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 0a325b3..15502e7 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -794,6 +794,7 @@ PrintSourceToObj( { register const char *p; register int i = 0, len; + Tcl_UniChar ch = 0; if (stringPtr == NULL) { Tcl_AppendToObj(appendObj, "\"\"", -1); @@ -803,7 +804,6 @@ PrintSourceToObj( Tcl_AppendToObj(appendObj, "\"", -1); p = stringPtr; for (; (*p != '\0') && (i < maxChars); p+=len) { - Tcl_UniChar ch; len = TclUtfToUniChar(p, &ch); switch (ch) { @@ -832,6 +832,12 @@ PrintSourceToObj( i += 2; continue; default: +#if TCL_UTF_MAX > 4 + if ((int) ch > 0xffff) { + Tcl_AppendPrintfToObj(appendObj, "\\U%08x", (int) ch); + i += 10; + } else +#endif if (ch < 0x20 || ch >= 0x7f) { Tcl_AppendPrintfToObj(appendObj, "\\u%04x", ch); i += 6; diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index a7ef199..4ae017d 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2525,22 +2525,35 @@ UtfToUnicodeProc( if (dst > dstEnd) { result = TCL_CONVERT_NOSPACE; break; - } + } src += TclUtfToUniChar(src, &ch); /* * Need to handle this in a way that won't cause misalignment by * casting dst to a Tcl_UniChar. [Bug 1122671] - * XXX: This hard-codes the assumed size of Tcl_UniChar as 2. */ #ifdef WORDS_BIGENDIAN +#if TCL_UTF_MAX > 4 + *dst++ = (ch >> 24); + *dst++ = ((ch >> 16) & 0xFF); + *dst++ = ((ch >> 8) & 0xFF); + *dst++ = (ch & 0xFF); +#else *dst++ = (ch >> 8); *dst++ = (ch & 0xFF); +#endif +#else +#if TCL_UTF_MAX > 4 + *dst++ = (ch & 0xFF); + *dst++ = ((ch >> 8) & 0xFF); + *dst++ = ((ch >> 16) & 0xFF); + *dst++ = (ch >> 24); #else *dst++ = (ch & 0xFF); *dst++ = (ch >> 8); #endif +#endif } *srcReadPtr = src - srcStart; *dstWrotePtr = dst - dstStart; diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 0493ee4..693eeac 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -1032,7 +1032,18 @@ Tcl_WaitForEvent( pthread_mutex_lock(¬ifierMutex); } #else - pthread_cond_wait(&tsdPtr->waitCV, ¬ifierMutex); + if (timePtr != NULL) { + Tcl_Time now; + struct timespec ptime; + + Tcl_GetTime(&now); + ptime.tv_sec = timePtr->sec + now.sec + (timePtr->usec + now.usec) / 1000000; + ptime.tv_nsec = 1000 * ((timePtr->usec + now.usec) % 1000000); + + pthread_cond_timedwait(&tsdPtr->waitCV, ¬ifierMutex, &ptime); + } else { + pthread_cond_wait(&tsdPtr->waitCV, ¬ifierMutex); + } #endif /* __CYGWIN__ */ } tsdPtr->eventReady = 0; diff --git a/win/configure b/win/configure index 2401002..cc2eb9b 100755 --- a/win/configure +++ b/win/configure @@ -3757,6 +3757,13 @@ echo "${ECHO_T}using shared flags" >&6 # Add SHLIB_LD_LIBS to the Make rule, not here. LIBRARIES="\${SHARED_LIBRARIES}" EXESUFFIX="\${DBGX}.exe" + case "x`echo \${VisualStudioVersion}`" in + x14*) + lflags="${lflags} -nodefaultlib:libucrt.lib" + ;; + *) + ;; + esac fi MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" # DLLSUFFIX is separate because it is the building block for @@ -3797,6 +3804,15 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6 fi LIBS="netapi32.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib" + + case "x`echo \${VisualStudioVersion}`" in + x14*) + LIBS="$LIBS ucrt.lib" + ;; + *) + ;; + esac + if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the @@ -3871,7 +3887,7 @@ fi CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" - lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" # Avoid 'unresolved external symbol __security_cookie' errors. # c.f. http://support.microsoft.com/?id=894573 @@ -3883,7 +3899,7 @@ fi CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" - lflags="-nologo" + lflags="${lflags} -nologo" LINKBIN="link" fi @@ -791,6 +791,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # Add SHLIB_LD_LIBS to the Make rule, not here. LIBRARIES="\${SHARED_LIBRARIES}" EXESUFFIX="\${DBGX}.exe" + case "x`echo \${VisualStudioVersion}`" in + x14*) + lflags="${lflags} -nodefaultlib:libucrt.lib" + ;; + *) + ;; + esac fi MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" # DLLSUFFIX is separate because it is the building block for @@ -828,6 +835,15 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi LIBS="netapi32.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib" + + case "x`echo \${VisualStudioVersion}`" in + x14*) + LIBS="$LIBS ucrt.lib" + ;; + *) + ;; + esac + if test "$do64bit" != "no" ; then # The space-based-path will work for the Makefile, but will # not work if AC_TRY_COMPILE is called. TEA has the @@ -842,7 +858,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" # Do not use -O2 for Win64 - this has proved buggy in code gen. CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}" - lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" + lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\"" LINKBIN="\"${PATH64}/link.exe\"" # Avoid 'unresolved external symbol __security_cookie' errors. # c.f. http://support.microsoft.com/?id=894573 @@ -854,7 +870,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" - lflags="-nologo" + lflags="${lflags} -nologo" LINKBIN="link" fi |