mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[svn-r6203]
Purpose: bug fixed for windows Description: windows fopen functions by default opens a text mode file. It will fail for HDF5 file. So to use HDopen HDread HDclose for test. Solution: Change from fopen, fread, fclose to HDopen, HDread, HDclose. Platforms tested: linux2.2.18smp, windows 2000 Misc. update: Update MANIFEST if you add or remove any file. Update release_docs/RELEASE for bug fixes, new features, etc. Update applicable document files too.
This commit is contained in:
parent
1c0e435421
commit
764a09dddf
11
test/dsets.c
11
test/dsets.c
@ -329,7 +329,8 @@ test_userblock_offset(hid_t fapl)
|
||||
hid_t file, fcpl, dataset, space;
|
||||
int i, j, n;
|
||||
hsize_t dims[2];
|
||||
FILE *f;
|
||||
/* FILE *f;*/
|
||||
int f;
|
||||
haddr_t offset;
|
||||
int rdata[100][200];
|
||||
|
||||
@ -369,9 +370,9 @@ test_userblock_offset(hid_t fapl)
|
||||
* compare it with the data written in.*/
|
||||
if((offset=H5Dget_offset(dataset))==HADDR_UNDEF) goto error;
|
||||
|
||||
f = fopen(filename, "r");
|
||||
fseek(f, (long int)offset, SEEK_SET);
|
||||
fread(rdata, sizeof(int), 100*200, f);
|
||||
f = HDopen(filename, O_RDONLY, 0);
|
||||
HDlseek(f, (off_t)offset, SEEK_SET);
|
||||
HDread(f, rdata, sizeof(int)*100*200);
|
||||
|
||||
/* Check that the values read are the same as the values written */
|
||||
for (i = 0; i < 100; i++) {
|
||||
@ -385,7 +386,7 @@ test_userblock_offset(hid_t fapl)
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
HDclose(f);
|
||||
|
||||
H5Dclose(dataset);
|
||||
H5Fclose(file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user