summaryrefslogtreecommitdiffstats
path: root/tools/h5repart.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repart.c')
-rw-r--r--tools/h5repart.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/tools/h5repart.c b/tools/h5repart.c
index 4561a91..b1a878e 100644
--- a/tools/h5repart.c
+++ b/tools/h5repart.c
@@ -11,17 +11,28 @@
* changing the size of the family members. It can also be used
* to copy a single file to a single file with holes.
*/
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <hdf5.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
+
+/* See H5private.h for how to include system headers */
+#include <H5config.h>
+#ifdef STDC_HEADERS
+# include <ctype.h>
+# include <errno.h>
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <sys/types.h>
+# include <unistd.h>
#endif
+
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#include <hdf5.h>
#define FALSE 0
#define TRUE 1
#define NAMELEN 4096