diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Pgcpl.c | 2 | ||||
-rw-r--r-- | src/H5T.c | 2 | ||||
-rw-r--r-- | src/H5config.h.in | 6 | ||||
-rw-r--r-- | src/H5private.h | 4 | ||||
-rw-r--r-- | src/H5public.h | 15 |
5 files changed, 24 insertions, 5 deletions
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index 1e3a278..e33fb6e 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -690,7 +690,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded") /* Set property to default value */ - *linfo = H5G_def_linfo_g; + memcpy(linfo, &H5G_def_linfo_g, sizeof(H5O_linfo_t)); H5_DECODE_UNSIGNED(*pp, crt_order_flags) @@ -850,7 +850,7 @@ H5T_init_interface(void) H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HERR_g,COPY,native_int,SET,sizeof(herr_t)) /* hbool_t */ - H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HBOOL_g,COPY,native_int,SET,sizeof(hbool_t)) + H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HBOOL_g,COPY,native_uint,SET,sizeof(hbool_t)) /*------------------------------------------------------------ * IEEE Types diff --git a/src/H5config.h.in b/src/H5config.h.in index ad8dcf9..96e2df5 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -293,6 +293,9 @@ /* Define if `struct stat' has the `st_blocks' field */ #undef HAVE_STAT_ST_BLOCKS +/* Define to 1 if you have the <stdbool.h> header file. */ +#undef HAVE_STDBOOL_H + /* Define to 1 if you have the <stddef.h> header file. */ #undef HAVE_STDDEF_H @@ -469,6 +472,9 @@ /* Width for printf() for type `long long' or `__int64', use `ll' */ #undef PRINTF_LL_WIDTH +/* The size of `bool', as computed by sizeof. */ +#undef SIZEOF_BOOL + /* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR diff --git a/src/H5private.h b/src/H5private.h index 9efd145..b0880a1 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -353,10 +353,10 @@ * HDF Boolean type. */ #ifndef FALSE -# define FALSE 0 + #define FALSE false #endif #ifndef TRUE -# define TRUE 1 + #define TRUE true #endif /* diff --git a/src/H5public.h b/src/H5public.h index 1b3711b..858e67f 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -141,7 +141,20 @@ typedef int herr_t; * printf("error determining whether data type is committed\n"); * } */ -typedef unsigned int hbool_t; +#ifdef H5_HAVE_STDBOOL_H + #include <stdbool.h> +#else /* H5_HAVE_STDBOOL_H */ + #ifndef __cplusplus + #if defined(H5_SIZEOF_BOOL) && (H5_SIZEOF_BOOL != 0) + #define bool _Bool + #else + #define bool unsigned int + #endif + #define true 1 + #define false 0 + #endif /* __cplusplus */ +#endif /* H5_HAVE_STDBOOL_H */ +typedef bool hbool_t; typedef int htri_t; /* Define the ssize_t type if it not is defined */ |