summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-12-28 13:53:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-12-28 13:53:40 (GMT)
commit28c061614a5610548f9c14ac2b02a06260223f3c (patch)
tree9c91a854f863f5c7082c60168418c2fc5a9410ed /generic/tclTest.c
parent016e636e5322d845b59bb6ecd6754894b9a98aec (diff)
downloadtcl-28c061614a5610548f9c14ac2b02a06260223f3c.zip
tcl-28c061614a5610548f9c14ac2b02a06260223f3c.tar.gz
tcl-28c061614a5610548f9c14ac2b02a06260223f3c.tar.bz2
[Bug 942170]: Detect the st_blocks field of 'struct stat' correctly.
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 1da98b8..f92c0cd 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -14,7 +14,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.114.2.3 2009/12/12 19:46:32 dkf Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.114.2.4 2009/12/28 13:53:40 dkf Exp $
*/
#define TCL_TEST
@@ -5101,7 +5101,7 @@ PretendTclpStat(
*/
if (OUT_OF_URANGE(realBuf.st_ino) || OUT_OF_RANGE(realBuf.st_size)
-# ifdef HAVE_ST_BLOCKS
+# ifdef HAVE_STRUCT_STAT_ST_BLOCKS
|| OUT_OF_RANGE(realBuf.st_blocks)
# endif
) {
@@ -5139,8 +5139,10 @@ PretendTclpStat(
buf->st_atime = realBuf.st_atime;
buf->st_mtime = realBuf.st_mtime;
buf->st_ctime = realBuf.st_ctime;
-# ifdef HAVE_ST_BLOCKS
+# ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
buf->st_blksize = realBuf.st_blksize;
+# endif
+# ifdef HAVE_STRUCT_STAT_ST_BLOCKS
buf->st_blocks = (blkcnt_t) realBuf.st_blocks;
# endif
}