summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-05-04 16:18:11 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-05-04 16:18:11 (GMT)
commit5e94747c52e7ecffdec9262a98caeb5deb5970b2 (patch)
tree2df80f37a16654a4772d2e652d3de037c4e0eee4 /tools
parent1bd3635781b6ee98fe27548aa103e9c77173f846 (diff)
downloadhdf5-5e94747c52e7ecffdec9262a98caeb5deb5970b2.zip
hdf5-5e94747c52e7ecffdec9262a98caeb5deb5970b2.tar.gz
hdf5-5e94747c52e7ecffdec9262a98caeb5deb5970b2.tar.bz2
[svn-r29881] Add include guards.
Remove unnecessary includes.
Diffstat (limited to 'tools')
-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
4 files changed, 38 insertions, 18 deletions
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"