summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2001-09-10 17:17:41 (GMT)
committerandreas_kupries <akupries@shaw.ca>2001-09-10 17:17:41 (GMT)
commit4b150f866b9cf91bb9974d7cd40a817c428d019e (patch)
tree192e2e551b9ccd4719de44b72ee348205dd2df89
parent4d5d85ec3b978a2fdd3c1beb1107725a3df66803 (diff)
downloadtcl-4b150f866b9cf91bb9974d7cd40a817c428d019e.zip
tcl-4b150f866b9cf91bb9974d7cd40a817c428d019e.tar.gz
tcl-4b150f866b9cf91bb9974d7cd40a817c428d019e.tar.bz2
* generic/tclInt.decls: Also added 'TclWinFlushDirtyChannels' to
the internal platform specific stub table. * win/tclWinFile.c (TclpObjStat): Now added the call to 'TclWinFlushDirtyChannels' to this function. I don't know where my head was last thursday (2001-09-06), but the call was actually added to 'TclpObjChdir', i.e. the implementation of [cd]. Corrected this now. Thanks to Vince Darley for spotting this.
-rw-r--r--ChangeLog12
-rw-r--r--generic/tclInt.decls8
-rw-r--r--generic/tclIntPlatDecls.h9
-rw-r--r--generic/tclStubInit.c3
-rw-r--r--win/tclWinFile.c18
-rw-r--r--win/tclWinInt.h4
6 files changed, 39 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c4d442..c17d445 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-09-10 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * generic/tclInt.decls: Also added 'TclWinFlushDirtyChannels' to
+ the internal platform specific stub table.
+
+ * win/tclWinFile.c (TclpObjStat): Now added the call to
+ 'TclWinFlushDirtyChannels' to this function. I don't know where
+ my head was last thursday (2001-09-06), but the call was
+ actually added to 'TclpObjChdir', i.e. the implementation of
+ [cd]. Corrected this now. Thanks to Vince Darley for spotting
+ this.
+
2001-09-10 Miguel Sofer <msofer@users.sourceforge.net>
* generic/tclProc.c:
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 7b1dac5..ef88533 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -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: tclInt.decls,v 1.30 2001/08/30 08:53:14 vincentdarley Exp $
+# RCS: @(#) $Id: tclInt.decls,v 1.31 2001/09/10 17:17:41 andreas_kupries Exp $
library tcl
@@ -840,6 +840,12 @@ declare 26 win {
void TclWinSetInterfaces(int wide)
}
+# Added in Tcl 8.3.3 / 8.4
+
+declare 27 win {
+ void TclWinFlushDirtyChannels (void)
+}
+
#########################
# Unix specific internals
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 8c690c8..a81803b 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.11 2001/06/17 03:48:19 dgp Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.12 2001/09/10 17:17:41 andreas_kupries Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -127,6 +127,8 @@ EXTERN char * TclWinNoBackslash _ANSI_ARGS_((char * path));
EXTERN TclPlatformType * TclWinGetPlatform _ANSI_ARGS_((void));
/* 26 */
EXTERN void TclWinSetInterfaces _ANSI_ARGS_((int wide));
+/* 27 */
+EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void));
#endif /* __WIN32__ */
#ifdef MAC_TCL
/* 0 */
@@ -240,6 +242,7 @@ typedef struct TclIntPlatStubs {
char * (*tclWinNoBackslash) _ANSI_ARGS_((char * path)); /* 24 */
TclPlatformType * (*tclWinGetPlatform) _ANSI_ARGS_((void)); /* 25 */
void (*tclWinSetInterfaces) _ANSI_ARGS_((int wide)); /* 26 */
+ void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */
#endif /* __WIN32__ */
#ifdef MAC_TCL
VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin)); /* 0 */
@@ -418,6 +421,10 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
#define TclWinSetInterfaces \
(tclIntPlatStubsPtr->tclWinSetInterfaces) /* 26 */
#endif
+#ifndef TclWinFlushDirtyChannels
+#define TclWinFlushDirtyChannels \
+ (tclIntPlatStubsPtr->tclWinFlushDirtyChannels) /* 27 */
+#endif
#endif /* __WIN32__ */
#ifdef MAC_TCL
#ifndef TclpSysAlloc
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index f216358..900979a 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.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: tclStubInit.c,v 1.59 2001/09/06 17:51:00 vincentdarley Exp $
+ * RCS: @(#) $Id: tclStubInit.c,v 1.60 2001/09/10 17:17:41 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -288,6 +288,7 @@ TclIntPlatStubs tclIntPlatStubs = {
TclWinNoBackslash, /* 24 */
TclWinGetPlatform, /* 25 */
TclWinSetInterfaces, /* 26 */
+ TclWinFlushDirtyChannels, /* 27 */
#endif /* __WIN32__ */
#ifdef MAC_TCL
TclpSysAlloc, /* 0 */
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 1c8a300..1cce9fd 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.14 2001/09/07 17:08:50 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.15 2001/09/10 17:17:41 andreas_kupries Exp $
*/
#include "tclWinInt.h"
@@ -694,14 +694,6 @@ TclpObjChdir(pathPtr)
int result;
TCHAR *nativePath;
- /*
- * Ensure correct file sizes by forcing the OS to write any
- * pending data to disk. This is done only for channels which are
- * dirty, i.e. have been written to since the last flush here.
- */
-
- TclWinFlushDirtyChannels ();
-
nativePath = (TCHAR *) Tcl_FSGetNativePath(pathPtr);
result = (*tclWinProcs->setCurrentDirectoryProc)(nativePath);
@@ -850,6 +842,14 @@ TclpObjStat(pathPtr, statPtr)
return -1;
}
+ /*
+ * Ensure correct file sizes by forcing the OS to write any
+ * pending data to disk. This is done only for channels which are
+ * dirty, i.e. have been written to since the last flush here.
+ */
+
+ TclWinFlushDirtyChannels ();
+
return NativeStat((TCHAR*) Tcl_FSGetNativePath(pathPtr), statPtr);
}
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 364f195..287ecb3 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -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: tclWinInt.h,v 1.10 2001/09/07 17:08:50 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclWinInt.h,v 1.11 2001/09/10 17:17:42 andreas_kupries Exp $
*/
#ifndef _TCLWININT
@@ -100,8 +100,6 @@ EXTERN TclWinProcs *tclWinProcs;
EXTERN void TclWinInit(HINSTANCE hInst);
-EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void));
-
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT