diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2004-12-10 21:23:32 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2004-12-10 21:23:32 (GMT) |
commit | 2ae1a93354a13c277963c63d014bc12e2035ebaf (patch) | |
tree | 6c5209d26bf8118646313844d078b237cf98e84d | |
parent | 5b043e6153dbc9085a2b1e95c77c4efae3bda272 (diff) | |
download | hdf5-2ae1a93354a13c277963c63d014bc12e2035ebaf.zip hdf5-2ae1a93354a13c277963c63d014bc12e2035ebaf.tar.gz hdf5-2ae1a93354a13c277963c63d014bc12e2035ebaf.tar.bz2 |
[svn-r9652] Purpose: Bug fix.
Description: In file H5FDsec2.c and H5FDlog.c, there's statements like
H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,off_t,haddr_t);
It assumes sb.st_size from h5_stat_t is of type off_t. But on Windows, it
has type __int64. So the H5_ASSIGN_OVERFLOW statement may cause problem.
Instead of trying to do switch between Windows and other systems in H5FDsec2.c
and H5FDlog.c, define a substituting type in H5private.h to fix the problem.
On Windows, this type is __int64; on other systems, it is off_t.
Platforms tested: h5committest
-rw-r--r-- | src/H5FDsec2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 44d3912..36362fd 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -376,7 +376,8 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t UNUSED fapl_id, HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct") file->fd = fd; - H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,off_t,haddr_t); + + H5_ASSIGN_OVERFLOW(file->eof,sb.st_size,h5_stat_size_t,haddr_t); file->pos = HADDR_UNDEF; file->op = OP_UNKNOWN; #ifdef WIN32 |