summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-11-03 14:39:02 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-11-03 14:39:02 (GMT)
commitd2980de247abb12e0e75a0ce71dd2a95048d1a19 (patch)
tree760e3eb6e1162f352075463aaff58afeefbb7ec2
parent019c82760e8f43492dbc98058d9e38884abfd343 (diff)
downloadhdf5-d2980de247abb12e0e75a0ce71dd2a95048d1a19.zip
hdf5-d2980de247abb12e0e75a0ce71dd2a95048d1a19.tar.gz
hdf5-d2980de247abb12e0e75a0ce71dd2a95048d1a19.tar.bz2
[svn-r16019] Purpose: Fix Windows definition of H5ftruncate for VS.NET
Description: On Windows/Visual Studio, there is no function ftruncate. As a result, we have redefined the H5ftruncate macro to use _chsize_s. However, this function also doesn't exist on Visual Studio prior to 2005. Previously we had an #ifdef to support VS 6.0 with the lesser chsize function. This checkin changes the #ifdef to also include VS.NET, since we still support it for HDF5 1.8 branch. Tested: VS.NET on WinXP
-rw-r--r--src/H5win32defs.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 41e2edd..26dab36 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -33,13 +33,11 @@ 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
+#if _MSC_VER > 1310 /* Newer than VS.NET 2003 */
#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)