summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/h5test.c3
-rw-r--r--tools/perform/overhead.c4
-rw-r--r--tools/perform/perf.c18
-rw-r--r--tools/perform/pio_engine.c16
-rw-r--r--tools/perform/sio_engine.c18
5 files changed, 39 insertions, 20 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 8285043..8181ff9 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -22,8 +22,7 @@
*/
#undef NDEBUG /*override -DNDEBUG */
-#include <sys/types.h>
-#include <sys/stat.h>
+
#include "h5test.h"
#include "H5srcdir.h"
diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c
index feabd3a..277f7a4 100644
--- a/tools/perform/overhead.c
+++ b/tools/perform/overhead.c
@@ -42,10 +42,6 @@
# include <unistd.h>
#endif
-#ifdef H5_HAVE_IO_H
-# include <io.h>
-#endif
-
/* Solaris Studio defines attribute, but for the attributes we need */
#if !defined(H5_HAVE_ATTRIBUTE) || defined __cplusplus || defined(__SUNPRO_C)
# undef __attribute__
diff --git a/tools/perform/perf.c b/tools/perform/perf.c
index afd13c0..7b9590c 100644
--- a/tools/perform/perf.c
+++ b/tools/perform/perf.c
@@ -24,15 +24,26 @@
#include "hdf5.h"
#include "H5private.h"
+
#ifdef H5_HAVE_PARALLEL
+
+#ifdef H5_STDC_HEADERS
+#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
+#include <string.h>
+#endif
+
#ifdef H5_HAVE_UNISTD_H
+#include <sys/types.h>
#include <unistd.h>
#endif
-#include <errno.h>
-#include <string.h>
+
+#ifdef H5_HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
#if defined(H5_TIME_WITH_SYS_TIME)
# include <sys/time.h>
# include <time.h>
@@ -41,6 +52,7 @@
#else
# include <time.h>
#endif
+
#include <mpi.h>
#ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */
# include <mpio.h>
diff --git a/tools/perform/pio_engine.c b/tools/perform/pio_engine.c
index 96cfcc2..eaedcb8 100644
--- a/tools/perform/pio_engine.c
+++ b/tools/perform/pio_engine.c
@@ -17,17 +17,23 @@
* Author: Albert Cheng of NCSA, Oct 24, 2001.
*/
-#include <sys/types.h>
-#include <sys/stat.h>
+#include "hdf5.h"
+
+#ifdef H5_STDC_HEADERS
+#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
+#endif
+
#ifdef H5_HAVE_UNISTD_H
+#include <sys/types.h>
#include <unistd.h>
#endif
-#include <errno.h>
-#include "hdf5.h"
+#ifdef H5_HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
#ifdef H5_HAVE_PARALLEL
diff --git a/tools/perform/sio_engine.c b/tools/perform/sio_engine.c
index 5622810..505b0f7 100644
--- a/tools/perform/sio_engine.c
+++ b/tools/perform/sio_engine.c
@@ -16,17 +16,23 @@
* Author: Christian Chilan, April 2008
*/
-#include <sys/types.h>
-#include <sys/stat.h>
+#include "hdf5.h"
+
+#ifdef H5_STDC_HEADERS
+#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <fcntl.h>
+#endif
+
#ifdef H5_HAVE_UNISTD_H
-# include <unistd.h>
+#include <sys/types.h>
+#include <unistd.h>
#endif
-#include <errno.h>
-#include "hdf5.h"
+#ifdef H5_HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
#include "sio_perf.h"