From e25fa1c619017814718a4ae7cae92fb418aa5445 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:28:40 -0700 Subject: Cleans up some POSIX header bits in H5private.h (#783) --- src/H5private.h | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/src/H5private.h b/src/H5private.h index 290d873..ce6681a 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -26,21 +26,6 @@ #include "H5public.h" /* Include Public Definitions */ -/* include the pthread header */ -#ifdef H5_HAVE_THREADSAFE -#ifdef H5_HAVE_WIN32_API -#ifndef H5_HAVE_WIN_THREADS -#ifdef H5_HAVE_PTHREAD_H -#include -#endif /* H5_HAVE_PTHREAD_H */ -#endif /* H5_HAVE_WIN_THREADS */ -#else /* H5_HAVE_WIN32_API */ -#ifdef H5_HAVE_PTHREAD_H -#include -#endif /* H5_HAVE_PTHREAD_H */ -#endif /* H5_HAVE_WIN32_API */ -#endif /* H5_HAVE_THREADSAFE */ - #include #include #include @@ -49,29 +34,28 @@ #include #include #include +#include #include #include #include -/* - * If _POSIX_VERSION is defined in unistd.h then this system is Posix.1 - * compliant. Otherwise all bets are off. - */ +/* POSIX headers */ #ifdef H5_HAVE_UNISTD_H -#include +#include #include -#endif -#ifdef _POSIX_VERSION +#include #include -#include #endif -#include +/* Include the Pthreads header, if necessary */ +#if defined(H5_HAVE_THREADSAFE) && defined(H5_HAVE_PTHREAD_H) +#include +#endif /* - * The `struct stat' data type for stat() and fstat(). This is a Posix file - * but often apears on non-Posix systems also. The `struct stat' is required - * for hdf5 to compile, although only a few fields are actually used. + * The `struct stat' data type for stat() and fstat(). This is a POSIX file + * but often apears on non-POSIX systems also. The `struct stat' is required + * for HDF5 to compile, although only a few fields are actually used. */ #ifdef H5_HAVE_SYS_STAT_H #include -- cgit v0.12