HDFGroup / HDFGroup/hdf5

Clean up H5public.h for future H5pubconf.h changes

Open
#5,819 0 comments 0 reactions 1 assignee Assigned to @lrknox View on GitHub
Component - C Library
Dominant language
C
Stars
988
Forks
355
Avg merge
4d 2h
Merged PRs (30d)
12

Description

In the future, H5pubconf.h should be split into one config file for public options, like H5_HAVE_PARALLEL, and one file for private options, like compiler and platform characteristics necessary to build the library.

In light of this, there are a few things in H5public.h that should be cleaned up to make this work easier:

1) We use H5_HAVE_FEATURES_H to determine if we should include features.h. This header is only intended for use by glibc's headers and should not be included by user code. We can probably just drop this.

2) We use H5_HAVE_SYS_TYPES to determine if we should include sys/types.h. This header is included on all platforms we support, including Windows. The ifdef checks can probably be dropped.

3) We use H5_HAVE_WIN32_API to determine how to deal with off_t. This check will be removed in the future since we're going to version the API that contains off_t. The old API call will simply use off_t and the new API call will use uint64_t.

4) Hacks for missing ssize_t are hidden behind H5_SIZEOF_SSIZE_T macro usage. This should be replaced with Win32 checks and ptrdiff_t.

5) We use H5_HAVE_BUILTIN_EXPECT to determine if __builtin_expect() is present. This should be protected with normal compiler/feature tests.

6) It would also be useful to move H5pubconf.h.in from config to src and to make its include guards look like the rest of the library.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.