summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-23 03:28:40 (GMT)
committerGitHub <noreply@github.com>2021-06-23 03:28:40 (GMT)
commite25fa1c619017814718a4ae7cae92fb418aa5445 (patch)
treebe2bd75f24581a1e7f09cf49a9dc3c989ab05e8d /src
parenta1d128597ffc341d214b0f3e3c7e607d53475e88 (diff)
downloadhdf5-e25fa1c619017814718a4ae7cae92fb418aa5445.zip
hdf5-e25fa1c619017814718a4ae7cae92fb418aa5445.tar.gz
hdf5-e25fa1c619017814718a4ae7cae92fb418aa5445.tar.bz2
Cleans up some POSIX header bits in H5private.h (#783)
Diffstat (limited to 'src')
-rw-r--r--src/H5private.h38
1 files 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 <pthread.h>
-#endif /* H5_HAVE_PTHREAD_H */
-#endif /* H5_HAVE_WIN_THREADS */
-#else /* H5_HAVE_WIN32_API */
-#ifdef H5_HAVE_PTHREAD_H
-#include <pthread.h>
-#endif /* H5_HAVE_PTHREAD_H */
-#endif /* H5_HAVE_WIN32_API */
-#endif /* H5_HAVE_THREADSAFE */
-
#include <assert.h>
#include <ctype.h>
#include <errno.h>
@@ -49,29 +34,28 @@
#include <limits.h>
#include <math.h>
#include <signal.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/*
- * 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 <sys/types.h>
+#include <pwd.h>
#include <unistd.h>
-#endif
-#ifdef _POSIX_VERSION
+#include <sys/types.h>
#include <sys/wait.h>
-#include <pwd.h>
#endif
-#include <stdint.h>
+/* Include the Pthreads header, if necessary */
+#if defined(H5_HAVE_THREADSAFE) && defined(H5_HAVE_PTHREAD_H)
+#include <pthread.h>
+#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 <sys/stat.h>