From d2980de247abb12e0e75a0ce71dd2a95048d1a19 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Mon, 3 Nov 2008 09:39:02 -0500 Subject: [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 --- src/H5win32defs.h | 4 +--- 1 file changed, 1 insertion(+), 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) -- cgit v0.12