diff options
author | Kevin B Kenny <kennykb@acm.org> | 2010-09-22 01:08:49 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2010-09-22 01:08:49 (GMT) |
commit | b915b5fe069f09a9bd7dec58b31623b29133be2f (patch) | |
tree | 6a13b2ab5f2e5e8d8efdb0e725da6876b66445ad /win | |
parent | 53ebe37f0445f1a132bd20729d41894c6470622a (diff) | |
download | tcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.zip tcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.tar.gz tcl-b915b5fe069f09a9bd7dec58b31623b29133be2f.tar.bz2 |
merge changes from HEAD
Diffstat (limited to 'win')
-rwxr-xr-x | win/configure | 2 | ||||
-rw-r--r-- | win/tcl.m4 | 2 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 20 | ||||
-rw-r--r-- | win/tclWinFile.c | 5 | ||||
-rw-r--r-- | win/tclWinPipe.c | 6 |
5 files changed, 14 insertions, 21 deletions
diff --git a/win/configure b/win/configure index 6715c57..fefa99b 100755 --- a/win/configure +++ b/win/configure @@ -3985,7 +3985,7 @@ echo "$as_me: error: ${CC} does not support the -shared option. CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall" + CFLAGS_WARNING="-Wall -Wdeclaration-after-statement" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= @@ -535,7 +535,7 @@ file for information about building with Mingw.]) CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall" + CFLAGS_WARNING="-Wall -Wdeclaration-after-statement" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index fe89976..310a37f 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,17 +9,9 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.67 2010/09/20 14:28:15 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.67.2.1 2010/09/22 01:08:49 kennykb Exp $ */ -/* TODO: This file does not compile in UNICODE mode. - * See [Freq 2965056]: Windows build with -DUNICODE - * and - * [Bug 3069278]: breakage on head Windows triggered by install-tzdata - */ -#undef UNICODE -#undef _UNICODE - #include "tclWinInt.h" /* @@ -339,8 +331,8 @@ DoRenameFile( TCHAR *nativeSrcRest, *nativeDstRest; const char **srcArgv, **dstArgv; int size, srcArgc, dstArgc; - TCHAR nativeSrcPath[MAX_PATH * 2]; - TCHAR nativeDstPath[MAX_PATH * 2]; + TCHAR nativeSrcPath[MAX_PATH]; + TCHAR nativeDstPath[MAX_PATH]; Tcl_DString srcString, dstString; const char *src, *dst; @@ -476,7 +468,7 @@ DoRenameFile( TCHAR *nativeRest, *nativeTmp, *nativePrefix; int result, size; - TCHAR tempBuf[MAX_PATH * 2]; + TCHAR tempBuf[MAX_PATH]; size = tclWinProcs->getFullPathNameProc(nativeDst, MAX_PATH, tempBuf, &nativeRest); @@ -484,7 +476,7 @@ DoRenameFile( return TCL_ERROR; } nativeTmp = (TCHAR *) tempBuf; - nativeRest[0] = '\0'; + nativeRest[0] = L'\0'; result = TCL_ERROR; nativePrefix = (TCHAR *) L"tclr"; @@ -1304,7 +1296,7 @@ TraverseWinTree( goto end; } - nativeSource[oldSourceLen + 1] = '\0'; + Tcl_DStringSetLength(sourcePtr, oldSourceLen + 1); Tcl_DStringSetLength(sourcePtr, oldSourceLen); result = traverseProc(nativeSource, nativeTarget, DOTREE_PRED, errorPtr); diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 98c9fc2..bd98a1a 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.112 2010/09/20 14:28:13 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.112.2.1 2010/09/22 01:08:49 kennykb Exp $ */ #include "tclWinInt.h" @@ -1885,6 +1885,7 @@ TclpGetCwd( { TCHAR buffer[MAX_PATH]; char *p; + WCHAR *native; if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) { TclWinConvertError(GetLastError()); @@ -1899,7 +1900,7 @@ TclpGetCwd( * Watch for the weird Windows c:\\UNC syntax. */ - WCHAR *native = (WCHAR *) buffer; + native = (WCHAR *) buffer; if ((native[0] != '\0') && (native[1] == ':') && (native[2] == '\\') && (native[3] == '\\')) { native += 2; diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index a41898d..84b18b6 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.83 2010/09/20 14:28:15 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.83.2.1 2010/09/22 01:08:49 kennykb Exp $ */ #include "tclWinInt.h" @@ -3133,8 +3133,8 @@ TclpOpenTemporaryFile( sprintf(number, "%d.TMP", counter); counter = (unsigned short) (counter + 1); tclWinProcs->utf2tchar(number, strlen(number), &buf); - memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); - *(WCHAR *)(namePtr + Tcl_DStringLength(&buf) + 1) = '\0'; + Tcl_DStringSetLength(&buf, Tcl_DStringLength(&buf) + 1); + memcpy(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf) + 1); Tcl_DStringFree(&buf); handle = tclWinProcs->createFileProc((TCHAR *) name, |