summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-24 01:34:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-24 01:34:16 (GMT)
commita6b8152740ffe25d2be6a130a03abbedf558538b (patch)
tree12ac28ef35f83ddf346a66dacb686c2c58a86163
parent82914a2620307f81f9199eb2e9af70a11dc31ba4 (diff)
downloadtcl-a6b8152740ffe25d2be6a130a03abbedf558538b.zip
tcl-a6b8152740ffe25d2be6a130a03abbedf558538b.tar.gz
tcl-a6b8152740ffe25d2be6a130a03abbedf558538b.tar.bz2
Corrections to earlier TIP 27 changes.
Thanks to Andreas Kupries for the feedback.
-rw-r--r--ChangeLog7
-rw-r--r--win/tclWinFile.c19
-rw-r--r--win/tclWinPort.h4
-rw-r--r--win/tclWinSerial.c4
-rw-r--r--win/tclWinSock.c4
5 files changed, 23 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 4205d45..ff82fdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,13 @@
2002-01-23 Don Porter <dgp@users.sourceforge.net>
+ * win/tclWinFile.c (NativeAccess,NativeStat,NativeIsExec,
+ TclpGetUserHome):
+ * win/tclWinPort.h (TclWinSerialReopen):
+ * win/tclWinSerial.c (TclWinSerialReopen):
+ * win/tclWinSock.c (Tcl_OpenTcpServer): Corrections to earlier
+ TIP 27 changes. Thanks to Andreas Kupries for the feedback.
+
* doc/GetHostName.3:
* doc/GetOpnFl.3:
* doc/OpenTcp.3:
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 69229bc..c7db3fd 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.21 2002/01/18 14:17:06 dgp Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.22 2002/01/24 01:34:16 dgp Exp $
*/
#include "tclWinInt.h"
@@ -30,9 +30,9 @@ typedef NET_API_STATUS NET_API_FUNCTION NETAPIBUFFERFREEPROC
typedef NET_API_STATUS NET_API_FUNCTION NETGETDCNAMEPROC
(LPWSTR servername, LPWSTR domainname, LPBYTE *bufptr);
-static int NativeAccess(TCHAR *path, int mode);
-static int NativeStat(TCHAR *path, struct stat *statPtr);
-static int NativeIsExec(TCHAR *path);
+static int NativeAccess(CONST TCHAR *path, int mode);
+static int NativeStat(CONST TCHAR *path, struct stat *statPtr);
+static int NativeIsExec(CONST TCHAR *path);
/*
@@ -499,7 +499,6 @@ TclpGetUserHome(name, bufferPtr)
Tcl_DString ds;
int nameLen, badDomain;
char *domain;
- CONST WCHAR *wName;
WCHAR *wHomeDir, *wDomain;
WCHAR buf[MAX_PATH];
@@ -509,16 +508,18 @@ TclpGetUserHome(name, bufferPtr)
domain = strchr(name, '@');
if (domain != NULL) {
Tcl_DStringInit(&ds);
- wName = Tcl_UtfToUniCharDString(domain + 1, -1, &ds);
- badDomain = (*netGetDCNameProc)(NULL, wName,
+ Tcl_UtfToUniCharDString(domain + 1, -1, &ds);
+ badDomain = (*netGetDCNameProc)(NULL,
+ (LPWSTR) Tcl_DStringValue(&ds),
(LPBYTE *) &wDomain);
Tcl_DStringFree(&ds);
nameLen = domain - name;
}
if (badDomain == 0) {
Tcl_DStringInit(&ds);
- wName = Tcl_UtfToUniCharDString(name, nameLen, &ds);
- if ((*netUserGetInfoProc)(wDomain, wName, 1,
+ Tcl_UtfToUniCharDString(name, nameLen, &ds);
+ if ((*netUserGetInfoProc)(wDomain,
+ (LPWSTR) Tcl_DStringValue(&ds), 1,
(LPBYTE *) &uiPtr) == 0) {
wHomeDir = uiPtr->usri1_home_dir;
if ((wHomeDir != NULL) && (wHomeDir[0] != L'\0')) {
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index e00709b..f27413e 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPort.h,v 1.24 2001/10/15 17:34:53 hobbs Exp $
+ * RCS: @(#) $Id: tclWinPort.h,v 1.25 2002/01/24 01:34:16 dgp Exp $
*/
#ifndef _TCLWINPORT
@@ -436,7 +436,7 @@
*/
EXTERN HANDLE TclWinSerialReopen _ANSI_ARGS_(( HANDLE handle,
- char *name, DWORD access));
+ CONST TCHAR *name, DWORD access));
EXTERN Tcl_Channel TclWinOpenSerialChannel _ANSI_ARGS_((HANDLE handle,
char *channelName, int permissions));
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index 5d22b9e..4fa856a 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -11,7 +11,7 @@
*
* Serial functionality implemented by Rolf.Schroedter@dlr.de
*
- * RCS: @(#) $Id: tclWinSerial.c,v 1.18 2002/01/15 17:55:31 dgp Exp $
+ * RCS: @(#) $Id: tclWinSerial.c,v 1.19 2002/01/24 01:34:16 dgp Exp $
*/
#include "tclWinInt.h"
@@ -1327,7 +1327,7 @@ SerialWriterThread(LPVOID arg)
HANDLE
TclWinSerialReopen(handle, name, access)
HANDLE handle;
- char *name;
+ CONST TCHAR *name;
DWORD access;
{
ThreadSpecificData *tsdPtr;
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 6b67271..9fd3034 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.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: tclWinSock.c,v 1.24 2002/01/23 20:46:01 dgp Exp $
+ * RCS: @(#) $Id: tclWinSock.c,v 1.25 2002/01/24 01:34:16 dgp Exp $
*/
#include "tclWinInt.h"
@@ -1471,7 +1471,7 @@ Tcl_OpenTcpServer(interp, port, host, acceptProc, acceptProcData)
Tcl_Interp *interp; /* For error reporting - may be
* NULL. */
int port; /* Port number to open. */
- COSNT char *host; /* Name of local host. */
+ CONST char *host; /* Name of local host. */
Tcl_TcpAcceptProc *acceptProc; /* Callback for accepting connections
* from new clients. */
ClientData acceptProcData; /* Data for the callback. */