From e2a8d6ca464ae7a8fefa63c1e95c9387cfdbd339 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 10 Jul 2012 11:03:23 +0000 Subject: * win/tclWinSock.c (InitializeHostName): Corrected logic that extracted the name of the computer from the gethostname call so that it would use the name on success, not failure. Also ensured that the buffer size is exactly that recommended by Microsoft. --- ChangeLog | 7 +++++++ win/tclWinSock.c | 16 ++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbf9e2e..1d3ba82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-07-10 Donal K. Fellows + + * win/tclWinSock.c (InitializeHostName): Corrected logic that + extracted the name of the computer from the gethostname call so that + it would use the name on success, not failure. Also ensured that the + buffer size is exactly that recommended by Microsoft. + 2012-07-05 Don Porter * unix/tclUnixPipe.c: [Bug 1189293] Make "<<" binary safe. diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 18afb01..63f166d 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -2431,22 +2431,18 @@ InitializeHostName( Tcl_DStringInit(&ds); if (TclpHasSockets(NULL) == TCL_OK) { /* - * Buffer length of 255 copied slavishly from previous version of - * this routine. Presumably there's a more "correct" macro value - * for a properly sized buffer for a gethostname() call. - * Maintainers are welcome to supply it. + * The buffer size of 256 is recommended by the MSDN page that + * documents gethostname() as being always adequate. */ Tcl_DString inDs; Tcl_DStringInit(&inDs); - Tcl_DStringSetLength(&inDs, 255); + Tcl_DStringSetLength(&inDs, 256); if (gethostname(Tcl_DStringValue(&inDs), - Tcl_DStringLength(&inDs)) == 0) { - Tcl_DStringSetLength(&ds, 0); - } else { - Tcl_ExternalToUtfDString(NULL, - Tcl_DStringValue(&inDs), -1, &ds); + Tcl_DStringLength(&inDs)) == 0) { + Tcl_ExternalToUtfDString(NULL, Tcl_DStringValue(&inDs), -1, + &ds); } Tcl_DStringFree(&inDs); } -- cgit v0.12 From f1d34c1b20365bb0c18dcd30218760ea2e65d66b Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 10 Jul 2012 18:21:33 +0000 Subject: Update changes, repair ChangeLog --- ChangeLog | 107 ++++++++++++++++++++++++++++++++------------------------------ changes | 72 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d3ba82..8b8e49a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -98,9 +98,9 @@ 2012-05-25 Jan Nijtmans - * win/tclWinDde.c: [Bug 473946]: special characters not correctly sent, - now for XTYP_EXECUTE as well as XTYP_REQUEST. - * win/Makefile.in: Fix "make genstubs" when cross-compiling on UNIX + * win/tclWinDde.c: [Bug 473946] special characters not correctly + * win/Makefile.in: sent, now for XTYP_EXECUTE as well as + XTYP_REQUEST. Fix "make genstubs" when cross-compiling on UNIX 2012-05-24 Jan Nijtmans @@ -149,22 +149,23 @@ 2012-05-13 Jan Nijtmans - * win/tclWinDde.c: Protect against receiving strings without ending \0, - as external applications (or Tcl with TIP #106) could generate that. + * win/tclWinDde.c: Protect against receiving strings without + ending \0, as external applications (or Tcl with TIP #106) could + generate that. 2012-05-10 Jan Nijtmans - * win/tclWinDde.c: [Bug 473946]: special characters not correctly sent - * library/dde/pkgIndex.tcl Increase version to 1.3.3 + * win/tclWinDde.c: [Bug 473946] special characters not + * library/dde/pkgIndex.tcl: correctly sent. Bump to 1.3.3 2012-05-02 Jan Nijtmans - * generic/configure.in: Better detection and implementation for cpuid - * generic/configure: instruction on Intel-derived processors, both - * generic/tclUnixCompat.c: 32-bit and 64-bit. - * generic/tclTest.c: Move cpuid testcase from win-specific to generic - * win/tclWinTest.c: tests, as it should work on all Intel-related - * tests/platform.test: platforms now + * generic/configure.in: Better detection and implementation for + * generic/configure: cpuid instruction on Intel-derived + * generic/tclUnixCompat.c: processors, both 32-bit and 64-bit. + * generic/tclTest.c: Move cpuid testcase from win-specific + * win/tclWinTest.c: to generic tests, as it should work on + * tests/platform.test: all Intel-related platforms now 2012-04-27 Jan Nijtmans @@ -188,10 +189,10 @@ 2012-04-24 Jan Nijtmans - * generic/tclInt.decls: [Bug 3508771] load tclreg.dll in cygwin tclsh - * generic/tclIntPlatDecls.h: Implement TclWinGetSockOpt, TclWinGetServByName - * generic/tclStubInit.c: and TclWinCPUID for Cygwin - * generic/tclUnixCompat.c: + * generic/tclInt.decls: [Bug 3508771] load tclreg.dll in cygwin + * generic/tclIntPlatDecls.h: tclsh Implement TclWinGetSockOpt, + * generic/tclStubInit.c: TclWinGetServByName and TclWinCPUID + * generic/tclUnixCompat.c: for Cygwin. * unix/configure.in: * unix/configure: * unix/tclUnixCompat.c: @@ -213,7 +214,7 @@ 2012-04-11 Jan Nijtmans - * win/tclWinInit.c: [Bug 3448512]: clock scan "1958-01-01" fails only + * win/tclWinInit.c: [Bug 3448512] [clock scan 1958-01-01] fails * win/tcl.m4: in debug compilation. * win/configure: * unix/tcl.m4: Use NDEBUG consistantly meaning: no debugging. @@ -221,25 +222,26 @@ 2012-04-04 Jan Nijtmans - * win/tclWinSock.c: [Bug 510001]: TclSockMinimumBuffers needs plat imp - * generic/tclIOSock.c: + * win/tclWinSock.c: [Bug 510001] TclSockMinimumBuffers needs + * generic/tclIOSock.c: platform implementation. * generic/tclInt.decls: * generic/tclIntDecls.h: * generic/tclStubInit.c: 2012-04-03 Jan Nijtmans - * generic/tclStubInit.c Remove the TclpGetTZName implementation for - * generic/tclIntDecls.h: Cygwin (from previous commit) , re-generated - * generic/tclIntPlatDecls.h: - * generic/tcl.decls: cleanup unnecessary "generic" argument + * generic/tclStubInit.c: Remove the TclpGetTZName implementation + * generic/tclIntDecls.h: for Cygwin (from previous commit) , + * generic/tclIntPlatDecls.h: re-generated + * generic/tcl.decls: cleanup unnecessary "generic" argument 2012-03-30 Jan Nijtmans - * generic/tclInt.decls: [Bug 3508771] load tclreg.dll in cygwin tclsh - * generic/tclIntPlatDecls.h: Implement TclWinGetTclInstance, TclpGetTZName, - * generic/tclStubInit.c: and various more win32-specific internal functions for - Cygwin, so win32 extensions using those can be loaded in the cygwin version of tclsh. + * generic/tclInt.decls: [Bug 3508771] load tclreg.dll in cygwin + * generic/tclIntPlatDecls.h: tclsh. Implement TclWinGetTclInstance, + * generic/tclStubInit.c: TclpGetTZName, and various more + win32-specific internal functions for Cygwin, so win32 extensions + using those can be loaded in the cygwin version of tclsh. 2012-03-30 Jan Nijtmans @@ -252,38 +254,40 @@ 2012-03-27 Jan Nijtmans - * generic/tcl.h: [Bug 3508771] Wrong Tcl_StatBuf used on MinGW - * generic/tclFCmd.c: [Bug 2015723] duplicate inodes from file stat on - windows (but now for cygwin as well) + * generic/tcl.h: [Bug 3508771] Wrong Tcl_StatBuf used on MinGW + * generic/tclFCmd.c: [Bug 2015723] duplicate inodes from file stat + on windows (but now for cygwin as well) 2012-03-25 Jan Nijtmans - * generic/tclInt.decls: [Bug 3508771] load tclreg.dll in cygwin tclsh - * generic/tclIntPlatDecls.h: Implement TclWinConvertError, TclWinConvertWSAError, - * generic/tclStubInit.c: and various more win32-specific internal functions for - * unix/Makefile.in: Cygwin, so win32 extensions using those can be - * unix/tcl.m4: loaded in the cygwin version of tclsh. - * unix/configure: - * win/tclWinError.c: + * generic/tclInt.decls: [Bug 3508771] load tclreg.dll in cygwin + * generic/tclIntPlatDecls.h: tclsh. Implement TclWinConvertError, + * generic/tclStubInit.c: TclWinConvertWSAError, and various more + * unix/Makefile.in: win32-specific internal functions for + * unix/tcl.m4: Cygwin, so win32 extensions using those + * unix/configure: can be loaded in the cygwin version + * win/tclWinError.c: of tclsh. 2012-03-23 Jan Nijtmans - * generic/tclInt.decls Revert some cygwin-related signature changes from - * generic/tclIntPlatDecls.h [835f8e1e9d] (2010-02-01). They were an attempt to - * win/tclWinError.c make the cygwin port compile again, but since cygwin - is based on unix this serves no purpose any more. - * unix/Makefile.in Add tclWinError.c to the CYGWIN build. - * unix/tcl.m4 - * unix/configure + * generic/tclInt.decls: Revert some cygwin-related signature + * generic/tclIntPlatDecls.h: changes from [835f8e1e9d] (2010-02-01). + * win/tclWinError.c: They were an attempt to make the cygwin + port compile again, but since cygwin is based on unix this serves no + purpose any more. + + * unix/Makefile.in: Add tclWinError.c to the CYGWIN build. + * unix/tcl.m4: + * unix/configure: 2012-03-20 Jan Nijtmans - * generic/tcl.decls: [Bug 3508771] load tclreg.dll in cygwin tclsh - * generic/tclInt.decls: Implement TclWinGetPlatformId, Tcl_WinUtfToTChar, - * generic/tclIntPlatDecls.h: Tcl_WinTCharToUtf (and a dummy TclWinCPUID) for - * generic/tclPlatDecls.h: Cygwin, so win32 extensions using those can be - * generic/tclStubInit.c: loaded in the cygwin version of tclsh. - * unix/tclUnixCompat.c: + * generic/tcl.decls: [Bug 3508771] load tclreg.dll in cygwin + * generic/tclInt.decls: tclsh. Implement TclWinGetPlatformId, + * generic/tclIntPlatDecls.h: Tcl_WinUtfToTChar, Tcl_WinTCharToUtf + * generic/tclPlatDecls.h: (and a dummy TclWinCPUID) for Cygwin, + * generic/tclStubInit.c: so win32 extensions using those can be + * unix/tclUnixCompat.c: loaded in the cygwin version of tclsh. 2012-03-19 Venkat Iyer @@ -505,7 +509,6 @@ * library/tcltest/tcltest.tcl: [Bug 967195]: Make tcltest work when tclsh is compiled without using the setargv() function on mingw. - (no need to incr the version, since 2.2.10 is never released) 2011-11-29 Jan Nijtmans diff --git a/changes b/changes index 0442b3a..e2d04d2 100644 --- a/changes +++ b/changes @@ -7581,3 +7581,75 @@ like "nano()" instead of parsing as "nan o()" with missing op (duquette,porter) 2011-10-15 tzdata updated to Olson's tzdata2011l (iyer) --- Released 8.5.11, November 4, 2011 --- See ChangeLog for details --- + +2011-11-22 (bug fix)[2935503] Win: [file mtime] sets wrong time (nijtmans) + +2011-11-30 (bug fix)[967195] Simply args passed to child processes (nijtmans) +=> tcltest 2.3.4 + +2011-12-07 (bug fix)[3444754] fix [string tolower \u01C5] (nijtmans) + +2011-12-11 (update)[3457031] Update [[:print:]] to Unicode 6.0 (nijtmans) + +2011-12-24 (bug fix)[3464428] fix [string is graph \u0120] (nijtmans) + +2012-01-08 (bug fix)[3470928] zoneinfo trouble with Windhoek data file (kenny) + +2012-01-13 (bug fix)[3472316] fix retrieval of socket error (fellows) +=> http 2.7.8 + +2012-01-21 (bug fix)[3475667] [regexp] buffer read overflow (sebres) + +2012-01-22 (bug fix)[3475264] [dict exists] return 0, not error (fellows) + +2012-01-26 (bug fix)[3475569,3479689] mem corrupt in fs path (sebres,porter) + +2012-02-02 (bug fix)[2974459,2879351,1951574,1852572,1661378,1613456] Fix +problems where [file *able] would return false results on Win/Samba (porter) + +2012-02-02 (update)[3464401] Support Unicode 6.1 (nijtmans) + +2012-02-06 (bug fix)[3484621] bump bytecode epoch on exec traces (kuhn,sofer) + +2012-02-09 (bug fix)[3484402] mem corrupt OBOE in unicode append (porter) + +2012-02-15 (bug fix)[3487626] crash compiling [dict for] (fellows) + +2012-02-17 (bug fix)[2233954] compile problem on AIX & Android (nijtmans) + +2012-02-29 (bug fix)[3466099] BOM in Unicode (nijtmans) + +2012-03-07 (bug fix)[3498327] RFC 3986 compliance (kupries) +=> http 2.7.9 + +2012-04-11 (bug fix)[3448512] [clock scan 1958-01-01] fail on Win (nijtmans) + +2012-04-18 tzdata updated to Olson's tzdata2012c (kenny) + +2012-05-02 (enhancement) Better use of Intel cpuid instruction (nijtmans) + +2012-05-10 (bug fix)[473946] correct send of special characters (nijtmans) +=> dde 1.3.3 + +2012-05-17 (bug fix)[2964715] fix [glob] in Safe Base (fellows) + +2012-05-17 (bug fix)[3106532] proper [switch -indexvar] values (fellows) + *** POTENTIAL INCOMPATIBILITY *** + +2012-06-21 (bug fix)[3362446] [registry keys] failure (nijtmans) +=> registry 1.2.2 + +2012-06-25 (bug fix)[3537605] [encoding dirs a b] error message (fellows) + +2012-06-25 (bug fix)[3024359] crash when multi-thread concurrent [file system] +and Tcl_FSMountsChanged(). (porter) + +2012-06-29 (bug fix)[3536888] fix locale guessing (oehlmann,nijtmans) +=> msgcat 1.4.5 + +2012-07-05 (bug fix)[1189293] make "<<" redirect binary safe (porter) + +Many revisions to better support a Cygwin environment (nijtmans) + +--- Released 8.5.12, July 16, 2011 --- See ChangeLog for details --- + -- cgit v0.12 From 024b92cb1e7bd2653beee2d010f1baf39010cacc Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 10 Jul 2012 18:28:48 +0000 Subject: [Bug 3541646] Don't panic on triggerPipe overrun --- ChangeLog | 4 ++++ unix/tclUnixNotfy.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b8e49a..704fd06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-07-10 Jan Nijtmans + + * unix/tclUnixNotfy.c: [Bug 3541646] Don't panic on triggerPipe overrun + 2012-07-10 Donal K. Fellows * win/tclWinSock.c (InitializeHostName): Corrected logic that diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 904c9db..42cc7be 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -340,7 +340,7 @@ Tcl_FinalizeNotifier( */ if (write(triggerPipe, "q", 1) != 1) { - Tcl_Panic("Tcl_FinalizeNotifier: unable to write q to triggerPipe"); + Tcl_Panic("Tcl_FinalizeNotifier: unable to write q to triggerPipe"); } close(triggerPipe); while(triggerPipe >= 0) { @@ -879,8 +879,8 @@ Tcl_WaitForEvent( waitingListPtr = tsdPtr; tsdPtr->onList = 1; - if (write(triggerPipe, "", 1) != 1) { - Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe"); + if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) { + Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe"); } } @@ -942,8 +942,8 @@ Tcl_WaitForEvent( } tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; tsdPtr->onList = 0; - if (write(triggerPipe, "", 1) != 1) { - Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe"); + if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) { + Tcl_Panic("Tcl_WaitForEvent: unable to write to triggerPipe"); } } -- cgit v0.12