summaryrefslogtreecommitdiffstats
path: root/src/H5FDstdio.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2010-06-11 16:55:51 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2010-06-11 16:55:51 (GMT)
commit63ec41868180edbbc558a79e20355a85f14dc7e3 (patch)
treee6df3aee67aeae88c6b5f2e3cfb905ccea0d461d /src/H5FDstdio.c
parent8c5325ccd3e2df9a7576990ee4fb8a33ea314b4c (diff)
downloadhdf5-63ec41868180edbbc558a79e20355a85f14dc7e3.zip
hdf5-63ec41868180edbbc558a79e20355a85f14dc7e3.tar.gz
hdf5-63ec41868180edbbc558a79e20355a85f14dc7e3.tar.bz2
[svn-r18990] Put in the same fix for windows manifested from test/mf.c failures in the trunk.
H5FD_stdio_truncate() windows code: need to do a rewind
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r--src/H5FDstdio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index b241f4d..76eef9d 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -998,6 +998,9 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
* Programmer: Quincey Koziol
* Thursday, January 31, 2008
*
+ * Modifications:
+ * Vailin Choi; June 2010
+ * Fix for window failures manifested from tests in mf.c.
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1023,6 +1026,9 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
+ /* Reset seek offset to beginning of file, so that file isn't re-extended later */
+ rewind(file->fp);
+
/* Map the posix file handle to a Windows file handle */
filehandle = _get_osfhandle(fd);