mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-24 15:25:00 +08:00
[svn-r18922] Fix for failures for test/mf.c on windows:
1. H5FD_stdio_truncate() windows code: need to do a rewind 2. Make sure fsinfo.fs_addr is initialized before creating the message.
This commit is contained in:
parent
9f90e06bd0
commit
9957d5f8e9
@ -1023,6 +1023,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);
|
||||
|
||||
|
@ -588,11 +588,15 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
|
||||
/* Check for non-default free space settings */
|
||||
if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF ||
|
||||
f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF) {
|
||||
H5O_fsinfo_t fsinfo; /* Free space manager info message */
|
||||
H5FD_mem_t type; /* Memory type for iteration */
|
||||
H5O_fsinfo_t fsinfo; /* Free space manager info message */
|
||||
|
||||
/* Write free-space manager info message to superblock extension object header if needed */
|
||||
fsinfo.strategy = f->shared->fs_strategy;
|
||||
fsinfo.threshold = f->shared->fs_threshold;
|
||||
for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
|
||||
fsinfo.fs_addr[type-1] = HADDR_UNDEF;
|
||||
|
||||
if(H5O_msg_create(&ext_loc, H5O_FSINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &fsinfo, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message")
|
||||
} /* end if */
|
||||
|
Loading…
Reference in New Issue
Block a user