summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-04-16 19:24:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-04-16 19:24:05 (GMT)
commiteb26303cf434c1ca6df34f613b9d2e6c72149ade (patch)
treeaa9db5ad6c948610b3a3d2096b215159819c9431 /src/H5FDsec2.c
parentdf785657a5ac5f8f7d12bf68de47d60922e01993 (diff)
downloadhdf5-eb26303cf434c1ca6df34f613b9d2e6c72149ade.zip
hdf5-eb26303cf434c1ca6df34f613b9d2e6c72149ade.tar.gz
hdf5-eb26303cf434c1ca6df34f613b9d2e6c72149ade.tar.bz2
[svn-r6689] Purpose:
Bug fix. Description: The stdio filer driver is not reducing the file's size in the manner that the sec2 driver does. Solution: Copy code from the sec2 for handling this properly. Platforms tested: h5committested
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 6cf835c..94eabfb 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -796,10 +796,6 @@ static herr_t
H5FD_sec2_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
{
H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
-#ifdef WIN32
- HFILE filehandle; /* Windows file handle */
- LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
-#endif /* WIN32 */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_sec2_flush, FAIL);
@@ -809,6 +805,9 @@ H5FD_sec2_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
/* Extend the file to make sure it's large enough */
if (file->eoa!=file->eof) {
#ifdef WIN32
+ HFILE filehandle; /* Windows file handle */
+ LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
+
/* Map the posix file handle to a Windows file handle */
filehandle = _get_osfhandle(file->fd);