summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-11-02 17:58:28 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-11-02 17:58:28 (GMT)
commit254ae8d43d796c02aedfb7393726a80be14b95d5 (patch)
treea8be7fe29a273fb0ae4c21e41625755ae6ae88f9 /test
parenta125ee351ba738a61d35755fbb2880b011ac6649 (diff)
downloadhdf5-254ae8d43d796c02aedfb7393726a80be14b95d5.zip
hdf5-254ae8d43d796c02aedfb7393726a80be14b95d5.tar.gz
hdf5-254ae8d43d796c02aedfb7393726a80be14b95d5.tar.bz2
[svn-r859] Changes since 19981030
---------------------- ./MANIFEST Added new Pablo files HDF5record_RT.h and ProcIDs.h ./acconfig.h ./configure [REGENERATED] ./configure.in ./src/H5.c ./src/H5Vprivate.h ./src/H5config.h.in [REGENERATED] ./src/H5private.h ./src/H5public.h ./test/big.c Added more configuration stuff for the Win32 environment. Removed all the #ifdef WIN32 from the source and replaced them with OS-independent stuff. Specifics follow: Check for non-Posix.1 `st_blocks' field in `struct stat' which is used by the big file test to decide if the file system supports holes. If the st_blocks field isn't present then we just skip the test. Configure checks for <io.h> <sys/resource.h> <sys/time.h> and <winsock.h> and defines HAVE_IO_H, HAVE_SYS_RESOURCE_H, HAVE_SYS_TIME_H and HAVE_WINSOCK_H when they're found. Configure checks whether both <sys/time.h> and <time.h> can be included and defines SYS_TIME_WITH_TIME if so. Otherwise include only <sys/time.h> or <time.h> even if both exist. Configure checks sizeof(__int64) and defines SIZEOF___INT64 to the result or to zero if __int64 isn't defined. The source uses `long long' in preference to `__int64'. Removed null WIN32 definition for `inline' since such a definition already exists in H5config.h Protected gettimeofday() calls in debugging code with HAVE_GETTIMEOFDAY instead of WIN32. ./src/H5F.c ./src/H5Flow.c ./src/H5Fmpio.c ./src/H5Fsec2.c ./src/H5Fstdio.h ./src/H5P.c ./src/H5Tconv.c ./src/H5private.h Removed #include of system files from library source files and consolodated them into H5private.h where they're protected by various configuration macros (most of them were duplicated there already anyway). ./test/big.c ./test/chunk.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/external.c ./test/fillval.c ./test/flush1.c ./test/flush2.c ./test/iopipe.c ./test/links.c ./test/mount.c ./test/mtime.c ./test/overhead.c ./test/ragged.c ./test/shtype.c ./test/unlink.c Protected system #include's with #ifdef's from H5config.h. Undefined NDEBUG since some of the tests rely on assert() to check return values. Removed WIN32 definitions for __unused__ since this can be controlled by the definition of HAVE_ATTRIBUTE in H5config.h ./test/testhdf5.h Removed the CLEAN_CMD definition because we no longer use it. Albert's cleanup() functions replaced it. ./test/fillval.c Initialized auto hid_t variables to fix warnings in error recovery code when data flow analysis is turned on in compilers. ./test/h5tools.c Initialized an auto variable to fix a compiler warning. ./test/chunk.c ./test/ragged.c The WIN32 had some unsigned variables changed to signed because the compiler generates warnings when coercing unsigned to double(?). I changed them back to unsigned because they really are unsigned quantities. If this the change was just to shut up extraneous warnings then perhaps a compiler flag can do the same; otherwise if the compiler generates bad code then we should supply a patch file instead messing up source code with bug work-arounds. ./src/H5detect.c Protected system #include's with #ifdef's from H5config.h thereby removing a WIN32. If getpwuid() doesn't exist (HAVE_GETPWUID) then we assume that `struct passwd' doesn't exist either (we don't really need it in that case). The H5T_NATIVE_LLONG and H5T_NATIVE_ULLONG are defined in terms of `long long' or else `__int64' or else `long' depending on what's available. ./src/H5Flow.c ./src/H5Ofill.c Added __unused__ to some function arguments that aren't used when assertions are turned off. ./src/H5V.c Changed an auto variable name in some hand-inlined code to get rid of a warning about the variable shadowing a previous auto.
Diffstat (limited to 'test')
-rw-r--r--test/.distdep142
-rw-r--r--test/big.c35
-rw-r--r--test/chunk.c29
-rw-r--r--test/cmpd_dset.c21
-rw-r--r--test/dsets.c32
-rw-r--r--test/dtypes.c37
-rw-r--r--test/extend.c12
-rw-r--r--test/external.c35
-rw-r--r--test/fillval.c33
-rw-r--r--test/flush1.c13
-rw-r--r--test/flush2.c16
-rw-r--r--test/iopipe.c80
-rw-r--r--test/links.c17
-rw-r--r--test/mount.c16
-rw-r--r--test/mtime.c34
-rw-r--r--test/overhead.c23
-rw-r--r--test/ragged.c30
-rw-r--r--test/shtype.c18
-rw-r--r--test/testhdf5.h12
-rw-r--r--test/unlink.c16
20 files changed, 347 insertions, 304 deletions
diff --git a/test/.distdep b/test/.distdep
index 0c34837..186cef4 100644
--- a/test/.distdep
+++ b/test/.distdep
@@ -30,8 +30,7 @@ tattr.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h
+ ../src/H5RApublic.h
tfile.o: \
tfile.c \
testhdf5.h \
@@ -45,7 +44,9 @@ tfile.o: \
../src/H5Bpublic.h \
../src/H5Fprivate.h \
../src/H5Fpublic.h \
- ../src/H5Dpublic.h
+ ../src/H5Dpublic.h \
+ ../src/H5Pprivate.h \
+ ../src/H5Ppublic.h
theap.o: \
theap.c \
testhdf5.h \
@@ -62,7 +63,9 @@ theap.o: \
../src/H5Fpublic.h \
../src/H5Dpublic.h \
../src/H5Pprivate.h \
- ../src/H5Ppublic.h
+ ../src/H5Ppublic.h \
+ ../src/H5Zpublic.h \
+ ../src/H5HLprivate.h
tmeta.o: \
tmeta.c \
testhdf5.h \
@@ -72,8 +75,7 @@ tmeta.o: \
../src/H5Eprivate.h \
../src/H5Epublic.h \
../src/H5Ipublic.h \
- ../src/H5Fprivate.h \
- ../src/H5Fpublic.h
+ ../src/H5Fprivate.h
tohdr.o: \
tohdr.c \
testhdf5.h \
@@ -102,7 +104,9 @@ tohdr.o: \
../src/H5HGpublic.h \
../src/H5Tprivate.h \
../src/H5Tpublic.h \
- ../src/H5Sprivate.h
+ ../src/H5Sprivate.h \
+ ../src/H5Spublic.h \
+ ../src/H5Zprivate.h
trefer.o: \
trefer.c \
testhdf5.h \
@@ -127,8 +131,7 @@ trefer.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h
+ ../src/H5RApublic.h
tselect.o: \
tselect.c \
testhdf5.h \
@@ -153,8 +156,7 @@ tselect.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h
+ ../src/H5RApublic.h
tstab.o: \
tstab.c \
testhdf5.h \
@@ -183,7 +185,9 @@ tstab.o: \
../src/H5HGpublic.h \
../src/H5Tprivate.h \
../src/H5Tpublic.h \
- ../src/H5Sprivate.h
+ ../src/H5Sprivate.h \
+ ../src/H5Spublic.h \
+ ../src/H5Zprivate.h
th5s.o: \
th5s.c \
testhdf5.h \
@@ -208,13 +212,12 @@ th5s.o: \
../src/H5HGpublic.h \
../src/H5Tprivate.h \
../src/H5Tpublic.h \
- ../src/H5Zprivate.h \
- ../src/H5Zpublic.h
+ ../src/H5Zprivate.h
dtypes.o: \
dtypes.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -238,16 +241,13 @@ dtypes.o: \
../src/H5HGprivate.h \
../src/H5Fprivate.h \
../src/H5private.h \
- ../src/H5Rprivate.h \
- ../src/H5Tprivate.h \
- ../src/H5Gprivate.h
+ ../src/H5Rprivate.h
hyperslab.o: \
hyperslab.c \
../src/H5private.h \
../src/H5public.h \
../src/H5config.h \
- ../src/H5MMprivate.h \
- ../src/H5MMpublic.h
+ ../src/H5MMprivate.h
istore.o: \
istore.c \
../src/H5private.h \
@@ -274,13 +274,12 @@ istore.o: \
../src/H5Zpublic.h \
../src/H5Iprivate.h \
../src/H5Pprivate.h \
- ../src/H5Ppublic.h \
- ../src/H5MMprivate.h
+ ../src/H5Ppublic.h
dsets.o: \
dsets.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -297,14 +296,12 @@ dsets.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5RApublic.h
cmpd_dset.o: \
cmpd_dset.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -320,15 +317,12 @@ cmpd_dset.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5Rpublic.h
extend.o: \
extend.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -345,14 +339,12 @@ extend.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5RApublic.h
external.o: \
external.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -368,15 +360,12 @@ external.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5Rpublic.h
iopipe.o: \
iopipe.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -393,9 +382,7 @@ iopipe.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5RApublic.h
gheap.o: \
gheap.c \
../src/H5private.h \
@@ -413,13 +400,12 @@ gheap.o: \
../src/H5Bpublic.h \
../src/H5HGprivate.h \
../src/H5HGpublic.h \
- ../src/H5Pprivate.h \
- ../src/H5Ppublic.h
+ ../src/H5Pprivate.h
shtype.o: \
shtype.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -436,14 +422,12 @@ shtype.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5RApublic.h
big.o: \
big.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -466,9 +450,9 @@ big.o: \
../src/H5private.h
links.o: \
links.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -485,14 +469,12 @@ links.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5RApublic.h
chunk.o: \
chunk.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -508,10 +490,7 @@ chunk.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5Rpublic.h
bittests.o: \
bittests.c \
../src/H5Tpkg.h \
@@ -529,13 +508,12 @@ bittests.o: \
../src/H5Tprivate.h \
../src/H5Tpublic.h \
../src/H5Gprivate.h \
- ../src/H5Gpublic.h \
- ../src/H5Bprivate.h
+ ../src/H5Gpublic.h
mtime.o: \
mtime.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -558,9 +536,9 @@ mtime.o: \
../src/H5private.h
ragged.o: \
ragged.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -583,9 +561,9 @@ ragged.o: \
../src/H5private.h
unlink.o: \
unlink.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -601,15 +579,12 @@ unlink.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5Rpublic.h
overhead.o: \
overhead.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -627,13 +602,12 @@ overhead.o: \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5Spublic.h
fillval.o: \
fillval.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -651,13 +625,12 @@ fillval.o: \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5Spublic.h
mount.o: \
mount.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -673,15 +646,12 @@ mount.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5Rpublic.h
flush1.o: \
flush1.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -698,14 +668,12 @@ flush1.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5RApublic.h
flush2.o: \
flush2.c \
+ ../src/H5config.h \
../src/hdf5.h \
../src/H5public.h \
- ../src/H5config.h \
../src/H5Ipublic.h \
../src/H5Apublic.h \
../src/H5ACpublic.h \
@@ -722,6 +690,4 @@ flush2.o: \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
../src/H5Rpublic.h \
- ../src/H5RApublic.h \
- ../src/H5Spublic.h \
- ../src/H5Tpublic.h
+ ../src/H5RApublic.h
diff --git a/test/big.c b/test/big.c
index 108c1de..fc51e6e 100644
--- a/test/big.c
+++ b/test/big.c
@@ -5,15 +5,22 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Wednesday, April 8, 1998
*/
-#include <assert.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <hdf5.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
+/* See H5private.h for how to include headers */
+#undef NDEBUG
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <ctype.h>
+# include <fcntl.h>
+# include <math.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <sys/stat.h>
+#endif
+
+#include <hdf5.h>
#include <H5private.h> /*needed for HDfprintf() */
#define FNAME "big%05d.h5"
@@ -21,11 +28,15 @@
#define WRT_N 50
#define WRT_SIZE 4*1024
#define FAMILY_SIZE 1024*1024*1024
-#if defined(WIN32)
+
+#if SIZEOF_LONG_LONG > SIZEOF_LONG
+#define GB8LL ((unsigned long long)8*1024*1024*1024)
+#elif SIZEOF___INT64 > SIZEOF_LONG
#define GB8LL ((unsigned __int64)8*1024*1024*1024)
#else
-#define GB8LL ((unsigned long long)8*1024*1024*1024)
+#define GB8LL ((long)1)
#endif
+
static hsize_t
randll (hsize_t limit)
{
@@ -90,10 +101,10 @@ is_sparse(void)
if (5!=write(fd, "hello", 5)) return 0;
if (stat("x.h5", &sb)<0) return 0;
if (unlink("x.h5")<0) return 0;
-#if !defined(WIN32)
+#ifdef HAVE_STAT_ST_BLOCKS
return (sb.st_blocks*512 < (unsigned)sb.st_size);
#else
- return (0);
+ return (0);
#endif
}
diff --git a/test/chunk.c b/test/chunk.c
index 5af7d46..55f3f0f 100644
--- a/test/chunk.c
+++ b/test/chunk.c
@@ -8,15 +8,21 @@
* Purpose: Checks the effect of various I/O request sizes and raw data
* cache sizes. Performance depends on the amount of data read
* from disk and we use a filter to get that number.
-
*/
-#include <assert.h>
-#include <hdf5.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+/* See H5private.h for how to include headers */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -25,11 +31,6 @@
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
-
#define FILE_NAME "chunk.h5"
#define LINESPOINTS "lines"
#define CH_SIZE 100 /*squared in terms of bytes */
@@ -241,11 +242,7 @@ test_diag (int op, hsize_t cache_size, hsize_t io_size, hsize_t offset)
{
hid_t file, dset, mem_space, file_space;
hsize_t i, hs_size[2];
-#if defined(WIN32)
- hssize_t nio = 0;
-#else
- hsize_t nio = 0;
-#endif
+ hsize_t nio = 0;
hssize_t hs_offset[2];
char *buf = calloc (1, SQUARE (io_size));
int mdc_nelmts, rdcc_nelmts;
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 92671e5..1c8a235 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -5,14 +5,20 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Friday, January 23, 1998
*/
+
+/* See H5private.h for how to include headers */
#undef NDEBUG
-#include <assert.h>
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
#include <hdf5.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <H5config.h>
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -21,11 +27,6 @@
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
-
#define TEST_FILE_NAME "cmpd_dset.h5"
/* The first dataset */
diff --git a/test/dsets.c b/test/dsets.c
index a929842..4640d03 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -7,16 +7,26 @@
*
* Purpose: Tests the dataset interface (H5D)
*/
-#include <assert.h>
-#include <hdf5.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#if !defined(WIN32)
-#include <unistd.h>
-#endif
+
+/* See H5private.h for how to include files */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <math.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -24,10 +34,6 @@
#else
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
#ifndef HAVE_FUNCTION
# undef __FUNCTION__
diff --git a/test/dtypes.c b/test/dtypes.c
index f35b3da..865cf2b 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -7,24 +7,33 @@
*
* Purpose: Tests the data type interface (H5T)
*/
-#include <assert.h>
-#include <float.h>
-#include <hdf5.h>
-#include <math.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#if !defined (WIN32)
-#include <sys/wait.h>
-#include <unistd.h>
+
+/* See H5private.h for how to include headers */
+#undef NDEBUG
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <float.h>
+# include <math.h>
+# include <signal.h>
+# include <stdio.h>
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+#ifdef _POSIX_VERSION
+# include <sys/wait.h>
#endif
+#include <hdf5.h>
#define H5T_PACKAGE
#include <H5Tpkg.h> /*to turn off hardware conversions*/
-#include <H5config.h>
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -32,10 +41,6 @@
#else
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
#if SIZEOF_DOUBLE != SIZEOF_LONG_DOUBLE
# define USE_LDOUBLE
diff --git a/test/extend.c b/test/extend.c
index 361592f..86afe3f 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -7,9 +7,17 @@
*
* Purpose: Tests extendible datasets.
*/
-#include <assert.h>
+
+/* See H5private.h for how to include headers */
+#undef NDEBUG
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <stdlib.h>
+#endif
+
#include <hdf5.h>
-#include <stdlib.h>
#define TEST_FILE_NAME "extend.h5"
#define NX 100 /* USE AN EVEN NUMBER!*/
diff --git a/test/external.c b/test/external.c
index 28fd264..363a9f2 100644
--- a/test/external.c
+++ b/test/external.c
@@ -7,17 +7,26 @@
*
* Purpose: Tests datasets stored in external raw files.
*/
-#include <assert.h>
-#include <fcntl.h>
-#include <hdf5.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#if !defined(WIN32)
-#include <unistd.h>
-#endif
+/* See H5private.h for how to include headers */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -26,11 +35,6 @@
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
-
#define TEST_FILE_NAME1 "extern_1.h5"
#define TEST_FILE_NAME2 "extern_2.h5"
#define TEST_FILE_NAME3 "extern_3.h5"
@@ -606,7 +610,8 @@ test_2 (void)
hs_space = H5Scopy (space);
assert (hs_space>=0);
- status = H5Sselect_hyperslab (hs_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL);
+ status = H5Sselect_hyperslab (hs_space, H5S_SELECT_SET, &hs_start,
+ NULL, &hs_count, NULL);
assert (status>=0);
memset (whole, 0, sizeof(whole));
diff --git a/test/fillval.c b/test/fillval.c
index 23673fc..feb704f 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -7,12 +7,23 @@
*
* Purpose: Tests dataset fill values.
*/
-#include <fcntl.h>
-#include <hdf5.h>
-#include <stdlib.h>
-#if !defined(WIN32)
-#include <unistd.h>
+
+/* See H5private.h for how to include headers */
+#undef NDEBUG
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <fcntl.h>
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <sys/types.h>
+# include <unistd.h>
#endif
+
+#include <hdf5.h>
+
/*
* Define NO_FILLING if you want to compare how this test works when there is
* no fill value (that is, when the fill value is zero).
@@ -28,7 +39,6 @@
#define FILE_NAME_6 "fillval_6.h5"
#define FILE_NAME_RAW "fillval.raw"
-#include <H5config.h>
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -36,10 +46,7 @@
#else
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
+
/*-------------------------------------------------------------------------
* Function: cleanup
@@ -232,7 +239,7 @@ test_getset(void)
static int
test_create(const char *filename, H5D_layout_t layout)
{
- hid_t file, space, dcpl, dset1, dset2, dset3;
+ hid_t file=-1, space=-1, dcpl=-1, dset1=-1, dset2=-1, dset3=-1;
hsize_t cur_size[5] = {32, 16, 8, 4, 2};
hsize_t ch_size[5] = {1, 1, 1, 4, 2};
short rd_s, fill_s = 0x1234;
@@ -376,7 +383,7 @@ test_create(const char *filename, H5D_layout_t layout)
static int
test_rdwr(const char *filename, H5D_layout_t layout)
{
- hid_t file, fspace, mspace, dcpl, dset;
+ hid_t file=-1, fspace=-1, mspace=-1, dcpl=-1, dset=-1;
hsize_t cur_size[5] = {32, 16, 8, 4, 2};
hsize_t ch_size[5] = {1, 16, 8, 4, 2};
hsize_t one[5] = {1, 1, 1, 1, 1};
@@ -520,7 +527,7 @@ test_rdwr(const char *filename, H5D_layout_t layout)
static int
test_extend(const char *filename, H5D_layout_t layout)
{
- hid_t file, fspace, mspace, dcpl, dset;
+ hid_t file=-1, fspace=-1, mspace=-1, dcpl=-1, dset=-1;
hsize_t cur_size[5] = {32, 16, 8, 4, 2};
hsize_t max_size[5] = {128, 64, 32, 16, 8};
hsize_t ch_size[5] = {1, 16, 8, 4, 2};
diff --git a/test/flush1.c b/test/flush1.c
index 02ddbca..4596f86 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -11,11 +11,18 @@
* calling _exit(0) since this doesn't flush HDF5 caches but
* still exits with success.
*/
-#include <hdf5.h>
-#include <stdio.h>
-#include <unistd.h>
+/* See H5private.h for how to include headers */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <stdio.h>
+# include <unistd.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
diff --git a/test/flush2.c b/test/flush2.c
index 6e24075..f9ab526 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -10,14 +10,20 @@
* as the file was flushed first. This half tries to read the
* file created by the first half.
*/
+
+/* See H5private.h for how to include headers */
#undef NDEBUG
-#include <assert.h>
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <math.h>
+# include <stdio.h>
+# include <stdlib.h>
+#endif
+
#include <hdf5.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <H5config.h>
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
diff --git a/test/iopipe.c b/test/iopipe.c
index bac63e1..6cdbd2b 100644
--- a/test/iopipe.c
+++ b/test/iopipe.c
@@ -5,25 +5,43 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Thursday, March 12, 1998
*/
+
+/* See H5private.h for how to include headers */
#undef NDEBUG
-#include <assert.h>
-#include <fcntl.h>
-#include <hdf5.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
+#include <H5config.h>
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <fcntl.h>
+# include <stdio.h>
+# include <string.h>
+# include <stdlib.h>
+#endif
-#if defined(WIN32)
-#include <time.h>
-#include <Winsock.h>
+#ifdef HAVE_UNISTD_H
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
+#if defined(TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+# include <time.h>
+#elif defined(HAVE_SYS_TIME_H)
+# include <sys/time.h>
#else
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <unistd.h>
+# include <time.h>
+#endif
+
+#ifdef HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
#endif
+#ifdef HAVE_WINSOCK_H
+#include <Winsock.h>
+#endif
+
+#include <hdf5.h>
+
#define RAW_FILE_NAME "iopipe.raw"
#define HDF5_FILE_NAME "iopipe.h5"
#define HEADING "%-16s"
@@ -148,20 +166,16 @@ synchronize (void)
int
main (void)
{
-#if defined(WIN32)
- static hssize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
-#else
static hsize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y};
-#endif
static int nread=NREAD_REQUESTS, nwrite=NWRITE_REQUESTS;
unsigned char *the_data = NULL;
hid_t file, dset, file_space=-1;
herr_t status;
-#if !defined(WIN32)
+#ifdef HAVE_GETRUSAGE
struct rusage r_start, r_stop;
#else
- struct timeval r_start, r_stop;
+ struct timeval r_start, r_stop;
#endif
struct timeval t_start, t_stop;
int i, fd;
@@ -194,7 +208,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_start);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_start, NULL);
#endif
fprintf (stderr, HEADING, "fill raw");
@@ -206,7 +220,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_stop);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_stop, NULL);
#endif
putc ('\n', stderr);
@@ -220,7 +234,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_start);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_start, NULL);
#endif
fprintf (stderr, HEADING, "fill hdf5");
@@ -234,7 +248,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_stop);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_stop, NULL);
#endif
putc ('\n', stderr);
@@ -247,7 +261,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_start);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_start, NULL);
#endif
fprintf (stderr, HEADING, "out raw");
@@ -262,7 +276,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_stop);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_stop, NULL);
#endif
putc ('\n', stderr);
@@ -275,7 +289,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_start);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_start, NULL);
#endif
fprintf (stderr, HEADING, "out hdf5");
@@ -289,7 +303,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_stop);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_stop, NULL);
#endif
putc ('\n', stderr);
@@ -302,7 +316,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_start);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_start, NULL);
#endif
fprintf (stderr, HEADING, "in raw");
@@ -317,7 +331,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_stop);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_stop, NULL);
#endif
putc ('\n', stderr);
@@ -331,7 +345,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_start);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_start, NULL);
#endif
fprintf (stderr, HEADING, "in hdf5");
@@ -345,7 +359,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_stop);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_stop, NULL);
#endif
putc ('\n', stderr);
@@ -363,7 +377,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_start);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_start, NULL);
#endif
fprintf (stderr, HEADING, "in hdf5 partial");
@@ -377,7 +391,7 @@ main (void)
#ifdef HAVE_GETRUSAGE
getrusage (RUSAGE_SELF, &r_stop);
#endif
-#if !defined(WIN32)
+#ifdef HAVE_GETTIMEOFDAY
gettimeofday (&t_stop, NULL);
#endif
putc ('\n', stderr);
diff --git a/test/links.c b/test/links.c
index 5dc9d89..f824a7b 100644
--- a/test/links.c
+++ b/test/links.c
@@ -7,11 +7,18 @@
*
* Purpose: Tests hard and soft (symbolic) links.
*/
-#include <hdf5.h>
-#include <stdlib.h>
-#include <string.h>
+/* See H5private.h for how to include headers */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -20,10 +27,6 @@
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
#define TEST_FILE_NAME "links.h5"
#define FALSE 0
diff --git a/test/mount.c b/test/mount.c
index b6231a8..5eb0d49 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -7,8 +7,16 @@
*
* Purpose: Tests file mounting.
*/
+
+/* See H5private.h for how to include headers */
+#undef NDEBUG
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
#include <hdf5.h>
-#include <stdlib.h>
#define FALSE 0
#define TRUE 1
@@ -17,7 +25,6 @@
#define FILE_NAME_2 "mount_2.h5"
#define FILE_NAME_3 "mount_3.h5"
-#include <H5config.h>
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -26,11 +33,6 @@
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
-
/*-------------------------------------------------------------------------
* Function: cleanup
diff --git a/test/mtime.c b/test/mtime.c
index 2a5e797..0c019a6 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -10,19 +10,30 @@
* very OS-dependent and this test tries to figure out if it's
* working properly.
*/
-#include <assert.h>
-#include <hdf5.h>
-#include <math.h>
-#if !defined(WIN32)
-#include <sys/time.h>
+
+/* See H5private.h for how to include headers */
+#undef NDEBUG
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <math.h>
+#endif
+
+#if defined(TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+# include <time.h>
+#elif defined(HAVE_SYS_TIME_H)
+# include <sys/time.h>
+#else
+# include <time.h>
#endif
-#include <time.h>
-#define FALSE 0
-#define TRUE 1
+#include <hdf5.h>
+#include <H5private.h> /*for HDdifftime()*/
+
#define FILE_NAME_1 "mtime.h5"
-#include <H5private.h>
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -30,10 +41,7 @@
#else
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
+
/*-------------------------------------------------------------------------
* Function: display_error_cb
diff --git a/test/overhead.c b/test/overhead.c
index 4fdc6d3..d95fed4 100644
--- a/test/overhead.c
+++ b/test/overhead.c
@@ -7,14 +7,25 @@
*
* Purpose: Creates a chunked dataset and measures the storage overhead.
*/
-#include <ctype.h>
-#include <fcntl.h>
-#include <hdf5.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <unistd.h>
+/* See H5private.h for how to include headers */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <ctype.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <sys/stat.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
diff --git a/test/ragged.c b/test/ragged.c
index 903a32e..fa1f8b0 100644
--- a/test/ragged.c
+++ b/test/ragged.c
@@ -5,10 +5,18 @@
* Programmer: Robb Matzke <robb@arborea.spizella.com>
* Tuesday, August 25, 1998
*/
-#include <assert.h>
+
+/* See H5private.h for how to include headers */
+#undef NDEBUG
+#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <signal.h>
+# include <stdlib.h>
+#endif
+
#include <hdf5.h>
-#include <signal.h>
-#include <stdlib.h>
#include <H5private.h> /*for performance monitoring*/
@@ -196,11 +204,7 @@ ragged_write_all(hid_t ra, hsize_t rows_at_once)
hssize_t row; /*current row number */
hsize_t i; /*counter */
hsize_t max_width = quant_g[NELMTS(quant_g)-1].hi;
-#if !defined(WIN32)
hsize_t interval_nelmts; /*elmts/interval timer */
-#else
- hssize_t interval_nelmts; /*elmts/interval timer */
-#endif
hsize_t *size=NULL; /*size of each row */
void **buf=NULL; /*buffer for each row */
H5_timer_t timer, timer_total; /*performance timers */
@@ -302,11 +306,7 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once)
int total_nelmts=0;
hsize_t i, j; /*counters */
hssize_t row; /*current row number */
-#if !defined(WIN32)
hsize_t interval_nelmts; /*elmts/interval timer */
-#else
- hssize_t interval_nelmts; /*elmts/interval timer */
-#endif
hsize_t *size=NULL; /*size of each row */
C_MTYPE **buf=NULL; /*buffer for each row */
H5_timer_t timer, timer_total; /*performance timers */
@@ -437,14 +437,8 @@ ragged_read_short(hid_t ra, hsize_t rows_at_once, hsize_t width)
int total_nelmts=0;
hsize_t i, j;
hssize_t row; /*current row number */
-#if !defined(WIN32)
hsize_t interval_nelmts; /*elmts/interval timer */
- hsize_t read_nelmts=0; /*total elements read */
-#else
- hssize_t read_nelmts=0; /*total elements read */
- hssize_t interval_nelmts; /*elmts/interval timer */
-#endif
-
+ hsize_t read_nelmts=0; /*total elements read */
hsize_t *size=NULL; /*size of each row */
C_MTYPE **buf=NULL; /*buffer for each row */
H5_timer_t timer, timer_total; /*performance timers */
diff --git a/test/shtype.c b/test/shtype.c
index 80eccc0..7b05ed2 100644
--- a/test/shtype.c
+++ b/test/shtype.c
@@ -7,11 +7,18 @@
*
* Purpose: Tests datasets with shared data types.
*/
-#include <assert.h>
-#include <hdf5.h>
-#include <stdlib.h>
+/* See H5private.h for how to include headers */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <assert.h>
+# include <stdlib.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -20,11 +27,6 @@
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
-
#define TEST_FILE_NAME0 "shtype0.h5"
#define TEST_FILE_NAME1 "shtype1.h5"
#define TEST_FILE_NAME2A "shtype2a.h5"
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 16df4e5..3aafe88 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -113,18 +113,6 @@ extern int Verbosity;
#define TEST_STR "Test"
#define CLEAN_STR "Cleanup"
-/* System command to use for Cleanup */
-#ifdef VMS
-#define CLEAN_CMD "delete *.hdf;*"
-#else
-# ifdef WIN32
-# define CLEAN_CMD "del *.hdf"
-# else
-/* default is Unix */
-# define CLEAN_CMD "rm -f *.hdf"
-# endif /* WIN32 */
-#endif /*VMS */
-
/* Prototypes for the support routines */
int print_func(const char *,...);
diff --git a/test/unlink.c b/test/unlink.c
index c4e6d2c..0f63274 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -7,10 +7,17 @@
*
* Purpose: Test H5Gunlink().
*/
-#include <hdf5.h>
-#include <stdlib.h>
+/* See H5private.h for how to include headers */
+#undef NDEBUG
#include <H5config.h>
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#include <hdf5.h>
+
#ifndef HAVE_ATTRIBUTE
# undef __attribute__
# define __attribute__(X) /*void*/
@@ -18,15 +25,10 @@
#else
# define __unused__ __attribute__((unused))
#endif
-#if defined(WIN32)
-#undef __unused__
-#define __unused__
-#endif
#define FILE_NAME_1 "unlink.h5"
#define THE_OBJECT "/foo"
-
/*-------------------------------------------------------------------------
* Function: cleanup