summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2001-07-03 14:49:03 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2001-07-03 14:49:03 (GMT)
commitf9f0de7aa0529a0467e79b4521013328fab1e3e7 (patch)
tree83e73aec2d76e64e158ae3de0fbfc138a0dcef08 /test
parentf72cb07b0ac15e511de8c735f02713fb815079e9 (diff)
downloadhdf5-f9f0de7aa0529a0467e79b4521013328fab1e3e7.zip
hdf5-f9f0de7aa0529a0467e79b4521013328fab1e3e7.tar.gz
hdf5-f9f0de7aa0529a0467e79b4521013328fab1e3e7.tar.bz2
[svn-r4099]
Purpose: Code Cleanup Description: Updating CodeWarrior Port Solution: Move around some Windows and Metroworks ifdefs, etc. Platforms tested: Solaris 2.7 (arabica) Linux 2.2 (eirene)
Diffstat (limited to 'test')
-rw-r--r--test/overhead.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/test/overhead.c b/test/overhead.c
index 0480a73..60a5e90 100644
--- a/test/overhead.c
+++ b/test/overhead.c
@@ -208,7 +208,12 @@ test(fill_t fill_style, const double splits[],
if ((dset=H5Dcreate(file, "chunked", H5T_NATIVE_INT,
fspace, dcpl))<0) goto error;
-#if !defined( __MWERKS__)
+#if !defined( __MWERKS__)
+
+ /*
+ workaround for a bug in the Metrowerks open function
+ pvn
+ */
if ((fd=open(FILE_NAME_1, O_RDONLY))<0) goto error;
#endif
@@ -245,9 +250,8 @@ test(fill_t fill_style, const double splits[],
goto error;
}
-#if defined( __MWERKS__)
- if ((fd=open(FILE_NAME_1, O_RDONLY))<0) goto error;
-#endif
+
+#if !defined( __MWERKS__)
/* Determine overhead */
if (verbose) {
@@ -262,6 +266,9 @@ test(fill_t fill_style, const double splits[],
(unsigned long)i,
(double)(hssize_t)(sb.st_size-i*sizeof(int))/(hssize_t)i);
}
+#endif
+
+
}
H5Dclose(dset);
@@ -290,17 +297,22 @@ test(fill_t fill_style, const double splits[],
case FILL_ALL:
abort();
}
+
+#if !defined( __MWERKS__)
+
if (fstat(fd, &sb)<0) goto error;
- /*
- * The extra cast in the following statement is a bug workaround
- * for the Win32 version 5.0 compiler.
- * 1998-11-06 ptl
- */
- printf("%-7s %8.3f\n", sname,
+ printf("%-7s %8.3f\n", sname,
(double)(hssize_t)(sb.st_size-cur_size[0]*sizeof(int))/
(hssize_t)cur_size[0]);
+#endif
+
}
+
+
+#if !defined( __MWERKS__)
close(fd);
+#endif
+
return 0;
error: