summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-04-19 07:20:10 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-04-19 07:20:10 (GMT)
commitc6d695526c58f3f3906129e833883a183fb3cae6 (patch)
treecbdf2e899b6127be8d841942c2f18940387033b2 /test
parent0dfa9a8549cc4f8c40fd84589fe74c1e7253f1ba (diff)
downloadhdf5-c6d695526c58f3f3906129e833883a183fb3cae6.zip
hdf5-c6d695526c58f3f3906129e833883a183fb3cae6.tar.gz
hdf5-c6d695526c58f3f3906129e833883a183fb3cae6.tar.bz2
[svn-r5204] Purpose:
Code cleanup Description: Platform dependent code related to the struct stat and fstat calls polluted source codes. Hard to maintain. Solution: Platform dependent code are moved to H5private.h and then internal code can #include H5private.h. Repeat those macro definition for the stdio and multi drivers since they area examples for writing a virtual file driver. They must not use any internal code. Platforms tested: eirene (parallel), modi4 (serial including gass driver.)
Diffstat (limited to 'test')
-rw-r--r--test/big.c2
-rw-r--r--test/h5test.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/test/big.c b/test/big.c
index 4941995..0279e91 100644
--- a/test/big.c
+++ b/test/big.c
@@ -74,7 +74,7 @@ static int
is_sparse(void)
{
int fd;
- struct stat sb;
+ h5_stat_t sb;
if ((fd=open("x.h5", O_RDWR|O_TRUNC|O_CREAT, 0666))<0) return 0;
if (lseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0;
diff --git a/test/h5test.c b/test/h5test.c
index 6b43180..fd45a7e 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -12,6 +12,8 @@
#undef NDEBUG /*override -DNDEBUG */
#include "h5test.h"
+#include <sys/types.h>
+#include <sys/stat.h>
#ifdef WIN32
#include <process.h>
@@ -390,7 +392,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
if (strlen(fullname) + strlen(base_name) + 1 < size) {
/* Append the base_name with a slash first. Multiple slashes are
* handled below. */
- struct stat buf;
+ h5_stat_t buf;
if (stat(fullname, &buf) < 0)
/* The directory doesn't exist just yet */