summaryrefslogtreecommitdiffstats
path: root/c++/test/tattr.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2006-04-20 06:09:51 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2006-04-20 06:09:51 (GMT)
commit7e5de2473bb2bf780a69995665e2df091c8df9cf (patch)
tree58f680a4af603a981b59c3334689a13f8f792faa /c++/test/tattr.cpp
parent57a2e33c57a54939fb5e2feadb077fa5ba8f3de1 (diff)
downloadhdf5-7e5de2473bb2bf780a69995665e2df091c8df9cf.zip
hdf5-7e5de2473bb2bf780a69995665e2df091c8df9cf.tar.gz
hdf5-7e5de2473bb2bf780a69995665e2df091c8df9cf.tar.bz2
[svn-r12286] Purpose: Fix bug
Description: The file size test in C++ library failed on Copper because the value returned by h5_get_file_size was intepreted incorrectly due to different interger sizes. Solution: H5private.h: Added check to use stat64 and off64_t where appropriate. h5test.c and h5test.h: used h5_stat_size_t in place of off_t. tattr.cpp: used h5_stat_size_t in place of off_t. Platforms tested: Linux 2.4 (heping) AIX 5.1 (copper) SunOS 5.8 64-bit (sol) - still on going
Diffstat (limited to 'c++/test/tattr.cpp')
-rw-r--r--c++/test/tattr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 7768952..5791797 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -1022,7 +1022,7 @@ test_attr_dtype_shared(void)
int data=8; /* Data to write */
int rdata=0; /* Read read in */
H5G_stat_t statbuf; /* Object's information */
- off_t filesize; /* Size of file after modifications */
+ h5_stat_size_t filesize; /* Size of file after modifications */
// Output message about test being performed */
MESSAGE(5, ("Testing Shared Datatypes with Attributes\n"));
@@ -1035,7 +1035,7 @@ test_attr_dtype_shared(void)
fid1.close();
// Get size of file */
- off_t empty_filesize; // Size of empty file */
+ h5_stat_size_t empty_filesize; // Size of empty file */
empty_filesize = h5_get_file_size(FILENAME.c_str());
if (empty_filesize == 0)
TestErrPrintf("Line %d: file size wrong!\n",__LINE__);