[svn-r27545] Add first support for _Bool and make hbool_t a "real" _Bool if available

Fix tests accordingly
This commit is contained in:
Jerome Soumagne 2015-08-21 13:52:30 -05:00
parent 1b2b0bd5a3
commit 7ce2d52cf6
29 changed files with 189 additions and 154 deletions

View File

@ -581,6 +581,12 @@
/* The size of `__int64', as computed by sizeof. */
#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@
/* Define to 1 if you have the <stdbool.h> header file. */
#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@
/* The size of `bool', as computed by sizeof. */
#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@

View File

@ -427,6 +427,19 @@ if (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
set (${HDF_PREFIX}_SIZEOF_OFF64_T 0)
endif (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
#-----------------------------------------------------------------------------
# Extra C99 types
#-----------------------------------------------------------------------------
# _Bool type support
CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
if (HAVE_STDBOOL_H)
set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL)
else (HAVE_STDBOOL_H)
HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL)
endif (HAVE_STDBOOL_H)
if (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check if the dev_t type is a scalar type

55
configure vendored
View File

@ -23373,6 +23373,18 @@ fi
done
for ac_header in stdbool.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
if test "x$ac_cv_header_stdbool_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDBOOL_H 1
_ACEOF
fi
done
## Darwin
for ac_header in mach/mach_time.h
@ -24963,6 +24975,49 @@ _ACEOF
if test "X$C9x" = "Xyes"; then
cat >>confdefs.h <<\EOF
#ifdef HAVE_STDBOOL_H
#include <stdbool.h> /* for bool definition */
#else
#define bool _Bool
#endif
EOF
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
$as_echo_n "checking size of bool... " >&6; }
if ${ac_cv_sizeof_bool+:} false; then :
$as_echo_n "(cached) " >&6
else
if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "$ac_includes_default"; then :
else
if test "$ac_cv_type_bool" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (bool)
See \`config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_bool=0
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
$as_echo "$ac_cv_sizeof_bool" >&6; }
cat >>confdefs.h <<_ACEOF
#define SIZEOF_BOOL $ac_cv_sizeof_bool
_ACEOF
fi
## Checkpoint the cache
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure

View File

@ -982,6 +982,7 @@ AC_CHECK_HEADERS([sys/socket.h sys/types.h])
AC_CHECK_HEADERS([stddef.h setjmp.h features.h])
AC_CHECK_HEADERS([dirent.h])
AC_CHECK_HEADERS([stdint.h], [C9x=yes])
AC_CHECK_HEADERS([stdbool.h])
## Darwin
AC_CHECK_HEADERS([mach/mach_time.h])
@ -1189,6 +1190,17 @@ EOF
AC_CHECK_SIZEOF([off_t], [4])
AC_CHECK_SIZEOF([off64_t], [8])
if test "X$C9x" = "Xyes"; then
cat >>confdefs.h <<\EOF
#ifdef HAVE_STDBOOL_H
#include <stdbool.h> /* for bool definition */
#else
#define bool _Bool
#endif
EOF
AC_CHECK_SIZEOF([bool], [1])
fi
## Checkpoint the cache
AC_CACHE_SAVE

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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
/*

View File

@ -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 */

View File

@ -7625,7 +7625,7 @@ main(void)
bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
hid_t fapl = -1; /* File access property list for data files */
unsigned nerrors = 0; /* Cumulative error count */
hbool_t reopen; /* Whether to reopen B-tree during tests */
unsigned reopen; /* Whether to reopen B-tree during tests */
int ExpressMode;
const char *envval = NULL;

View File

@ -1530,7 +1530,7 @@ mdc_api_call_smoke_check(int express_test)
* Note: It is assumed that boolean parameters are only set to TRUE/FALSE.
*/
#define NUM_INVALID_CONFIGS 42
#define NUM_INVALID_CONFIGS 36
H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
{
@ -1605,42 +1605,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 2 -- bad set_initial_size */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
/* hbool_t close_trace_file = */ FALSE,
/* char trace_file_name[] = */ "",
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ 2,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.25f,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ ( 1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9f,
/* double increment = */ 2.0f,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
/* double flash_multiple = */ 2.0f,
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999f,
/* double decrement = */ 0.9f,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1f,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 3 -- max_size too big */
/* 2 -- max_size too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1675,7 +1640,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 4 -- min_size too small */
/* 3 -- min_size too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1710,7 +1675,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 5 -- min_size > max_size */
/* 4 -- min_size > max_size */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1745,7 +1710,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 6 -- initial size out of range (too big) */
/* 5 -- initial size out of range (too big) */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1780,7 +1745,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 7 -- initial_size out of range (too small) */
/* 6 -- initial_size out of range (too small) */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1815,7 +1780,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 8 -- min_clean_fraction too big */
/* 7 -- min_clean_fraction too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1850,7 +1815,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 9 -- min_clean_fraction too small */
/* 8 -- min_clean_fraction too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1885,7 +1850,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 10 -- epoch_length too small */
/* 9 -- epoch_length too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1920,7 +1885,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 11 -- epoch_length too big */
/* 10 -- epoch_length too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1955,7 +1920,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 12 -- invalid incr_mode */
/* 11 -- invalid incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -1990,7 +1955,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 13 -- lower_hr_threshold too small */
/* 12 -- lower_hr_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2025,7 +1990,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 14 -- lower_hr_threshold too big */
/* 13 -- lower_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2060,7 +2025,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 15 -- increment too small */
/* 14 -- increment too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2095,7 +2060,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 16 -- invalid flash_incr_mode */
/* 15 -- invalid flash_incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2130,7 +2095,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 17 -- flash_multiple too small */
/* 16 -- flash_multiple too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2165,7 +2130,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 18 -- flash_multiple too big */
/* 17 -- flash_multiple too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2200,7 +2165,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 19 -- flash_threshold too small */
/* 18 -- flash_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2235,7 +2200,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 20 -- flash_threshold too big */
/* 19 -- flash_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2270,7 +2235,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 21 -- bad decr_mode */
/* 20 -- bad decr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2305,7 +2270,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 22 -- upper_hr_threshold too big */
/* 21 -- upper_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2340,7 +2305,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 23 -- decrement too small */
/* 22 -- decrement too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2375,7 +2340,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 24 -- decrement too big */
/* 23 -- decrement too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2410,7 +2375,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 25 -- epochs_before_eviction too small */
/* 24 -- epochs_before_eviction too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2445,7 +2410,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 26 -- epochs_before_eviction too big */
/* 25 -- epochs_before_eviction too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2480,42 +2445,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 27 -- invalid apply_empty_reserve */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
/* hbool_t close_trace_file = */ FALSE,
/* char trace_file_name[] = */ "",
/* hbool_t evictions_enabled = */ TRUE,
/* hbool_t set_initial_size = */ TRUE,
/* size_t initial_size = */ (1 * 1024 * 1024),
/* double min_clean_fraction = */ 0.25f,
/* size_t max_size = */ (16 * 1024 * 1024),
/* size_t min_size = */ ( 1 * 1024 * 1024),
/* long int epoch_length = */ 50000,
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
/* double lower_hr_threshold = */ 0.9f,
/* double increment = */ 2.0f,
/* hbool_t apply_max_increment = */ TRUE,
/* size_t max_increment = */ (4 * 1024 * 1024),
/* enum H5C_cache_flash_incr_mode */
/* flash_incr_mode = */ H5C_flash_incr__off,
/* double flash_multiple = */ 2.0f,
/* double flash_threshold = */ 0.5f,
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
/* double upper_hr_threshold = */ 0.999f,
/* double decrement = */ 0.9f,
/* hbool_t apply_max_decrement = */ TRUE,
/* size_t max_decrement = */ (1 * 1024 * 1024),
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ 2,
/* double empty_reserve = */ 0.1f,
/* int dirty_bytes_threshold = */ (256 * 1024),
/* int metadata_write_strategy = */
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 28 -- empty_reserve too small */
/* 26 -- empty_reserve too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2550,7 +2480,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 29 -- empty_reserve too big */
/* 27 -- empty_reserve too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2585,7 +2515,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 30 -- upper_hr_threshold too small */
/* 28 -- upper_hr_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2620,7 +2550,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 31 -- upper_hr_threshold too big */
/* 29 -- upper_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2655,7 +2585,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 32 -- upper_hr_threshold <= lower_hr_threshold */
/* 30 -- upper_hr_threshold <= lower_hr_threshold */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2690,7 +2620,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 33 -- dirty_bytes_threshold too small */
/* 31 -- dirty_bytes_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2725,7 +2655,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 34 -- dirty_bytes_threshold too big */
/* 32 -- dirty_bytes_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2760,7 +2690,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 35 -- attempt to disable evictions when auto incr enabled */
/* 33 -- attempt to disable evictions when auto incr enabled */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2795,7 +2725,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 36 -- attempt to disable evictions when auto decr enabled */
/* 34 -- attempt to disable evictions when auto decr enabled */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@ -2830,7 +2760,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
/* 37 -- unknown metadata write strategy */
/* 35 -- unknown metadata write strategy */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,

View File

@ -9033,7 +9033,7 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t file, grp, fapl, fapl2;
hbool_t new_format;
unsigned new_format;
int mdc_nelmts;
size_t rdcc_nelmts;
size_t rdcc_nbytes;

View File

@ -6658,7 +6658,7 @@ test_delete_obj_named(hid_t fapl)
hid_t attr = -1; /* Attribute ID */
hid_t dset = -1; /* Dataset ID */
hid_t fapl2 = -1; /* File access property list ID */
hbool_t new_format; /* Whether to use old or new format */
unsigned new_format; /* Whether to use old or new format */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@ -6753,7 +6753,7 @@ test_delete_obj_named_fileid(hid_t fapl)
hid_t attr = -1; /* Attribute ID */
hid_t dset = -1; /* Dataset ID */
hid_t fapl2 = -1; /* File access property list ID */
hbool_t new_format; /* Whether to use old or new format */
unsigned new_format; /* Whether to use old or new format */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");

View File

@ -2368,7 +2368,7 @@ main(int argc, char *argv[])
{
int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1;
hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
hbool_t new_format; /* Whether to use the new format or not */
unsigned new_format; /* Whether to use the new format or not */
if(argc >= 2) {
test_contig = test_chunk = test_compact = 0;

View File

@ -10714,7 +10714,7 @@ corder_delete(hid_t fapl)
unsigned min_dense; /* Minimum # of links to store in group "densely" */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
hbool_t reopen_file; /* Whether to re-open the file before deleting group */
unsigned reopen_file; /* Whether to re-open the file before deleting group */
h5_stat_size_t empty_size; /* Size of empty file */
h5_stat_size_t file_size; /* Size of file after operating on it */
char objname[NAME_BUF_SIZE]; /* Object name */
@ -10995,8 +10995,8 @@ link_info_by_idx(hid_t fapl)
hid_t file_id = (-1); /* File ID */
hid_t group_id = (-1); /* Group ID */
hid_t gcpl_id = (-1); /* Group creation property list ID */
hbool_t hard_link; /* Create hard or soft link? */
hbool_t use_index; /* Use index on creation order values */
unsigned hard_link; /* Create hard or soft link? */
unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5L_info_t linfo; /* Link info struct */
@ -11178,7 +11178,7 @@ link_info_by_idx_old(hid_t fapl)
{
hid_t file_id = (-1); /* File ID */
hid_t group_id = (-1), group_id2 = (-1); /* Group IDs */
hbool_t hard_link; /* Create hard or soft link? */
unsigned hard_link; /* Create hard or soft link? */
H5L_info_t linfo; /* Link info struct */
char objname[NAME_BUF_SIZE]; /* Object name */
char valname[NAME_BUF_SIZE]; /* Link value name */
@ -11347,7 +11347,7 @@ delete_by_idx(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5L_info_t linfo; /* Link info struct */
@ -12180,7 +12180,7 @@ link_iterate(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
char objname[NAME_BUF_SIZE]; /* Object name */
@ -12866,7 +12866,7 @@ open_by_idx(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5O_info_t oi; /* Buffer for querying object's info */
@ -13302,7 +13302,7 @@ object_info(hid_t fapl)
hid_t space_id = (-1); /* Dataspace ID (for attributes) */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5O_info_t oinfo; /* Buffer for querying object's info */
@ -13698,7 +13698,7 @@ group_info(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5G_info_t grp_info; /* Buffer for querying object's info */
@ -14509,8 +14509,8 @@ main(void)
{
hid_t fapl, fapl2; /* File access property lists */
int nerrors = 0;
hbool_t new_format; /* Whether to use the new format or not */
hbool_t efc; /* Whether to use the external file cache */
unsigned new_format; /* Whether to use the new format or not */
unsigned efc; /* Whether to use the external file cache */
const char *env_h5_drvr; /* File Driver value from environment */
env_h5_drvr = HDgetenv("HDF5_DRIVER");

View File

@ -6802,7 +6802,7 @@ test_mf_fs_drivers(hid_t fapl)
hid_t fcpl = -1; /* file creation property list */
hid_t fapl_new = -1; /* copy of file access property list */
hid_t fapl2 = -1; /* copy of file access property list */
hbool_t new_format; /* To use new library format or not */
unsigned new_format; /* To use new library format or not */
unsigned ret = 0; /* return value */
H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */
@ -7227,7 +7227,7 @@ test_filespace_drivers(hid_t fapl)
{
hid_t fapl_new = -1; /* copy of file access property list */
hid_t fapl2 = -1; /* copy of file access property list */
hbool_t new_format; /* Using library new format or not */
unsigned new_format; /* Using library new format or not */
unsigned ret = 0; /* return value */
H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */

View File

@ -12318,7 +12318,7 @@ main(void)
/* Tests that do not use attributes and do not need to be tested
* multiple times for different attribute configurations */
if(configuration < CONFIG_DENSE) {
hbool_t reopen;
unsigned reopen;
nerrors += test_copy_named_datatype(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_named_datatype_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);

View File

@ -321,7 +321,7 @@ main(void)
time_t time_new, ro;
int chunkno; /* Chunk index for message */
int i; /* Local index variable */
hbool_t b; /* Index for "new format" loop */
unsigned b; /* Index for "new format" loop */
herr_t ret; /* Generic return value */
/* Reset library */

View File

@ -710,7 +710,7 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t file, fapl, fapl2;
hbool_t new_format;
unsigned new_format;
int mdc_nelmts;
size_t rdcc_nelmts;
size_t rdcc_nbytes;

View File

@ -116,8 +116,8 @@ int main( void )
{
hid_t fapl; /* file access property list */
hid_t fapl2; /* file access property list w/latest format set */
hbool_t new_format; /* Whether to use the latest file format */
hbool_t chunk_cache; /* Whether to enable chunk caching */
unsigned new_format; /* Whether to use the latest file format */
unsigned chunk_cache; /* Whether to enable chunk caching */
int nerrors = 0;
/* Initialize random number seed */

View File

@ -1168,7 +1168,7 @@ int
main(void)
{
hid_t fapl, fapl2; /* File access property list IDs */
hbool_t new_format; /* Whether to use the new format or not */
unsigned new_format; /* Whether to use the new format or not */
int nerrors = 0;
/* Reset library */

View File

@ -5338,7 +5338,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
hbool_t reopen_file; /* Whether to re-open the file before deleting group */
unsigned reopen_file; /* Whether to re-open the file before deleting group */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
#ifdef LATER
h5_stat_size_t empty_size; /* Size of empty file */
@ -5687,7 +5687,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
unsigned curr_dset; /* Current dataset to work on */
@ -5899,7 +5899,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t corder_count; /* # of records in creation order index */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
unsigned curr_dset; /* Current dataset to work on */
@ -6842,7 +6842,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
attr_iter_info_t iter_info; /* Iterator info */
hbool_t *visited = NULL; /* Array of flags for visiting links */
hsize_t idx; /* Start index for iteration */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
@ -7203,7 +7203,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t corder_count; /* # of records in creation order index */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
@ -7549,7 +7549,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
@ -7804,7 +7804,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
hbool_t use_index; /* Use index on creation order values */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
@ -10568,8 +10568,8 @@ test_attr(void)
{
hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */
hbool_t new_format; /* Whether to use the new format or not */
hbool_t use_shared; /* Whether to use shared attributes or not */
unsigned new_format; /* Whether to use the new format or not */
unsigned use_shared; /* Whether to use shared attributes or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */

View File

@ -3049,7 +3049,7 @@ test_filespace_info(void)
char filename[FILENAME_LEN]; /* Filename to use */
H5F_file_space_type_t strategy, fs_type, def_type; /* File space handling strategy */
hsize_t threshold, fs_size, def_size; /* Free space section threshold */
hbool_t new_format; /* new format or old format */
unsigned new_format; /* new format or old format */
herr_t ret; /* return value */
/* Output message about test being performed */
@ -3112,7 +3112,7 @@ test_filespace_info(void)
/* Create the file with the specified file space info */
fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl1, my_fapl);
CHECK(ret, FAIL, "H5Fcreate");
CHECK(fid1, FAIL, "H5Fcreate");
/* Close the file */
ret = H5Fclose(fid1);
@ -3120,7 +3120,7 @@ test_filespace_info(void)
/* Re-open the file */
fid2 = H5Fopen(filename, H5F_ACC_RDWR, my_fapl);
CHECK(ret, FAIL, "H5Fopen");
CHECK(fid2, FAIL, "H5Fopen");
/* Get the file's creation property */
fcpl2 = H5Fget_create_plist(fid2);

View File

@ -776,7 +776,7 @@ test_h5o_link(void)
hid_t lcpl_id=-1;
hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2};
htri_t committed; /* Whether the named datatype is committed */
hbool_t new_format; /* Whether to use the new format or not */
unsigned new_format; /* Whether to use the new format or not */
int wdata[TEST6_DIM1][TEST6_DIM2];
int rdata[TEST6_DIM1][TEST6_DIM2];
int i, n, j;

View File

@ -919,7 +919,7 @@ void
test_iterate(void)
{
hid_t fapl, fapl2; /* File access property lists */
hbool_t new_format; /* Whether to use the new format or not */
unsigned new_format; /* Whether to use the new format or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */

View File

@ -5163,7 +5163,7 @@ static void
test_misc30(void)
{
hsize_t file_size[] = {0, 0}; /* Sizes of file created */
hbool_t get_info; /* Whether to perform the get info call */
unsigned get_info; /* Whether to perform the get info call */
/* Output message about test being performed */
MESSAGE(5, ("Local heap dropping free block info\n"));

View File

@ -2443,7 +2443,7 @@ main(void)
hid_t fapl, fapl2, file;
int nerrors = 0;
char filename[1024];
hbool_t new_format;
unsigned new_format;
/* Metadata cache parameters */
int mdc_nelmts;

View File

@ -105,10 +105,10 @@ typedef off_t h5_stat_size_t;
* HDF Boolean type.
*/
#ifndef FALSE
# define FALSE 0
# define FALSE false
#endif
#ifndef TRUE
# define TRUE 1
# define TRUE true
#endif

View File

@ -482,10 +482,10 @@ extern char *strdup(const char *s);
* HDF Boolean type.
*/
#ifndef FALSE
# define FALSE 0
# define FALSE false
#endif
#ifndef TRUE
# define TRUE 1
# define TRUE true
#endif
/** From h5test.h **/