Skip to content

Commit 5be9b57

Browse files
authored
Remove checks for sys/types.h (#5821)
This is present on all systems we support, including Windows. There is no reason to check for it or hide its inclusion behind ifdefs.
1 parent 07c2dca commit 5be9b57

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

config/ConfigureChecks.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
134134
CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
135135
CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
136136
CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
137-
CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
138137
CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
139138
CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
140139
CHECK_INCLUDE_FILE_CONCAT ("pwd.h" ${HDF_PREFIX}_HAVE_PWD_H)
@@ -196,7 +195,6 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
196195
foreach (def
197196
HAVE_SYS_TIME_H
198197
HAVE_UNISTD_H
199-
HAVE_SYS_TYPES_H
200198
HAVE_SYS_SOCKET_H
201199
)
202200
if ("${${HDF_PREFIX}_${def}}")

config/H5pubconf.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,6 @@
304304
/* Define to 1 if you have the <sys/time.h> header file. */
305305
#cmakedefine H5_HAVE_SYS_TIME_H @H5_HAVE_SYS_TIME_H@
306306

307-
/* Define to 1 if you have the <sys/types.h> header file. */
308-
#cmakedefine H5_HAVE_SYS_TYPES_H @H5_HAVE_SYS_TYPES_H@
309-
310307
/* Define to 1 if you have the <szlib.h> header file. */
311308
#cmakedefine H5_HAVE_SZLIB_H @H5_HAVE_SZLIB_H@
312309

config/HDFTests.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,10 @@ int main(void)
8484

8585
#include <stdio.h>
8686
#include <stdlib.h>
87+
#include <sys/types.h>
8788
#ifdef HAVE_UNISTD_H
8889
# include <unistd.h>
8990
#endif
90-
#ifdef HAVE_SYS_TYPES_H
91-
# include <sys/types.h>
92-
#endif
9391
#ifdef HAVE_SYS_SOCKET_H
9492
# include <sys/socket.h>
9593
#endif

src/H5public.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
* on Windows, though it doesn't necessarily contain all the POSIX types
3939
* we need for HDF5 (e.g. ssize_t).
4040
*/
41-
#ifdef H5_HAVE_SYS_TYPES_H
4241
#include <sys/types.h>
43-
#endif
4442

4543
#ifdef H5_HAVE_PARALLEL
4644
/* Don't link against MPI C++ bindings */

tools/test/perform/direct_write_perf.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <stdio.h>
3434
#include <stdlib.h>
3535
#include <time.h>
36+
#include <sys/types.h>
3637

3738
#ifdef H5_HAVE_SYS_STAT_H
3839
#include <sys/stat.h>
@@ -42,10 +43,6 @@
4243
#include <sys/time.h>
4344
#endif
4445

45-
#ifdef H5_HAVE_SYS_TYPES_H
46-
#include <sys/types.h>
47-
#endif
48-
4946
#ifdef H5_HAVE_UNISTD_H
5047
#include <unistd.h>
5148
#endif

0 commit comments

Comments
 (0)