diff --git a/src/H5private.h b/src/H5private.h index 31ddc47415f..f13c4a75b63 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -31,21 +31,20 @@ #include #include #include -#include #include #include -#include #include #include #include #include /* POSIX headers */ +#ifdef H5_HAVE_SYS_TIME_H +#include +#endif #ifdef H5_HAVE_UNISTD_H #include #include -#include -#include #include #endif diff --git a/src/H5public.h b/src/H5public.h index cef15d94455..e192de09d42 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -35,22 +35,23 @@ #include /* For setting POSIX, BSD, etc. compatibility */ #endif -#ifdef H5_HAVE_SYS_TYPES_H -#include -#endif - -#include /* For H5T_NATIVE_CHAR defn in H5Tpublic.h */ -#include /* For variadic functions in H5VLpublic.h */ - -#include /* For C9x types */ - +/* C library header files for things that appear in HDF5 public headers */ #ifdef __cplusplus #define __STDC_FORMAT_MACROS #endif -#include /* C99/POSIX.1 header for uint64_t, PRIu64 */ - -#ifdef H5_HAVE_STDDEF_H +#include +#include +#include +#include #include +#include + +/* Unlike most sys/ headers, which are POSIX-only, sys/types.h is avaible + * on Windows, though it doesn't necessarily contain all the POSIX types + * we need for HDF5 (e.g. ssize_t). + */ +#ifdef H5_HAVE_SYS_TYPES_H +#include #endif #ifdef H5_HAVE_PARALLEL @@ -192,7 +193,6 @@ typedef int herr_t; * } * \endcode */ -#include typedef bool hbool_t; typedef int htri_t;