summaryrefslogtreecommitdiffstats
path: root/src/H5win32defs.h
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-10-30 16:11:21 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-10-30 16:11:21 (GMT)
commitb3e7158c549fd5c4599d9530faba10a6a101f14d (patch)
treeb47830c7183f7421fb75be68ce05ae18dea8ab24 /src/H5win32defs.h
parent37bff127f51a87f3b1262243e32ce977f1d8532f (diff)
downloadhdf5-b3e7158c549fd5c4599d9530faba10a6a101f14d.zip
hdf5-b3e7158c549fd5c4599d9530faba10a6a101f14d.tar.gz
hdf5-b3e7158c549fd5c4599d9530faba10a6a101f14d.tar.bz2
[svn-r15996] Added a definition of HDftruncate for windows to compile with VC6 and later versions
Tested: windows
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r--src/H5win32defs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 2f947c1..41e2edd 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -33,7 +33,13 @@ typedef __int64 h5_stat_size_t;
#define HDdup(F) _dup(F)
#define HDfdopen(N,S) _fdopen(N,S)
#define HDfileno(F) _fileno(F)
+
+#if _MSC_VER > 1200
#define HDftruncate(F,L) _chsize_s(F,L)
+#else
+#define HDftruncate(F,L) chsize(F,L)
+#endif
+
#define HDfstat(F,B) _fstati64(F,B)
#define HDisatty(F) _isatty(F)
#define HDstat(S,B) _stati64(S,B)