summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2002-02-15 23:42:12 (GMT)
committerKevin B Kenny <kennykb@acm.org>2002-02-15 23:42:12 (GMT)
commitb5e9e40d2f0d57b15ea03e954e1c2085b9874fed (patch)
tree87a231b742d00bcbf481e3439acb70032c612370 /generic/tclTest.c
parent097b4b7f2e14a0d47f82c9d8b7579bee651660b4 (diff)
downloadtcl-b5e9e40d2f0d57b15ea03e954e1c2085b9874fed.zip
tcl-b5e9e40d2f0d57b15ea03e954e1c2085b9874fed.tar.gz
tcl-b5e9e40d2f0d57b15ea03e954e1c2085b9874fed.tar.bz2
Further changes to the TIP 72 patch to make it compile under VC++
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 7da18fd..4c34d31 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.44 2002/02/15 14:28:49 dkf Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.45 2002/02/15 23:42:12 kennykb Exp $
*/
#define TCL_TEST
@@ -4347,8 +4347,19 @@ static int PretendTclpStat(path, buf)
*/
if (OUT_OF_URANGE(realBuf.st_ino) || OUT_OF_RANGE(realBuf.st_size)
- || OUT_OF_RANGE(realBuf.st_blocks)) {
+# ifdef HAVE_ST_BLOCKS
+ || OUT_OF_RANGE(realBuf.st_blocks)
+# endif
+ ) {
+# ifdef EOVERFLOW
errno = EOVERFLOW;
+# else
+# ifdef EFBIG
+ errno = EFBIG;
+# else
+# error "what error should be returned for a value out of range?"
+# endif
+# endif
return -1;
}
@@ -4374,8 +4385,10 @@ static int PretendTclpStat(path, buf)
buf->st_atime = realBuf.st_atime;
buf->st_mtime = realBuf.st_mtime;
buf->st_ctime = realBuf.st_ctime;
+# ifdef HAVE_ST_BLOCKS
buf->st_blksize = realBuf.st_blksize;
buf->st_blocks = (blkcnt_t) realBuf.st_blocks;
+# endif
}
return ret;
#endif /* TCL_WIDE_INT_IS_LONG */