summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-02-16 16:01:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-02-16 16:01:32 (GMT)
commitc0764272261c0f8e727f1c2a5e1d1acff40454f3 (patch)
treef87e69815fc9cbbdae4123c2ed8a23e6d5e4a890 /generic
parent85d00a55b79e0beebaf4875584cf7391abd05392 (diff)
downloadtcl-c0764272261c0f8e727f1c2a5e1d1acff40454f3.zip
tcl-c0764272261c0f8e727f1c2a5e1d1acff40454f3.tar.gz
tcl-c0764272261c0f8e727f1c2a5e1d1acff40454f3.tar.bz2
Do not assume that all unix systems have the POSIX blkcnt_t type, since OpenBSD
apparently does not.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIOUtil.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index a077bab..905b8ca 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.166 2009/12/28 12:55:48 dkf Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.167 2010/02/16 16:01:33 dkf Exp $
*/
#include "tclInt.h"
@@ -292,7 +292,11 @@ Tcl_Stat(
oldStyleBuf->st_blksize = buf.st_blksize;
#endif
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
+#ifdef HAVE_BLKCNT_T
oldStyleBuf->st_blocks = (blkcnt_t) buf.st_blocks;
+#else
+ oldStyleBuf->st_blocks = (unsigned long) buf.st_blocks;
+#endif
#endif
}
return ret;