Skip to content

Commit 8bcb794

Browse files
authored
Don't include features.h in H5public.h (#5818)
This file is intended for internal glibc use and should not be included from user code. Instead, you are supposed to set appropriate feature test macros like _POSIX_C_SOURCE before including C/POSIX library headers, which we already do.
1 parent ecb4d5a commit 8bcb794

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

config/ConfigureChecks.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ 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)
137137
CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
138-
CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
139138
CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
140139
CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
141140
CHECK_INCLUDE_FILE_CONCAT ("pwd.h" ${HDF_PREFIX}_HAVE_PWD_H)
@@ -1129,4 +1128,4 @@ else ()
11291128
set (${HDF_PREFIX}_HAVE_PKGCONFIG 0)
11301129
endif ()
11311130

1132-
#-----------------------------------------------------------------------------
1131+
#-----------------------------------------------------------------------------

config/H5pubconf.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@
128128
/* Define to 1 if you have the `fcntl' function. */
129129
#cmakedefine H5_HAVE_FCNTL @H5_HAVE_FCNTL@
130130

131-
/* Define to 1 if you have the <features.h> header file. */
132-
#cmakedefine H5_HAVE_FEATURES_H @H5_HAVE_FEATURES_H@
133-
134131
/* Define if support for deflate (zlib) filter is enabled */
135132
#cmakedefine H5_HAVE_FILTER_DEFLATE @H5_HAVE_FILTER_DEFLATE@
136133

release_docs/RELEASE.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ New Features
217217

218218
Library:
219219
--------
220+
- H5public.h no longer includes features.h
221+
222+
features.h is supposed to be included by glibc headers and not used in
223+
application code. It is unnecessary given our use of feature test macros
224+
like _POSIX_C_SOURCE and has been removed.
225+
220226
- Improved performance of opening a virtual dataset with many mappings
221227

222228
When opening a virtual dataset, the library would previously decode

src/H5public.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
/* API Version macro wrapper definitions */
2323
#include "H5version.h"
2424

25-
#ifdef H5_HAVE_FEATURES_H
26-
#include <features.h> /* For setting POSIX, BSD, etc. compatibility */
27-
#endif
28-
2925
/* C library header files for things that appear in HDF5 public headers */
3026
#ifdef __cplusplus
3127
#include <cinttypes>

0 commit comments

Comments
 (0)