Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganization of C and POSIX headers in H5public.h & H5private.h #793

Merged
merged 5 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/H5private.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@
#include <errno.h>
#include <fcntl.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -43,7 +41,6 @@
#ifdef H5_HAVE_UNISTD_H
#include <pwd.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#endif
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all duplicates from H5public.h


Expand Down
26 changes: 13 additions & 13 deletions src/H5public.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,23 @@
#include <features.h> /* For setting POSIX, BSD, etc. compatibility */
#endif

#ifdef H5_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

#include <limits.h> /* For H5T_NATIVE_CHAR defn in H5Tpublic.h */
#include <stdarg.h> /* For variadic functions in H5VLpublic.h */

#include <stdint.h> /* For C9x types */

/* C library header files for things that appear in HDF5 public headers */
#ifdef __cplusplus
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h> /* C99/POSIX.1 header for uint64_t, PRIu64 */

#ifdef H5_HAVE_STDDEF_H
#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

/* Unlike most sys/ headers, which are POSIX-only, sys/types.h is avaible
* on Windows, though it doesn't necessarily contain all the POSIX types
* we need for HDF5 (e.g. ssize_t).
*/
#ifdef H5_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
Copy link
Member Author

@derobins derobins Jun 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing really new here - just consolidated the C and POSIX headers so they are easier to find.


#ifdef H5_HAVE_PARALLEL
Expand Down Expand Up @@ -192,7 +193,6 @@ typedef int herr_t;
* }
* \endcode
*/
#include <stdbool.h>
typedef bool hbool_t;
typedef int htri_t;

Expand Down