summaryrefslogtreecommitdiffstats
path: root/src/H5win32defs.h
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-10-13 16:51:31 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-10-13 16:51:31 (GMT)
commit166931c024aa8fa895f6f6cfdf2e1fd49e3d7d63 (patch)
treea2bbc8b63b629b83cdecb64e5c9d4d0d3eb179f6 /src/H5win32defs.h
parentdc587a17fab31fb95cccd53b4e15cdc834b50f94 (diff)
downloadhdf5-166931c024aa8fa895f6f6cfdf2e1fd49e3d7d63.zip
hdf5-166931c024aa8fa895f6f6cfdf2e1fd49e3d7d63.tar.gz
hdf5-166931c024aa8fa895f6f6cfdf2e1fd49e3d7d63.tar.bz2
[svn-r15845] Purpose: Add Windows-specific version of HDftruncate
Description: Windows doesn't include a version of the system call ftruncate. There is a similar call, _chsize_s, which performs very similarly. Thus, we map HDftruncate to _chsize_s in our Windows header file, H5win32defs.h. Tested: VS2005 on WinXP
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r--src/H5win32defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 6ce8f77..2f947c1 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -33,6 +33,7 @@ typedef __int64 h5_stat_size_t;
#define HDdup(F) _dup(F)
#define HDfdopen(N,S) _fdopen(N,S)
#define HDfileno(F) _fileno(F)
+#define HDftruncate(F,L) _chsize_s(F,L)
#define HDfstat(F,B) _fstati64(F,B)
#define HDisatty(F) _isatty(F)
#define HDstat(S,B) _stati64(S,B)