diff options
author | das <das> | 2002-04-08 09:02:00 (GMT) |
---|---|---|
committer | das <das> | 2002-04-08 09:02:00 (GMT) |
commit | 0a15882ec2062a8b32ec855925a73e5644108f40 (patch) | |
tree | 862099671ae61cb7366e579a4a370691d8ae40fc /mac/tclMacSock.c | |
parent | 99e8896f2e7f6cdf266ea20b486a1587ba574dba (diff) | |
download | tcl-0a15882ec2062a8b32ec855925a73e5644108f40.zip tcl-0a15882ec2062a8b32ec855925a73e5644108f40.tar.gz tcl-0a15882ec2062a8b32ec855925a73e5644108f40.tar.bz2 |
2002-04-08 Daniel Steffen <das@users.sourceforge.net>
* generic/tcl.h: no <sys/types.h> on mac.
* mac/tclMacFile.c: minor fixes to Vince's changes from 03-24.
* mac/tclMacOSA.c:
* mac/tclMacResource.c: added missing Tcl_UtfToExternalDString
conversions of resource file names.
* mac/tclMacSock.c (TcpGetOptionProc): fixed bug introduced
by Andreas on 02-25; changed strcmp's to strncmp's so that
option comparison behaves like on other platforms.
* mac/tcltkMacBuildSupport.sea.hqx (CW Pro6 changes): added
support to allow Tk to hookup C library stderr/stdout to TkConsole.
* tests/basic.test:
* tests/cmdAH.test:
* tests/encoding.test:
* tests/fileSystem.test:
* tests/ioCmd.test: fixed tests failing on mac: check for
existence of [exec], changed some result strings.
Diffstat (limited to 'mac/tclMacSock.c')
-rw-r--r-- | mac/tclMacSock.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/mac/tclMacSock.c b/mac/tclMacSock.c index f3cdaf4..f272f87 100644 --- a/mac/tclMacSock.c +++ b/mac/tclMacSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacSock.c,v 1.13 2002/02/26 02:49:50 andreas_kupries Exp $ + * RCS: @(#) $Id: tclMacSock.c,v 1.14 2002/04/08 09:03:17 das Exp $ */ #include "tclInt.h" @@ -1361,6 +1361,7 @@ TcpGetOptionProc( Tcl_DString dString; TCPiopb statusPB; int errorCode; + size_t len = 0; /* * If an asynchronous connect is in progress, attempt to wait for it @@ -1388,11 +1389,12 @@ TcpGetOptionProc( if (optionName == (CONST char *) NULL || optionName[0] == '\0') { doAll = true; } else { - if (!strcmp(optionName, "-peername")) { + len = strlen(optionName); + if (!strncmp(optionName, "-peername", len)) { doPeerName = true; - } else if (!strcmp(optionName, "-sockname")) { + } else if (!strncmp(optionName, "-sockname", len)) { doSockName = true; - } else if (!strcmp(optionName, "-error")) { + } else if (!strncmp(optionName, "-error", len)) { /* SF Bug #483575 */ doError = true; } else { @@ -1417,7 +1419,7 @@ TcpGetOptionProc( Tcl_DStringAppendElement(dsPtr, "-error"); Tcl_DStringAppendElement(dsPtr, ""); } else { - Tcl_DStringAppend (dsPtr, ""); + Tcl_DStringAppend (dsPtr, "", -1); return TCL_OK; } } |