From 734d317da9c759799c92ff47e05e3be7e3e969a9 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Mon, 28 Jun 2021 21:58:38 -0700 Subject: Removes obsolete equivalents of C99's __func__ (#800) --- bin/trace | 2 +- config/cmake/H5pubconf.h.in | 6 - config/cmake_ext_mod/ConfigureChecks.cmake | 3 - config/cmake_ext_mod/HDFTests.c | 40 --- configure.ac | 12 - src/H5A.c | 24 +- src/H5D.c | 14 +- src/H5Eprivate.h | 2 +- src/H5F.c | 16 +- src/H5FDsplitter.c | 80 ++--- src/H5G.c | 12 +- src/H5HF.c | 12 +- src/H5HFdbg.c | 2 +- src/H5HFdblock.c | 2 +- src/H5L.c | 12 +- src/H5M.c | 10 +- src/H5O.c | 14 +- src/H5R.c | 6 +- src/H5T.c | 2 +- src/H5Tcommit.c | 4 +- src/H5VLcallback.c | 14 +- src/H5private.h | 90 +++--- test/cache.c | 499 +++++++++++++++-------------- test/cache_api.c | 48 +-- test/cache_common.c | 24 +- test/cache_image.c | 36 +-- test/h5test.h | 2 +- tools/lib/h5tools_error.h | 18 +- tools/test/h5copy/h5copygentest.c | 54 ++-- tools/test/h5diff/h5diffgentest.c | 2 +- tools/test/h5repack/h5repacktst.c | 108 +++---- tools/test/misc/vds/UC_common.h | 11 +- 32 files changed, 556 insertions(+), 625 deletions(-) diff --git a/bin/trace b/bin/trace index d51b8cb..cc26f86 100755 --- a/bin/trace +++ b/bin/trace @@ -351,7 +351,7 @@ sub rewrite_func ($$$$$) { # Compose the trace macro $trace = "H5TRACE" . scalar(@arg_str) . "(\"$rettype\", \""; - $argtrace = "H5ARG_TRACE" . scalar(@arg_str) . "(FUNC, \""; + $argtrace = "H5ARG_TRACE" . scalar(@arg_str) . "(__func__, \""; $trace .= join("", @arg_str) . "\""; $argtrace .= join("", @arg_str) . "\""; diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index e14e212..be366a8 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -102,9 +102,6 @@ and unions */ #cmakedefine H5_HAVE_C99_DESIGNATED_INITIALIZER @H5_HAVE_C99_DESIGNATED_INITIALIZER@ -/* Define if the compiler understands the __func__ keyword */ -#cmakedefine H5_HAVE_C99_FUNC @H5_HAVE_C99_FUNC@ - /* Define to 1 if you have the `clock_gettime' function. */ #cmakedefine H5_HAVE_CLOCK_GETTIME @H5_HAVE_CLOCK_GETTIME@ @@ -159,9 +156,6 @@ /* Define to 1 if you have the `fseeko' function. */ #cmakedefine H5_HAVE_FSEEKO @H5_HAVE_FSEEKO@ -/* Define if the compiler understands the __FUNCTION__ keyword */ -#cmakedefine H5_HAVE_FUNCTION @H5_HAVE_FUNCTION@ - /* Determine if INTEGER*16 is available */ #cmakedefine H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index ad8496a..ccf7c85 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -74,7 +74,6 @@ if (WINDOWS) set (${HDF_PREFIX}_HAVE_STRDUP 1) if (NOT MINGW) set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1) - set (${HDF_PREFIX}_HAVE_FUNCTION 1) endif () if (NOT UNIX AND NOT CYGWIN) set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1) @@ -507,8 +506,6 @@ endif () if (MINGW OR NOT WINDOWS) foreach (other_test HAVE_ATTRIBUTE - HAVE_C99_FUNC - HAVE_FUNCTION HAVE_C99_DESIGNATED_INITIALIZER SYSTEM_SCOPE_THREADS HAVE_SOCKLEN_T diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index 365931b..c434be5 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -44,26 +44,6 @@ main () #endif -#ifdef HAVE_C99_FUNC - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - const char *fname = __func__; - ; - return 0; -} - -#endif - #ifdef HAVE_ATTRIBUTE #if 0 @@ -90,26 +70,6 @@ int __attribute__((unused)) x #endif /* HAVE_ATTRIBUTE */ -#ifdef HAVE_FUNCTION - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -(void)__FUNCTION__ - ; - return 0; -} - -#endif /* HAVE_FUNCTION */ - #ifdef HAVE_TIMEZONE #ifdef HAVE_SYS_TIME_H diff --git a/configure.ac b/configure.ac index d9a6a5e..dbeb968 100644 --- a/configure.ac +++ b/configure.ac @@ -2024,18 +2024,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int __attribute__((unused)) x]])], AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) -AC_MSG_CHECKING([for __func__ extension]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ const char *fname = __func__; ]])], - [AC_DEFINE([HAVE_C99_FUNC], [1], - [Define if the compiler understands the __func__ keyword]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) -AC_MSG_CHECKING([for __FUNCTION__ extension]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],,[[ const char *fname = __FUNCTION__; ]])], - [AC_DEFINE([HAVE_FUNCTION], [1], - [Define if the compiler understands the __FUNCTION__ keyword]) - AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) AC_MSG_CHECKING([for C99 designated initialization support]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ typedef struct { diff --git a/src/H5A.c b/src/H5A.c index 5d8737f..c986d1f 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -276,7 +276,7 @@ H5Acreate_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, attr_name, type_id, space_id, acpl_id, aapl_id, es_id)) < 0) { + H5ARG_TRACE10(__func__, "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, attr_name, type_id, space_id, acpl_id, aapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID") @@ -425,7 +425,7 @@ H5Acreate_by_name_async(const char *app_file, const char *app_func, unsigned app if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE12(FUNC, "*s*sIui*s*siiiiii", app_file, app_func, app_line, loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id, es_id)) < 0) { + H5ARG_TRACE12(__func__, "*s*sIui*s*siiiiii", app_file, app_func, app_line, loc_id, obj_name, attr_name, type_id, space_id, acpl_id, aapl_id, lapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID") @@ -588,7 +588,7 @@ H5Aopen_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, attr_name, aapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, attr_name, aapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID") @@ -719,7 +719,7 @@ H5Aopen_by_name_async(const char *app_file, const char *app_func, unsigned app_l if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE9(FUNC, "*s*sIui*s*siii", app_file, app_func, app_line, loc_id, obj_name, attr_name, aapl_id, lapl_id, es_id)) < 0) { + H5ARG_TRACE9(__func__, "*s*sIui*s*siii", app_file, app_func, app_line, loc_id, obj_name, attr_name, aapl_id, lapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID") @@ -859,7 +859,7 @@ H5Aopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE11(FUNC, "*s*sIui*sIiIohiii", app_file, app_func, app_line, loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id, es_id)) < 0) { + H5ARG_TRACE11(__func__, "*s*sIui*sIiIohiii", app_file, app_func, app_line, loc_id, obj_name, idx_type, order, n, aapl_id, lapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on attribute ID") @@ -971,7 +971,7 @@ H5Awrite_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIuii*xi", app_file, app_func, app_line, attr_id, dtype_id, buf, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIuii*xi", app_file, app_func, app_line, attr_id, dtype_id, buf, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1079,7 +1079,7 @@ H5Aread_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIuiixi", app_file, app_func, app_line, attr_id, dtype_id, buf, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIuiixi", app_file, app_func, app_line, attr_id, dtype_id, buf, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1719,7 +1719,7 @@ H5Arename_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*s*si", app_file, app_func, app_line, loc_id, old_name, new_name, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*s*si", app_file, app_func, app_line, loc_id, old_name, new_name, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1839,7 +1839,7 @@ H5Arename_by_name_async(const char *app_file, const char *app_func, unsigned app if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE9(FUNC, "*s*sIui*s*s*sii", app_file, app_func, app_line, loc_id, obj_name, old_attr_name, new_attr_name, lapl_id, es_id)) < 0) + H5ARG_TRACE9(__func__, "*s*sIui*s*s*sii", app_file, app_func, app_line, loc_id, obj_name, old_attr_name, new_attr_name, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -2304,7 +2304,7 @@ H5Aclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, attr_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, attr_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -2460,7 +2460,7 @@ H5Aexists_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*s*bi", app_file, app_func, app_line, obj_id, attr_name, attr_exists, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*s*bi", app_file, app_func, app_line, obj_id, attr_name, attr_exists, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -2579,7 +2579,7 @@ H5Aexists_by_name_async(const char *app_file, const char *app_func, unsigned app if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE9(FUNC, "*s*sIui*s*s*bii", app_file, app_func, app_line, loc_id, obj_name, attr_name, attr_exists, lapl_id, es_id)) < 0) + H5ARG_TRACE9(__func__, "*s*sIui*s*s*bii", app_file, app_func, app_line, loc_id, obj_name, attr_name, attr_exists, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_ATTR, H5E_CANTINSERT, FAIL, "can't insert token into event set") diff --git a/src/H5D.c b/src/H5D.c index 7d0e934..7153c7d 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -228,7 +228,7 @@ H5Dcreate_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE11(FUNC, "*s*sIui*siiiiii", app_file, app_func, app_line, loc_id, name, type_id, space_id, lcpl_id, dcpl_id, dapl_id, es_id)) < 0) { + H5ARG_TRACE11(__func__, "*s*sIui*siiiiii", app_file, app_func, app_line, loc_id, name, type_id, space_id, lcpl_id, dcpl_id, dapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on dataset ID") @@ -437,7 +437,7 @@ H5Dopen_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, dapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, dapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on dataset ID") @@ -531,7 +531,7 @@ H5Dclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, dset_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, dset_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -647,7 +647,7 @@ H5Dget_space_async(const char *app_file, const char *app_func, unsigned app_line if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, dset_id, es_id)) < 0) { + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, dset_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, H5I_INVALID_HID, @@ -1065,7 +1065,7 @@ H5Dread_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIuiiiiixi", app_file, app_func, app_line, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIuiiiiixi", app_file, app_func, app_line, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1267,7 +1267,7 @@ H5Dwrite_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIuiiiii*xi", app_file, app_func, app_line, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIuiiiii*xi", app_file, app_func, app_line, dset_id, mem_type_id, mem_space_id, file_space_id, dxpl_id, buf, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1846,7 +1846,7 @@ H5Dset_extent_async(const char *app_file, const char *app_func, unsigned app_lin if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE6(FUNC, "*s*sIui*hi", app_file, app_func, app_line, dset_id, size, es_id)) < 0) + H5ARG_TRACE6(__func__, "*s*sIui*hi", app_file, app_func, app_line, dset_id, size, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "can't insert token into event set") diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index cd567aa..a30cb6a 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -31,7 +31,7 @@ typedef struct H5E_t H5E_t; * error number, the minor error number, and a description of the error. */ #define HERROR(maj_id, min_id, ...) \ - H5E_printf_stack(NULL, __FILE__, FUNC, __LINE__, H5E_ERR_CLS_g, maj_id, min_id, __VA_ARGS__) + H5E_printf_stack(NULL, __FILE__, __func__, __LINE__, H5E_ERR_CLS_g, maj_id, min_id, __VA_ARGS__) /* * HCOMMON_ERROR macro, used by HDONE_ERROR and HGOTO_ERROR diff --git a/src/H5F.c b/src/H5F.c index 5950d9e..8a28b00 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -711,7 +711,7 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE8(FUNC, "*s*sIu*sIuiii", app_file, app_func, app_line, filename, flags, fcpl_id, fapl_id, es_id)) < 0) { + H5ARG_TRACE8(__func__, "*s*sIu*sIuiii", app_file, app_func, app_line, filename, flags, fcpl_id, fapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID") @@ -730,7 +730,7 @@ H5Fcreate_async(const char *app_file, const char *app_func, unsigned app_line, c if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE8(FUNC, "*s*sIu*sIuiii", app_file, app_func, app_line, filename, flags, fcpl_id, fapl_id, es_id)) < 0) + H5ARG_TRACE8(__func__, "*s*sIu*sIuiii", app_file, app_func, app_line, filename, flags, fcpl_id, fapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") @@ -888,7 +888,7 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIu*sIuii", app_file, app_func, app_line, filename, flags, fapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIu*sIuii", app_file, app_func, app_line, filename, flags, fapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID") @@ -907,7 +907,7 @@ H5Fopen_async(const char *app_file, const char *app_func, unsigned app_line, con if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIu*sIuii", app_file, app_func, app_line, filename, flags, fapl_id, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIu*sIuii", app_file, app_func, app_line, filename, flags, fapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") @@ -1020,7 +1020,7 @@ H5Fflush_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE6(FUNC, "*s*sIuiFsi", app_file, app_func, app_line, object_id, scope, es_id)) < 0) + H5ARG_TRACE6(__func__, "*s*sIuiFsi", app_file, app_func, app_line, object_id, scope, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1114,7 +1114,7 @@ H5Fclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1524,7 +1524,7 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) { + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref(ret_value) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on file ID") @@ -1543,7 +1543,7 @@ H5Freopen_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, file_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_FILE, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert token into event set") diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 298edfb..c27cd1b 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -187,7 +187,7 @@ H5FD__init_package(void) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); if (H5FD_splitter_init() < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize splitter VFD") @@ -213,7 +213,7 @@ H5FD_splitter_init(void) FUNC_ENTER_NOAPI(H5I_INVALID_HID) - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); if (H5I_VFL != H5I_get_type(H5FD_SPLITTER_g)) H5FD_SPLITTER_g = H5FDregister(&H5FD_splitter_g); @@ -237,7 +237,7 @@ H5FD__splitter_term(void) { FUNC_ENTER_STATIC_NOERR - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Reset VFL ID */ H5FD_SPLITTER_g = 0; @@ -262,7 +262,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); HDassert(id_out_ptr != NULL); @@ -300,7 +300,7 @@ H5Pset_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *vfd_config) FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*#", fapl_id, vfd_config); - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); if (H5FD_SPLITTER_MAGIC != vfd_config->magic) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid configuration (magic number mismatch)") @@ -388,7 +388,7 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/) FUNC_ENTER_API(FAIL) H5TRACE2("e", "ix", fapl_id, config); - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ if (TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS)) @@ -442,13 +442,13 @@ H5FD__splitter_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closin FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Public API for dxpl "context" */ if (H5FDflush(file->rw_file, dxpl_id, closing) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush R/W file") if (H5FDflush(file->wo_file, dxpl_id, closing) < 0) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTFLUSH, FAIL, "unable to flush W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -477,7 +477,7 @@ H5FD__splitter_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); HDassert(file && file->pub.cls); HDassert(buf); @@ -517,7 +517,7 @@ H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); if (NULL == (plist_ptr = (H5P_genplist_t *)H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") @@ -527,7 +527,7 @@ H5FD__splitter_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr if (H5FDwrite(file->rw_file, type, dxpl_id, addr, size, buf) < 0) HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "R/W file write failed") if (H5FDwrite(file->wo_file, type, dxpl_id, addr, size, buf) < 0) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_WRITEERROR, FAIL, "unable to write W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -553,7 +553,7 @@ H5FD__splitter_fapl_get(H5FD_t *_file) FUNC_ENTER_STATIC_NOERR - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); ret_value = H5FD__splitter_fapl_copy(&(file->fa)); @@ -578,7 +578,7 @@ H5FD__splitter_fapl_copy(const void *_old_fa) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); HDassert(old_fa_ptr); @@ -622,7 +622,7 @@ H5FD__splitter_fapl_free(void *_fapl) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ HDassert(fapl); @@ -660,7 +660,7 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ if (!name || !*name) @@ -716,7 +716,7 @@ H5FD__splitter_open(const char *name, unsigned flags, hid_t splitter_fapl_id, ha file_ptr->wo_file = H5FD_open(fapl_ptr->wo_path, flags, fapl_ptr->wo_fapl_id, HADDR_UNDEF); if (!file_ptr->wo_file) - H5FD_SPLITTER_WO_ERROR(file_ptr, FUNC, H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open W/O file") + H5FD_SPLITTER_WO_ERROR(file_ptr, __func__, H5E_VFL, H5E_CANTOPENFILE, NULL, "unable to open W/O file") ret_value = (H5FD_t *)file_ptr; @@ -757,7 +757,7 @@ H5FD__splitter_close(H5FD_t *_file) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Sanity check */ HDassert(file); @@ -772,7 +772,8 @@ H5FD__splitter_close(H5FD_t *_file) HGOTO_ERROR(H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close R/W file") if (file->wo_file) if (H5FD_close(file->wo_file) == FAIL) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTCLOSEFILE, FAIL, "unable to close W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTCLOSEFILE, FAIL, + "unable to close W/O file") if (file->logfp) { HDfclose(file->logfp); @@ -807,7 +808,7 @@ H5FD__splitter_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Sanity check */ HDassert(file); @@ -838,7 +839,7 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC) + H5FD_SPLITTER_LOG_CALL(__func__) /* Sanity check */ HDassert(file); @@ -849,7 +850,7 @@ H5FD__splitter_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t ad HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "H5FDset_eoa failed for R/W file") if (H5FD_set_eoa(file->wo_file, type, addr) < 0) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTSET, FAIL, "unable to set EOA for W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTSET, FAIL, "unable to set EOA for W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -875,7 +876,7 @@ H5FD__splitter_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Sanity check */ HDassert(file); @@ -904,7 +905,7 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); HDassert(file); HDassert(file->rw_file); @@ -914,7 +915,7 @@ H5FD__splitter_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) HGOTO_ERROR(H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate R/W file") if (H5FDtruncate(file->wo_file, dxpl_id, closing) < 0) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTUPDATE, FAIL, "unable to truncate W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -942,7 +943,7 @@ H5FD__splitter_sb_size(H5FD_t *_file) FUNC_ENTER_STATIC_NOERR - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Sanity check */ HDassert(file); @@ -970,7 +971,7 @@ H5FD__splitter_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf / FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Sanity check */ HDassert(file); @@ -1001,7 +1002,7 @@ H5FD__splitter_sb_decode(H5FD_t *_file, const char *name, const unsigned char *b FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Sanity check */ HDassert(file); @@ -1032,7 +1033,7 @@ H5FD__splitter_cmp(const H5FD_t *_f1, const H5FD_t *_f2) FUNC_ENTER_STATIC_NOERR - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); HDassert(f1); HDassert(f2); @@ -1059,7 +1060,7 @@ H5FD__splitter_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_ FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ HDassert(file); @@ -1090,7 +1091,7 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); HDassert(file); HDassert(file->rw_file); @@ -1101,7 +1102,7 @@ H5FD__splitter_lock(H5FD_t *_file, hbool_t rw) if (file->wo_file != NULL) if (H5FD_lock(file->wo_file, rw) < 0) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTLOCKFILE, FAIL, "unable to lock W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1123,7 +1124,7 @@ H5FD__splitter_unlock(H5FD_t *_file) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ HDassert(file); @@ -1158,7 +1159,7 @@ H5FD__splitter_query(const H5FD_t *_file, unsigned long *flags /* out */) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); if (file) { HDassert(file); @@ -1195,7 +1196,7 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ HDassert(file); @@ -1206,7 +1207,8 @@ H5FD__splitter_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate for R/W file") if (H5FDalloc(file->wo_file, type, dxpl_id, size) == HADDR_UNDEF) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "unable to alloc for W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, + "unable to alloc for W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1228,7 +1230,7 @@ H5FD__splitter_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map) FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ HDassert(file); @@ -1258,7 +1260,7 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, FUNC_ENTER_STATIC - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ HDassert(file); @@ -1268,7 +1270,7 @@ H5FD__splitter_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, HGOTO_ERROR(H5E_VFL, H5E_CANTFREE, FAIL, "unable to free for R/W file") if (H5FDfree(file->wo_file, type, dxpl_id, addr, size) < 0) - H5FD_SPLITTER_WO_ERROR(file, FUNC, H5E_VFL, H5E_CANTINIT, FAIL, "unable to free for W/O file") + H5FD_SPLITTER_WO_ERROR(file, __func__, H5E_VFL, H5E_CANTINIT, FAIL, "unable to free for W/O file") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1289,7 +1291,7 @@ H5FD__splitter_log_error(const H5FD_splitter_t *file, const char *atfunc, const FUNC_ENTER_STATIC_NOERR - H5FD_SPLITTER_LOG_CALL(FUNC); + H5FD_SPLITTER_LOG_CALL(__func__); /* Check arguments */ HDassert(file); diff --git a/src/H5G.c b/src/H5G.c index d7e4da9..deaf792 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -271,7 +271,7 @@ H5Gcreate_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE9(FUNC, "*s*sIui*siiii", app_file, app_func, app_line, loc_id, name, lcpl_id, gcpl_id, gapl_id, es_id)) < 0) { + H5ARG_TRACE9(__func__, "*s*sIui*siiii", app_file, app_func, app_line, loc_id, name, lcpl_id, gcpl_id, gapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on group ID") @@ -475,7 +475,7 @@ H5Gopen_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, gapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, gapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on group ID") @@ -630,7 +630,7 @@ H5Gget_info_async(const char *app_file, const char *app_func, unsigned app_line, if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE6(FUNC, "*s*sIuixi", app_file, app_func, app_line, loc_id, group_info, es_id)) < 0) + H5ARG_TRACE6(__func__, "*s*sIuixi", app_file, app_func, app_line, loc_id, group_info, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -738,7 +738,7 @@ H5Gget_info_by_name_async(const char *app_file, const char *app_func, unsigned a if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE8(FUNC, "*s*sIui*sxii", app_file, app_func, app_line, loc_id, name, group_info, lapl_id, es_id)) < 0) + H5ARG_TRACE8(__func__, "*s*sIui*sxii", app_file, app_func, app_line, loc_id, name, group_info, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -852,7 +852,7 @@ H5Gget_info_by_idx_async(const char *app_file, const char *app_func, unsigned ap if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE11(FUNC, "*s*sIui*sIiIohxii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, group_info, lapl_id, es_id)) < 0) + H5ARG_TRACE11(__func__, "*s*sIui*sIiIohxii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, group_info, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -942,7 +942,7 @@ H5Gclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, group_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, group_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert token into event set") diff --git a/src/H5HF.c b/src/H5HF.c index 73281a4..1f4cc26 100644 --- a/src/H5HF.c +++ b/src/H5HF.c @@ -429,7 +429,7 @@ H5HF_get_obj_len(H5HF_t *fh, const void *_id, size_t *obj_len_p) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't get 'tiny' object's length") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC); + HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -489,7 +489,7 @@ H5HF_get_obj_off(H5HF_t *fh, const void *_id, hsize_t *obj_off_p) *obj_off_p = (hsize_t)0; } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC); + HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -552,7 +552,7 @@ H5HF_read(H5HF_t *fh, const void *_id, void *obj /*out*/) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't read 'tiny' object from fractal heap") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC); + HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -628,7 +628,7 @@ H5HF_write(H5HF_t *fh, void *_id, hbool_t H5_ATTR_UNUSED *id_changed, const void HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "modifying 'tiny' object not supported yet") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC); + HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -696,7 +696,7 @@ H5HF_op(H5HF_t *fh, const void *_id, H5HF_operator_t op, void *op_data) HGOTO_ERROR(H5E_HEAP, H5E_CANTOPERATE, FAIL, "can't operate on 'tiny' object from fractal heap") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC); + HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ @@ -759,7 +759,7 @@ H5HF_remove(H5HF_t *fh, const void *_id) HGOTO_ERROR(H5E_HEAP, H5E_CANTREMOVE, FAIL, "can't remove 'tiny' object from fractal heap") } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC); + HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index a244035..8dbb3f4 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -140,7 +140,7 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth) id_type = 'T'; } /* end if */ else { - HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", FUNC); + HDfprintf(stderr, "%s: Heap ID type not supported yet!\n", __func__); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "heap ID type not supported yet") } /* end else */ diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 628dcc4..4adb47a 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -397,7 +397,7 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_ HDfprintf( stderr, "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n", - FUNC, min_dblock_size, next_size); + __func__, min_dblock_size, next_size); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet") } /* end if */ diff --git a/src/H5L.c b/src/H5L.c index 487599b..065cc5c 100644 --- a/src/H5L.c +++ b/src/H5L.c @@ -415,7 +415,7 @@ H5Lcreate_soft_async(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE9(FUNC, "*s*sIu*si*siii", app_file, app_func, app_line, link_target, link_loc_id, link_name, lcpl_id, lapl_id, es_id)) < 0) + H5ARG_TRACE9(__func__, "*s*sIu*si*siii", app_file, app_func, app_line, link_target, link_loc_id, link_name, lcpl_id, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -608,7 +608,7 @@ H5Lcreate_hard_async(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj_ptr->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIui*si*siii", app_file, app_func, app_line, cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id, lapl_id, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIui*si*siii", app_file, app_func, app_line, cur_loc_id, cur_name, new_loc_id, new_name, lcpl_id, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -903,7 +903,7 @@ H5Ldelete_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, lapl_id, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1031,7 +1031,7 @@ H5Ldelete_by_idx_async(const char *app_file, const char *app_func, unsigned app_ if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIui*sIiIohii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, lapl_id, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIui*sIiIohii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1276,7 +1276,7 @@ H5Lexists_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) if (H5ES_insert(es_id, vol_obj->connector, token, /* clang-format off */ - H5ARG_TRACE8(FUNC, "*s*sIui*s*bii", app_file, app_func, app_line, loc_id, name, exists, lapl_id, es_id)) < 0) + H5ARG_TRACE8(__func__, "*s*sIui*s*bii", app_file, app_func, app_line, loc_id, name, exists, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1742,7 +1742,7 @@ H5Literate_async(const char *app_file, const char *app_func, unsigned app_line, if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIuiIiIo*hLI*xi", app_file, app_func, app_line, group_id, idx_type, order, idx_p, op, op_data, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIuiIiIo*hLI*xi", app_file, app_func, app_line, group_id, idx_type, order, idx_p, op, op_data, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert token into event set") diff --git a/src/H5M.c b/src/H5M.c index c7d1bc9..b890a5c 100644 --- a/src/H5M.c +++ b/src/H5M.c @@ -390,7 +390,7 @@ H5Mcreate_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE11(FUNC, "*s*sIui*siiiiii", app_file, app_func, app_line, loc_id, name, key_type_id, val_type_id, lcpl_id, mcpl_id, mapl_id, es_id)) < 0) { + H5ARG_TRACE11(__func__, "*s*sIui*siiiiii", app_file, app_func, app_line, loc_id, name, key_type_id, val_type_id, lcpl_id, mcpl_id, mapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_MAP, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on map ID") @@ -619,7 +619,7 @@ H5Mopen_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, mapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, mapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_MAP, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on map ID") @@ -713,7 +713,7 @@ H5Mclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, map_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, map_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1088,7 +1088,7 @@ H5Mput_async(const char *app_file, const char *app_func, unsigned app_line, hid_ if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIuii*xi*xii", app_file, app_func, app_line, map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIuii*xi*xii", app_file, app_func, app_line, map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1226,7 +1226,7 @@ H5Mget_async(const char *app_file, const char *app_func, unsigned app_line, hid_ if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIuii*xi*xii", app_file, app_func, app_line, map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIuii*xi*xii", app_file, app_func, app_line, map_id, key_mem_type_id, key, val_mem_type_id, value, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_MAP, H5E_CANTINSERT, FAIL, "can't insert token into event set") diff --git a/src/H5O.c b/src/H5O.c index 3ad14dd..db3ff31 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -201,7 +201,7 @@ H5Oopen_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, lapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, lapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID") @@ -334,7 +334,7 @@ H5Oopen_by_idx_async(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIui*sIiIohii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, lapl_id, es_id)) < 0) { + H5ARG_TRACE10(__func__, "*s*sIui*sIiIohii", app_file, app_func, app_line, loc_id, group_name, idx_type, order, n, lapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID") @@ -594,7 +594,7 @@ H5Ocopy_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIui*si*siii", app_file, app_func, app_line, src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIui*si*siii", app_file, app_func, app_line, src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -700,7 +700,7 @@ H5Oflush_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, obj_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, obj_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -806,7 +806,7 @@ H5Orefresh_async(const char *app_file, const char *app_func, unsigned app_line, if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, oid, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, oid, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -1250,7 +1250,7 @@ H5Oget_info_by_name_async(const char *app_file, const char *app_func, unsigned a if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE9(FUNC, "*s*sIui*sxIuii", app_file, app_func, app_line, loc_id, name, oinfo, fields, lapl_id, es_id)) < 0) + H5ARG_TRACE9(__func__, "*s*sIui*sxIuii", app_file, app_func, app_line, loc_id, name, oinfo, fields, lapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -2063,7 +2063,7 @@ H5Oclose_async(const char *app_file, const char *app_func, unsigned app_line, hi if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, object_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, object_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "can't insert token into event set") diff --git a/src/H5R.c b/src/H5R.c index 5fa2a8b..102af7f 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -610,7 +610,7 @@ H5Ropen_object_async(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on object ID") @@ -777,7 +777,7 @@ H5Ropen_region_async(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, oapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "can't decrement count on region ID") @@ -946,7 +946,7 @@ H5Ropen_attr_async(const char *app_file, const char *app_func, unsigned app_line if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, aapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIu*Rriii", app_file, app_func, app_line, ref_ptr, rapl_id, aapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, diff --git a/src/H5T.c b/src/H5T.c index 74b7655..1b0e8c9 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -2045,7 +2045,7 @@ H5Tclose_async(const char *app_file, const char *app_func, unsigned app_line, hi /* If a token was created, add the token to the event set */ if (NULL != token) if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE5(FUNC, "*s*sIuii", app_file, app_func, app_line, type_id, es_id)) < 0) + H5ARG_TRACE5(__func__, "*s*sIuii", app_file, app_func, app_line, type_id, es_id)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set") done: diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 451a1a8..d079e71 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -218,7 +218,7 @@ H5Tcommit_async(const char *app_file, const char *app_func, unsigned app_line, h if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE10(FUNC, "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, es_id)) < 0) + H5ARG_TRACE10(__func__, "*s*sIui*siiiii", app_file, app_func, app_line, loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -726,7 +726,7 @@ H5Topen_async(const char *app_file, const char *app_func, unsigned app_line, hid if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, tapl_id, es_id)) < 0) { + H5ARG_TRACE7(__func__, "*s*sIui*sii", app_file, app_func, app_line, loc_id, name, tapl_id, es_id)) < 0) { /* clang-format on */ if (H5I_dec_app_ref_always_close(ret_value) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, H5I_INVALID_HID, diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c index baedbf1..a61b003 100644 --- a/src/H5VLcallback.c +++ b/src/H5VLcallback.c @@ -1712,7 +1712,7 @@ H5VLattr_optional_op(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*!ii", app_file, app_func, app_line, attr_id, args, dxpl_id, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, attr_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -2556,7 +2556,7 @@ H5VLdataset_optional_op(const char *app_file, const char *app_func, unsigned app if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*!ii", app_file, app_func, app_line, dset_id, args, dxpl_id, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, dset_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -3259,7 +3259,7 @@ H5VLdatatype_optional_op(const char *app_file, const char *app_func, unsigned ap if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*!ii", app_file, app_func, app_line, type_id, args, dxpl_id, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, type_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -4078,7 +4078,7 @@ H5VLfile_optional_op(const char *app_file, const char *app_func, unsigned app_li if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*!ii", app_file, app_func, app_line, file_id, args, dxpl_id, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, file_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -4725,7 +4725,7 @@ H5VLgroup_optional_op(const char *app_file, const char *app_func, unsigned app_l if (NULL != token) /* clang-format off */ if (H5ES_insert(es_id, vol_obj->connector, token, - H5ARG_TRACE7(FUNC, "*s*sIui*!ii", app_file, app_func, app_line, group_id, args, dxpl_id, es_id)) < 0) + H5ARG_TRACE7(__func__, "*s*sIui*!ii", app_file, app_func, app_line, group_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -5514,7 +5514,7 @@ H5VLlink_optional_op(const char *app_file, const char *app_func, unsigned app_li /* If a token was created, add the token to the event set */ if (NULL != token) /* clang-format off */ - if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(FUNC, "*s*sIui*si*!ii", app_file, app_func, app_line, loc_id, name, lapl_id, args, dxpl_id, es_id)) < 0) + if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIui*si*!ii", app_file, app_func, app_line, loc_id, name, lapl_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") @@ -6093,7 +6093,7 @@ H5VLobject_optional_op(const char *app_file, const char *app_func, unsigned app_ /* If a token was created, add the token to the event set */ if (NULL != token) /* clang-format off */ - if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(FUNC, "*s*sIui*si*!ii", app_file, app_func, app_line, loc_id, name, lapl_id, args, dxpl_id, es_id)) < 0) + if (H5ES_insert(es_id, vol_obj->connector, token, H5ARG_TRACE9(__func__, "*s*sIui*si*!ii", app_file, app_func, app_line, loc_id, name, lapl_id, args, dxpl_id, es_id)) < 0) /* clang-format on */ HGOTO_ERROR(H5E_VOL, H5E_CANTINSERT, FAIL, "can't insert token into event set") diff --git a/src/H5private.h b/src/H5private.h index ed17d4c..13570db 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1747,15 +1747,6 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); #define H5_COLON_SEPC ':' -/* Use FUNC to safely handle variations of C99 __func__ keyword handling */ -#ifdef H5_HAVE_C99_FUNC -#define FUNC __func__ -#elif defined(H5_HAVE_FUNCTION) -#define FUNC __FUNCTION__ -#else -#error "We need __func__ or __FUNCTION__ to test function names!" -#endif - /* * These macros check whether debugging has been requested for a certain * package at run-time. Code for debugging is conditionally compiled by @@ -1836,51 +1827,52 @@ extern char H5libhdf5_settings[]; /* embedded library information */ #define H5TRACE0(R, T) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T) + CALLTIME = H5_trace(NULL, __func__, T) #define H5TRACE1(R, T, A0) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0) #define H5TRACE2(R, T, A0, A1) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1) #define H5TRACE3(R, T, A0, A1, A2) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2) #define H5TRACE4(R, T, A0, A1, A2, A3) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3) #define H5TRACE5(R, T, A0, A1, A2, A3, A4) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4) #define H5TRACE6(R, T, A0, A1, A2, A3, A4, A5) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5) #define H5TRACE7(R, T, A0, A1, A2, A3, A4, A5, A6) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6) #define H5TRACE8(R, T, A0, A1, A2, A3, A4, A5, A6, A7) \ - RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7) + RTYPE = R; \ + CALLTIME = \ + H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, A7) #define H5TRACE9(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, \ - A7, #A8, A8) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8) #define H5TRACE10(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, \ - A7, #A8, A8, #A9, A9) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8, #A9, A9) #define H5TRACE11(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, \ - A7, #A8, A8, #A9, A9, #A10, A10) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8, #A9, A9, #A10, A10) #define H5TRACE12(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) \ RTYPE = R; \ - CALLTIME = H5_trace(NULL, FUNC, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, #A7, \ - A7, #A8, A8, #A9, A9, #A10, A10, #A11, A11) + CALLTIME = H5_trace(NULL, __func__, T, #A0, A0, #A1, A1, #A2, A2, #A3, A3, #A4, A4, #A5, A5, #A6, A6, \ + #A7, A7, #A8, A8, #A9, A9, #A10, A10, #A11, A11) #define H5TRACE_RETURN(V) \ if (RTYPE) { \ - H5_trace(&CALLTIME, FUNC, RTYPE, NULL, V); \ + H5_trace(&CALLTIME, __func__, RTYPE, NULL, V); \ RTYPE = NULL; \ } #else @@ -2136,7 +2128,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); #define FUNC_ENTER_API_COMMON \ FUNC_ENTER_API_VARS \ - FUNC_ENTER_COMMON(H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON(H5_IS_API(__func__)); \ FUNC_ENTER_API_THREADSAFE; #define FUNC_ENTER_API_INIT(err) \ @@ -2211,7 +2203,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ { \ FUNC_ENTER_API_VARS \ - FUNC_ENTER_COMMON_NOERR(H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(H5_IS_API(__func__)); \ FUNC_ENTER_API_THREADSAFE; \ BEGIN_MPE_LOG \ { @@ -2228,7 +2220,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ { \ { \ - FUNC_ENTER_COMMON(H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON(H5_IS_API(__func__)); \ FUNC_ENTER_API_THREADSAFE; \ FUNC_ENTER_API_INIT(err); \ { @@ -2247,7 +2239,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ { \ { \ - FUNC_ENTER_COMMON_NOERR(H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(H5_IS_API(__func__)); \ { /* Note: this macro only works when there's _no_ interface initialization routine for the module */ @@ -2261,14 +2253,14 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); /* Use this macro for all "normal" non-API functions */ #define FUNC_ENTER_NOAPI(err) \ { \ - FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ FUNC_ENTER_NOAPI_INIT(err) \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { /* Use this macro for all non-API functions, which propagate errors, but don't issue them */ #define FUNC_ENTER_NOAPI_NOERR \ { \ - FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ FUNC_ENTER_NOAPI_INIT(-) \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2282,7 +2274,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); */ #define FUNC_ENTER_NOAPI_NOINIT \ { \ - FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2297,7 +2289,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); */ #define FUNC_ENTER_NOAPI_NOINIT_NOERR \ { \ - FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2309,7 +2301,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); */ #define FUNC_ENTER_NOAPI_NOFS \ { \ - FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ \ /* Initialize the package, if appropriate */ \ H5_PACKAGE_INIT(H5_MY_PKG_INIT, err) \ @@ -2326,7 +2318,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); */ #define FUNC_ENTER_NOAPI_NOERR_NOFS \ { \ - FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { /* @@ -2338,7 +2330,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); */ #define FUNC_ENTER_NOAPI_NAMECHECK_ONLY \ { \ - FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); + FUNC_ENTER_COMMON_NOERR(!H5_IS_API(__func__)); /* Use the following two macros as replacements for the FUNC_ENTER_NOAPI * and FUNC_ENTER_NOAPI_NOINIT macros when the function needs to set @@ -2347,7 +2339,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ haddr_t prev_tag = HADDR_UNDEF; \ \ - FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ H5AC_tag(tag, &prev_tag); \ FUNC_ENTER_NOAPI_INIT(err) \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2356,7 +2348,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ haddr_t prev_tag = HADDR_UNDEF; \ \ - FUNC_ENTER_COMMON(!H5_IS_API(FUNC)); \ + FUNC_ENTER_COMMON(!H5_IS_API(__func__)); \ H5AC_tag(tag, &prev_tag); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2364,14 +2356,14 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); /* Use this macro for all "normal" package-level functions */ #define FUNC_ENTER_PACKAGE \ { \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { /* Use this macro for package-level functions which propgate errors, but don't issue them */ #define FUNC_ENTER_PACKAGE_NOERR \ { \ - FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2381,7 +2373,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ haddr_t prev_tag = HADDR_UNDEF; \ \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \ H5AC_tag(tag, &prev_tag); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2389,14 +2381,14 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); /* Use this macro for all "normal" staticly-scoped functions */ #define FUNC_ENTER_STATIC \ { \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { /* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */ #define FUNC_ENTER_STATIC_NOERR \ { \ - FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { @@ -2404,7 +2396,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); /* And that shouldn't push their name on the function stack */ #define FUNC_ENTER_STATIC_NOERR_NOFS \ { \ - FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \ + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { /* @@ -2416,7 +2408,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); */ #define FUNC_ENTER_STATIC_NAMECHECK_ONLY \ { \ - FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); + FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(__func__)); /* Use the following macro as replacement for the FUNC_ENTER_STATIC * macro when the function needs to set up a metadata tag. */ @@ -2424,7 +2416,7 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); { \ haddr_t prev_tag = HADDR_UNDEF; \ \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ + FUNC_ENTER_COMMON(H5_IS_PKG(__func__)); \ H5AC_tag(tag, &prev_tag); \ H5_PUSH_FUNC \ if (H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { diff --git a/test/cache.c b/test/cache.c index 78e902c..6ded559 100644 --- a/test/cache.c +++ b/test/cache.c @@ -280,17 +280,17 @@ smoke_check_1(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged); if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -308,7 +308,7 @@ smoke_check_1(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -326,7 +326,7 @@ smoke_check_1(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -344,7 +344,7 @@ smoke_check_1(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -354,7 +354,7 @@ smoke_check_1(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -367,7 +367,7 @@ smoke_check_1(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -377,7 +377,7 @@ smoke_check_1(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -390,12 +390,12 @@ smoke_check_1(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -409,7 +409,7 @@ smoke_check_1(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -478,17 +478,17 @@ smoke_check_2(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged); if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -506,7 +506,7 @@ smoke_check_2(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -524,7 +524,7 @@ smoke_check_2(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -542,7 +542,7 @@ smoke_check_2(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -552,7 +552,7 @@ smoke_check_2(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -565,7 +565,7 @@ smoke_check_2(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -575,7 +575,7 @@ smoke_check_2(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -588,12 +588,12 @@ smoke_check_2(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -607,7 +607,7 @@ smoke_check_2(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -675,17 +675,17 @@ smoke_check_3(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged); if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -703,7 +703,7 @@ smoke_check_3(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -721,7 +721,7 @@ smoke_check_3(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -739,7 +739,7 @@ smoke_check_3(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -749,7 +749,7 @@ smoke_check_3(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -762,7 +762,7 @@ smoke_check_3(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -772,7 +772,7 @@ smoke_check_3(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -785,12 +785,12 @@ smoke_check_3(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -804,7 +804,7 @@ smoke_check_3(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -873,17 +873,17 @@ smoke_check_4(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged); if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -901,7 +901,7 @@ smoke_check_4(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -919,7 +919,7 @@ smoke_check_4(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -937,7 +937,7 @@ smoke_check_4(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -947,7 +947,7 @@ smoke_check_4(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -960,7 +960,7 @@ smoke_check_4(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -970,7 +970,7 @@ smoke_check_4(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -983,12 +983,12 @@ smoke_check_4(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -1002,7 +1002,7 @@ smoke_check_4(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -1116,12 +1116,12 @@ smoke_check_5(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged); cache_ptr = file_ptr->shared->cache; @@ -1138,7 +1138,7 @@ smoke_check_5(int express_test, unsigned paged) } if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1149,7 +1149,7 @@ smoke_check_5(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1160,7 +1160,7 @@ smoke_check_5(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1171,7 +1171,7 @@ smoke_check_5(int express_test, unsigned paged) /* do_inserts */ TRUE); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -1181,7 +1181,7 @@ smoke_check_5(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1193,7 +1193,7 @@ smoke_check_5(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -1203,7 +1203,7 @@ smoke_check_5(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1215,12 +1215,12 @@ smoke_check_5(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -1234,7 +1234,7 @@ smoke_check_5(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -1348,12 +1348,12 @@ smoke_check_6(int express_test, unsigned paged) } if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged); cache_ptr = file_ptr->shared->cache; @@ -1370,7 +1370,7 @@ smoke_check_6(int express_test, unsigned paged) } if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1381,7 +1381,7 @@ smoke_check_6(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1392,7 +1392,7 @@ smoke_check_6(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1403,7 +1403,7 @@ smoke_check_6(int express_test, unsigned paged) /* do_inserts */ TRUE); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -1413,7 +1413,7 @@ smoke_check_6(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1425,7 +1425,7 @@ smoke_check_6(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -1435,7 +1435,7 @@ smoke_check_6(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1447,12 +1447,12 @@ smoke_check_6(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -1466,7 +1466,7 @@ smoke_check_6(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -1581,12 +1581,12 @@ smoke_check_7(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged); cache_ptr = file_ptr->shared->cache; @@ -1603,7 +1603,7 @@ smoke_check_7(int express_test, unsigned paged) } if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1614,7 +1614,7 @@ smoke_check_7(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1625,7 +1625,7 @@ smoke_check_7(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1636,7 +1636,7 @@ smoke_check_7(int express_test, unsigned paged) /* do_inserts */ TRUE); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -1646,7 +1646,7 @@ smoke_check_7(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1658,7 +1658,7 @@ smoke_check_7(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -1668,7 +1668,7 @@ smoke_check_7(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1680,12 +1680,12 @@ smoke_check_7(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -1699,7 +1699,7 @@ smoke_check_7(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -1814,12 +1814,12 @@ smoke_check_8(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024), paged); cache_ptr = file_ptr->shared->cache; @@ -1836,7 +1836,7 @@ smoke_check_8(int express_test, unsigned paged) } if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1847,7 +1847,7 @@ smoke_check_8(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1858,7 +1858,7 @@ smoke_check_8(int express_test, unsigned paged) /* do_inserts */ FALSE); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1869,7 +1869,7 @@ smoke_check_8(int express_test, unsigned paged) /* do_inserts */ TRUE); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -1879,7 +1879,7 @@ smoke_check_8(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1891,7 +1891,7 @@ smoke_check_8(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -1901,7 +1901,7 @@ smoke_check_8(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); hl_col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -1913,12 +1913,12 @@ smoke_check_8(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -1932,7 +1932,7 @@ smoke_check_8(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -2011,12 +2011,12 @@ smoke_check_9(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged); cache_ptr = file_ptr->shared->cache; @@ -2024,7 +2024,7 @@ smoke_check_9(int express_test, unsigned paged) /* disable evictions */ if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2038,7 +2038,8 @@ smoke_check_9(int express_test, unsigned paged) } if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, + (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2058,7 +2059,7 @@ smoke_check_9(int express_test, unsigned paged) /* enable evictions */ if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2072,7 +2073,8 @@ smoke_check_9(int express_test, unsigned paged) } if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", __func__, mile_stone++, + (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2090,7 +2092,7 @@ smoke_check_9(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2104,7 +2106,8 @@ smoke_check_9(int express_test, unsigned paged) } if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled \n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled \n", __func__, mile_stone++, + (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2122,7 +2125,7 @@ smoke_check_9(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2136,7 +2139,8 @@ smoke_check_9(int express_test, unsigned paged) } if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled \n", __func__, mile_stone++, + (int)pass); /* flush and destroy all entries in the cache: */ @@ -2146,7 +2150,7 @@ smoke_check_9(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2160,7 +2164,8 @@ smoke_check_9(int express_test, unsigned paged) } if (show_progress) /* 12 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, + (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2173,7 +2178,7 @@ smoke_check_9(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 13 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush all entries in the cache: */ @@ -2183,7 +2188,7 @@ smoke_check_9(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 14 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2197,7 +2202,8 @@ smoke_check_9(int express_test, unsigned paged) } if (show_progress) /* 15 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, + (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2210,7 +2216,7 @@ smoke_check_9(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 16 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2224,12 +2230,13 @@ smoke_check_9(int express_test, unsigned paged) } if (show_progress) /* 17 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, + (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 18 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -2243,7 +2250,7 @@ smoke_check_9(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -2322,18 +2329,19 @@ smoke_check_10(int express_test, unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(4 * 1024 * 1024), (size_t)(2 * 1024 * 1024), paged); cache_ptr = file_ptr->shared->cache; if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, + (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2351,7 +2359,7 @@ smoke_check_10(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2365,7 +2373,8 @@ smoke_check_10(int express_test, unsigned paged) } if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, + (int)pass); row_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2383,7 +2392,7 @@ smoke_check_10(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2397,7 +2406,8 @@ smoke_check_10(int express_test, unsigned paged) } if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, + (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2415,7 +2425,7 @@ smoke_check_10(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2429,7 +2439,8 @@ smoke_check_10(int express_test, unsigned paged) } if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, + (int)pass); /* flush and destroy all entries in the cache: */ @@ -2439,7 +2450,7 @@ smoke_check_10(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2453,7 +2464,8 @@ smoke_check_10(int express_test, unsigned paged) } if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, + (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2466,7 +2478,7 @@ smoke_check_10(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 12 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2480,7 +2492,8 @@ smoke_check_10(int express_test, unsigned paged) } if (show_progress) /* 13 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, + (int)pass); /* flush all entries in the cache: */ @@ -2490,7 +2503,7 @@ smoke_check_10(int express_test, unsigned paged) /* dump_detailed_stats */ FALSE); if (show_progress) /* 14 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2504,7 +2517,8 @@ smoke_check_10(int express_test, unsigned paged) } if (show_progress) /* 15 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions enabled\n", __func__, mile_stone++, + (int)pass); col_major_scan_backward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2517,7 +2531,7 @@ smoke_check_10(int express_test, unsigned paged) /* dirty_unprotects */ dirty_unprotects); if (show_progress) /* 16 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -2531,12 +2545,13 @@ smoke_check_10(int express_test, unsigned paged) } if (show_progress) /* 17 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d -- evictions disabled\n", __func__, mile_stone++, + (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 18 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -2550,7 +2565,7 @@ smoke_check_10(int express_test, unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -2625,17 +2640,17 @@ write_permitted_check(int pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); reset_entries(); if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); file_ptr = setup_cache((size_t)(1 * 1024 * 1024), (size_t)0, paged); if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); row_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2653,7 +2668,7 @@ write_permitted_check(int /* dirty_unprotects */ TRUE); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); write_permitted = FALSE; @@ -2673,7 +2688,7 @@ write_permitted_check(int /* dirty_unprotects */ NO_CHANGE); if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); write_permitted = TRUE; @@ -2693,7 +2708,7 @@ write_permitted_check(int /* dirty_unprotects */ TRUE); if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* flush and destroy all entries in the cache: */ @@ -2703,7 +2718,7 @@ write_permitted_check(int /* dump_detailed_stats */ FALSE); if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); col_major_scan_forward(/* file_ptr */ file_ptr, /* max_index */ max_index, @@ -2716,7 +2731,7 @@ write_permitted_check(int /* dirty_unprotects */ TRUE); if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); write_permitted = FALSE; @@ -2733,12 +2748,12 @@ write_permitted_check(int write_permitted = TRUE; if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); takedown_cache(file_ptr, display_stats, TRUE); if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); verify_clean(); verify_unprotected(); @@ -2752,7 +2767,7 @@ write_permitted_check(int if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } #else /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */ @@ -3046,7 +3061,7 @@ check_insert_entry(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -3135,7 +3150,7 @@ check_flush_cache(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -12673,7 +12688,7 @@ check_get_entry_status(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -12954,7 +12969,7 @@ check_expunge_entry(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -13345,7 +13360,7 @@ check_multiple_read_protect(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -13445,7 +13460,7 @@ check_move_entry(unsigned paged) H5_FAILED() if (!pass) - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); return (unsigned)!pass; } /* check_move_entry() */ @@ -13703,7 +13718,7 @@ check_pin_protected_entry(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -14571,7 +14586,7 @@ check_resize_entry(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -14656,7 +14671,7 @@ check_evictions_enabled(unsigned paged) pass = TRUE; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* create the cache */ if (pass) { @@ -14678,7 +14693,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that it is empty */ if (pass) { @@ -14694,7 +14709,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that H5C_get_evictions_enabled() returns the expected value */ if (pass) { @@ -14710,7 +14725,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14722,7 +14737,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that the cache is full */ if (pass) { @@ -14738,7 +14753,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14748,7 +14763,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that an entry has been evicted */ if (pass) { @@ -14764,7 +14779,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14794,7 +14809,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14803,7 +14818,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 10 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that another entry has been evicted */ if (pass) { @@ -14820,7 +14835,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 11 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14850,7 +14865,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 12 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* disable evictions */ if (pass) { @@ -14866,7 +14881,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 13 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that evictions are disabled */ if (pass) { @@ -14883,7 +14898,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 14 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14893,7 +14908,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 15 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that no entry has been evicted */ if (pass) { @@ -14910,7 +14925,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 16 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14919,7 +14934,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 17 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that no entry has been evicted */ if (pass) { @@ -14936,7 +14951,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 18 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* re-enable evictions */ if (pass) { @@ -14952,7 +14967,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 19 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14962,7 +14977,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 20 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that no entries have been evicted */ if (pass) { @@ -14979,7 +14994,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 21 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -14989,7 +15004,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 22 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that the entries have been evicted to bring the * cache back down to its normal size. @@ -15009,7 +15024,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 23 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -15039,7 +15054,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 24 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -15069,7 +15084,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 25 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* disable evictions again */ if (pass) { @@ -15085,7 +15100,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 26 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -15097,7 +15112,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 27 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that the cache has grown */ if (pass) { @@ -15114,7 +15129,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 28 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* re-enable evictions again */ if (pass) { @@ -15130,7 +15145,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 29 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -15139,7 +15154,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 30 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* verify that the cache has returned to its maximum size */ if (pass) { @@ -15156,7 +15171,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 31 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -15186,7 +15201,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 32 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* disable evictions one last time before we shut down */ if (pass) { @@ -15202,7 +15217,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 33 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -15210,7 +15225,7 @@ check_evictions_enabled(unsigned paged) } if (show_progress) /* 34 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { PASSED(); @@ -15221,7 +15236,7 @@ check_evictions_enabled(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -15319,7 +15334,7 @@ check_flush_protected_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -15408,7 +15423,7 @@ check_destroy_pinned_err(unsigned paged) } if (!pass) - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); return (unsigned)!pass; @@ -15504,7 +15519,7 @@ check_destroy_protected_err(unsigned paged) } if (!pass) - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); return (unsigned)!pass; @@ -15585,7 +15600,7 @@ check_duplicate_insert_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -15674,7 +15689,7 @@ check_double_pin_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -15772,7 +15787,7 @@ check_double_unpin_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -15884,7 +15899,7 @@ check_pin_entry_errs(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -15966,7 +15981,7 @@ check_double_protect_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16044,7 +16059,7 @@ check_double_unprotect_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16126,7 +16141,7 @@ check_mark_entry_dirty_errs(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16243,7 +16258,7 @@ check_expunge_entry_errs(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16360,7 +16375,7 @@ check_move_entry_errs(unsigned paged) else { H5_FAILED() - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } /* end else */ return (unsigned)!pass; @@ -16460,7 +16475,7 @@ check_resize_entry_errs(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16581,7 +16596,7 @@ check_unprotect_ro_dirty_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16668,7 +16683,7 @@ check_protect_ro_rw_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16797,7 +16812,7 @@ check_protect_retries(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_msg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_msg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -16937,7 +16952,7 @@ check_check_evictions_enabled_err(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -20803,7 +20818,7 @@ check_auto_cache_resize(hbool_t cork_ageout, unsigned paged) } /* end else */ if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return (unsigned)!pass; } /* check_auto_cache_resize() */ @@ -23403,7 +23418,7 @@ check_auto_cache_resize_disable(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -24090,7 +24105,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -26322,7 +26337,7 @@ check_auto_cache_resize_input_errs(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -26818,7 +26833,7 @@ check_auto_cache_resize_aux_fcns(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -27048,7 +27063,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } /* end else */ if (show_progress) /* 0 */ - HDfprintf(stdout, "\n%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "\n%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { @@ -27069,7 +27084,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 1 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); /* ======================================================================== * ======================================================================== @@ -27132,7 +27147,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 2 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); /* ======================================================================== * ======================================================================== @@ -27202,7 +27217,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 3 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { @@ -27256,7 +27271,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 4 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { @@ -27309,7 +27324,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 5 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); /* ======================================================================== * ======================================================================== @@ -27384,7 +27399,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 6 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { @@ -27455,7 +27470,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 7 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); /* ======================================================================== * ======================================================================== @@ -27514,7 +27529,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 8 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { @@ -27562,7 +27577,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 9 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { @@ -27613,7 +27628,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 10 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { @@ -27659,7 +27674,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 11 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (cache_ptr) { @@ -27669,7 +27684,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) } if (show_progress) /* 12 */ - HDfprintf(stdout, "%s: check point %d -- pass %d\n", FUNC, checkpoint++, pass); + HDfprintf(stdout, "%s: check point %d -- pass %d\n", __func__, checkpoint++, pass); if (pass) { PASSED(); @@ -33629,7 +33644,7 @@ check_entry_deletions_during_scans(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } return (unsigned)!pass; @@ -35040,7 +35055,7 @@ check_stats(unsigned paged) if (!pass) { - HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s(): failure_mssg = \"%s\".\n", __func__, failure_mssg); } #else /* H5C_COLLECT_CACHE_STATS */ @@ -35520,7 +35535,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) hid_t fcpl_id = H5P_DEFAULT; if (show_progress) /* 1 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); saved_fid = -1; @@ -35563,7 +35578,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) } if (show_progress) /* 2 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass && try_core_file_driver) { if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) == FAIL) { @@ -35580,7 +35595,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) core_file_driver_failed = TRUE; if (verbose) - HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", FUNC); + HDfprintf(stdout, "%s: H5Fcreate() with CFD failed.\n", __func__); } else { saved_fapl_id = fapl_id; @@ -35588,7 +35603,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) } if (show_progress) /* 3 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); /* if we either aren't using the core file driver, or a create * with the core file driver failed, try again with a regular file. @@ -35603,7 +35618,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) failure_mssg = "H5Fcreate() failed."; if (verbose) - HDfprintf(stdout, "%s: H5Fcreate() failed.\n", FUNC); + HDfprintf(stdout, "%s: H5Fcreate() failed.\n", __func__); } /* end if */ } /* end if */ @@ -35611,7 +35626,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) H5CX_push(); if (show_progress) /* 4 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { HDassert(fid >= 0); @@ -35621,7 +35636,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) failure_mssg = "H5Fflush() failed."; if (verbose) - HDfprintf(stdout, "%s: H5Fflush() failed.\n", FUNC); + HDfprintf(stdout, "%s: H5Fflush() failed.\n", __func__); } else { file_ptr = (H5F_t *)H5VL_object_verify(fid, H5I_FILE); @@ -35630,13 +35645,13 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) failure_mssg = "Can't get file_ptr."; if (verbose) - HDfprintf(stdout, "%s: H5Fflush() failed.\n", FUNC); + HDfprintf(stdout, "%s: H5Fflush() failed.\n", __func__); } } } if (show_progress) /* 5 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { @@ -35679,7 +35694,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) } if (show_progress) /* 6 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { if (cache_ptr == NULL) { @@ -35687,19 +35702,19 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) failure_mssg = "H5C_create() failed."; if (verbose) - HDfprintf(stdout, "%s: H5C_create() failed.\n", FUNC); + HDfprintf(stdout, "%s: H5C_create() failed.\n", __func__); } else if (cache_ptr->magic != H5C__H5C_T_MAGIC) { pass = FALSE; failure_mssg = "Bad cache_ptr magic."; if (verbose) - HDfprintf(stdout, "%s: Bad cache_ptr magic.\n", FUNC); + HDfprintf(stdout, "%s: Bad cache_ptr magic.\n", __func__); } } if (show_progress) /* 7 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { /* allocate space for test entries */ actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR)); @@ -35709,7 +35724,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) failure_mssg = "H5MF_alloc() failed."; if (verbose) - HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", FUNC); + HDfprintf(stdout, "%s: H5MF_alloc() failed.\n", __func__); } else if (actual_base_addr > BASE_ADDR) { /* If this happens, must increase BASE_ADDR so that the @@ -35720,14 +35735,14 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) failure_mssg = "actual_base_addr > BASE_ADDR"; if (verbose) - HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n", FUNC); + HDfprintf(stdout, "%s: actual_base_addr > BASE_ADDR.\n", __func__); } saved_actual_base_addr = actual_base_addr; } if (show_progress) /* 8 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { /* Need to set this else all cache tests will fail */ @@ -35738,7 +35753,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) } if (show_progress) /* 9 */ - HDfprintf(stdout, "%s() - %0d -- pass = %d\n", FUNC, mile_stone++, (int)pass); + HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); return (ret_val); } /* setup_cache() */ diff --git a/test/cache_api.c b/test/cache_api.c index 5d0f395..7858c65 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -478,7 +478,7 @@ check_fapl_mdc_api_calls(unsigned paged, hid_t fcpl_id) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return pass; @@ -821,7 +821,7 @@ check_file_mdc_api_calls(unsigned paged, hid_t fcpl_id) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return pass; @@ -1463,7 +1463,7 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return pass; @@ -1841,7 +1841,7 @@ check_fapl_mdc_api_errs(void) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return pass; @@ -1894,7 +1894,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: calling h5_fixname().\n", FUNC); + HDfprintf(stdout, "%s: calling h5_fixname().\n", __func__); } if (h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename)) == NULL) { @@ -1908,7 +1908,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: calling H5Fcreate().\n", FUNC); + HDfprintf(stdout, "%s: calling H5Fcreate().\n", __func__); } file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT); @@ -1929,7 +1929,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 1.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 1.\n", __func__); } H5E_BEGIN_TRY @@ -1949,7 +1949,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 2.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 2.\n", __func__); } H5E_BEGIN_TRY @@ -1970,7 +1970,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 3.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fget_mdc_config() 3.\n", __func__); } H5E_BEGIN_TRY @@ -1993,7 +1993,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 1.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 1.\n", __func__); } H5E_BEGIN_TRY @@ -2013,7 +2013,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 2.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fset_mdc_config() 2.\n", __func__); } H5E_BEGIN_TRY @@ -2033,7 +2033,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) while ((pass) && (i < NUM_INVALID_CONFIGS)) { if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fset_mdc_config() with invalid config %d.\n", FUNC, i); + HDfprintf(stdout, "%s: testing H5Fset_mdc_config() with invalid config %d.\n", __func__, i); } H5E_BEGIN_TRY @@ -2061,7 +2061,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 1.\n", __func__); } H5E_BEGIN_TRY @@ -2081,7 +2081,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fget_mdc_hit_rate() 2.\n", __func__); } H5E_BEGIN_TRY @@ -2102,7 +2102,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n", FUNC); + HDfprintf(stdout, "%s: testing H5Freset_mdc_hit_rate_stats().\n", __func__); } H5E_BEGIN_TRY @@ -2123,7 +2123,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 1.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 1.\n", __func__); } H5E_BEGIN_TRY @@ -2143,7 +2143,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 2.\n", FUNC); + HDfprintf(stdout, "%s: testing H5Fget_mdc_size() 2.\n", __func__); } if ((H5Fget_mdc_size(file_id, &max_size, NULL, NULL, NULL) < 0) || @@ -2162,7 +2162,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (show_progress) { - HDfprintf(stdout, "%s: cleaning up from tests.\n", FUNC); + HDfprintf(stdout, "%s: cleaning up from tests.\n", __func__); } if (H5Fclose(file_id) < 0) { @@ -2188,7 +2188,7 @@ check_file_mdc_api_errs(unsigned paged, hid_t fcpl_id) if (!pass) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); } return pass; @@ -2230,26 +2230,26 @@ main(void) invalid_configs = init_invalid_configs(); if (NULL == invalid_configs) { failure_mssg = "Unable to allocate memory for invalid configs."; - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return EXIT_FAILURE; } /* end if */ if ((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0) { failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n"; - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return EXIT_FAILURE; } /* end if */ /* Set file space strategy to default or paged aggregation strategy */ if ((fcpl2_id = H5Pcopy(fcpl_id)) < 0) { failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n"; - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return EXIT_FAILURE; } /* end if */ if (H5Pset_file_space_strategy(fcpl2_id, H5F_FSPACE_STRATEGY_PAGE, 1, (hsize_t)1) < 0) { failure_mssg = "H5Pset_file_space_strategy() failed.\n"; - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return EXIT_FAILURE; } /* end if */ @@ -2282,7 +2282,7 @@ main(void) if (H5Pclose(fcpl_id) < 0) { failure_mssg = "H5Pclose() failed.\n"; - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return EXIT_FAILURE; } /* end if */ diff --git a/test/cache_common.c b/test/cache_common.c index 0ddcbb8..07c70f0 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -2770,7 +2770,7 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_ if (verbose) { - HDfprintf(stdout, "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", FUNC, + HDfprintf(stdout, "%s: unexpected il/is/cis/dis = %lld/%lld/%lld/%lld.\n", __func__, (long long)(cache_ptr->index_len), (long long)(cache_ptr->index_size), (long long)(cache_ptr->clean_index_size), (long long)(cache_ptr->dirty_index_size)); } @@ -3524,7 +3524,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t int32_t local_max_index; if (verbose) - HDfprintf(stdout, "%s(): entering.\n", FUNC); + HDfprintf(stdout, "%s(): entering.\n", __func__); if (pass) { cache_ptr = file_ptr->shared->cache; @@ -3856,7 +3856,7 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h int32_t local_max_index; if (verbose) - HDfprintf(stdout, "%s(): entering.\n", FUNC); + HDfprintf(stdout, "%s(): entering.\n", __func__); if (pass) { @@ -3948,7 +3948,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t int32_t local_max_index; if (verbose) - HDfprintf(stdout, "%s(): Entering.\n", FUNC); + HDfprintf(stdout, "%s(): Entering.\n", __func__); if (pass) { @@ -4208,7 +4208,7 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, int32_t local_max_index; if (verbose) - HDfprintf(stdout, "%s(): entering.\n", FUNC); + HDfprintf(stdout, "%s(): entering.\n", __func__); if (pass) { @@ -4299,7 +4299,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t int32_t local_max_index[NUMBER_OF_ENTRY_TYPES]; if (verbose) - HDfprintf(stdout, "%s: entering.\n", FUNC); + HDfprintf(stdout, "%s: entering.\n", __func__); if (pass) { int i; @@ -4393,7 +4393,7 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h int32_t local_max_index; if (verbose) - HDfprintf(stdout, "%s: entering.\n", FUNC); + HDfprintf(stdout, "%s: entering.\n", __func__); if (pass) { @@ -4495,7 +4495,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t int32_t local_max_index[NUMBER_OF_ENTRY_TYPES] = {0}; if (verbose) - HDfprintf(stdout, "%s: entering.\n", FUNC); + HDfprintf(stdout, "%s: entering.\n", __func__); if (pass) { int i; @@ -4518,7 +4518,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t idx = local_max_index[NUMBER_OF_ENTRY_TYPES - 1] + lag; if (verbose) /* 1 */ - HDfprintf(stdout, "%s: point %d.\n", FUNC, mile_stone++); + HDfprintf(stdout, "%s: point %d.\n", __func__, mile_stone++); while ((pass) && ((idx + lag) >= 0)) { type = NUMBER_OF_ENTRY_TYPES - 1; @@ -4560,7 +4560,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t } if (verbose) /* 2 */ - HDfprintf(stdout, "%s: point %d.\n", FUNC, mile_stone++); + HDfprintf(stdout, "%s: point %d.\n", __func__, mile_stone++); if ((pass) && (display_stats)) { @@ -4568,7 +4568,7 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t } if (verbose) - HDfprintf(stdout, "%s: exiting.\n", FUNC); + HDfprintf(stdout, "%s: exiting.\n", __func__); } /* col_major_scan_backward() */ @@ -4600,7 +4600,7 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, int32_t local_max_index = -1; if (verbose) - HDfprintf(stdout, "%s: entering.\n", FUNC); + HDfprintf(stdout, "%s: entering.\n", __func__); if (pass) { diff --git a/test/cache_image.c b/test/cache_image.c index 40d6f05..4967066 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -1473,7 +1473,7 @@ check_cache_image_ctl_flow_1(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -1719,7 +1719,7 @@ check_cache_image_ctl_flow_2(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -2093,7 +2093,7 @@ check_cache_image_ctl_flow_3(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -2429,7 +2429,7 @@ check_cache_image_ctl_flow_4(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -2718,7 +2718,7 @@ check_cache_image_ctl_flow_5(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -2969,7 +2969,7 @@ check_cache_image_ctl_flow_6(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -3418,7 +3418,7 @@ cache_image_smoke_check_1(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -3694,7 +3694,7 @@ cache_image_smoke_check_2(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -4082,7 +4082,7 @@ cache_image_smoke_check_3(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -4461,7 +4461,7 @@ cache_image_smoke_check_4(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; } /* cache_image_smoke_check_4() */ @@ -4965,7 +4965,7 @@ cache_image_smoke_check_5(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -5382,7 +5382,7 @@ cache_image_smoke_check_6(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -5738,7 +5738,7 @@ cache_image_api_error_check_1(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -6166,7 +6166,7 @@ cache_image_api_error_check_2(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -6421,7 +6421,7 @@ cache_image_api_error_check_3(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -6978,7 +6978,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -7436,7 +7436,7 @@ get_free_sections_test(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; @@ -7809,7 +7809,7 @@ evict_on_close_test(hbool_t single_file_vfd) } if (!pass) - HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", FUNC, failure_mssg); + HDfprintf(stdout, "%s: failure_mssg = \"%s\".\n", __func__, failure_mssg); return !pass; #endif /* H5_HAVE_PARALLEL */ diff --git a/test/h5test.h b/test/h5test.h index 89e30da..16fb33c 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -89,7 +89,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */ /* * Print the current location on the standard output stream. */ -#define AT() HDprintf(" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); +#define AT() HDprintf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); /* * The name of the test is printed by saying TESTING("something") which will diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index 5840a98..b1ca00f 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -29,15 +29,6 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_id_g; H5TOOLS_DLLVAR hid_t H5E_tools_min_info_id_g; H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; -/* Use FUNC to safely handle variations of C99 __func__ keyword handling */ -#ifdef H5_HAVE_C99_FUNC -#define FUNC __func__ -#elif defined(H5_HAVE_FUNCTION) -#define FUNC __FUNCTION__ -#else -#error "We need __func__ or __FUNCTION__ to test function names!" -#endif - /* * H5TOOLS_INIT_ERROR macro, used to initialize error reporting. */ @@ -105,7 +96,8 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; do { \ if (enable_error_stack > 0) { \ if (estack_id >= 0 && err_cls >= 0) \ - H5Epush2(estack_id, __FILE__, FUNC, __LINE__, err_cls, maj_err_id, min_err_id, __VA_ARGS__); \ + H5Epush2(estack_id, __FILE__, __func__, __LINE__, err_cls, maj_err_id, min_err_id, \ + __VA_ARGS__); \ else { \ HDfprintf(stderr, __VA_ARGS__); \ HDfprintf(stderr, "\n"); \ @@ -175,7 +167,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; #define H5TOOLS_START_DEBUG(...) \ do { \ H5tools_INDENT_g += 2; \ - HDfprintf(stderr, "%*sENTER %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, FUNC); \ + HDfprintf(stderr, "%*sENTER %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \ HDfprintf(stderr, __VA_ARGS__); \ HDfprintf(stderr, "\n"); \ HDfflush(stderr); \ @@ -183,7 +175,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; #define H5TOOLS_DEBUG(...) \ do { \ - HDfprintf(stderr, "%*s %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, FUNC); \ + HDfprintf(stderr, "%*s %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \ HDfprintf(stderr, __VA_ARGS__); \ HDfprintf(stderr, "\n"); \ HDfflush(stderr); \ @@ -191,7 +183,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; #define H5TOOLS_ENDDEBUG(...) \ do { \ - HDfprintf(stderr, "%*sEXIT %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, FUNC); \ + HDfprintf(stderr, "%*sEXIT %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \ HDfprintf(stderr, __VA_ARGS__); \ HDfprintf(stderr, "\n"); \ H5tools_INDENT_g -= 2; \ diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c index 429ad42..6898839 100644 --- a/tools/test/h5copy/h5copygentest.c +++ b/tools/test/h5copy/h5copygentest.c @@ -513,21 +513,21 @@ gen_obj_ref(hid_t loc_id) * add dataset */ sid = H5Screate_simple(1, dims1, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } oid = H5Dcreate2(loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -539,7 +539,7 @@ gen_obj_ref(hid_t loc_id) * add group */ oid = H5Gcreate2(loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -547,34 +547,34 @@ gen_obj_ref(hid_t loc_id) status = H5Rcreate(&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Rcreate(&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } sid = H5Screate_simple(1, dims2, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -613,7 +613,7 @@ gen_region_ref(hid_t loc_id) sid = H5Screate_simple(2, dims2, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -621,7 +621,7 @@ gen_region_ref(hid_t loc_id) /* create normal dataset which is refered */ oid2 = H5Dcreate2(loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid2 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -629,7 +629,7 @@ gen_region_ref(hid_t loc_id) /* write values to dataset */ status = H5Dwrite(oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -637,7 +637,7 @@ gen_region_ref(hid_t loc_id) /* select elements space for reference */ status = H5Sselect_elements(sid, H5S_SELECT_SET, 4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -645,7 +645,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from elements space */ status = H5Rcreate(&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -653,7 +653,7 @@ gen_region_ref(hid_t loc_id) /* select hyperslab space for reference */ status = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -661,7 +661,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from hyperslab space */ status = H5Rcreate(&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -671,7 +671,7 @@ gen_region_ref(hid_t loc_id) /* Create dataspace. */ sid = H5Screate_simple(1, dims1, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -679,7 +679,7 @@ gen_region_ref(hid_t loc_id) /* create region reference dataset */ oid1 = H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid1 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -687,7 +687,7 @@ gen_region_ref(hid_t loc_id) /* write data as region references */ status = H5Dwrite(oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -816,7 +816,7 @@ gen_extlink_trg(hid_t loc_id) * target file */ gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -831,7 +831,7 @@ gen_extlink_trg(hid_t loc_id) tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -864,7 +864,7 @@ gen_extlink_src(hid_t loc_id) *------------------------------------------------------------------------*/ gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -875,7 +875,7 @@ gen_extlink_src(hid_t loc_id) /* link to dataset */ status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -883,7 +883,7 @@ gen_extlink_src(hid_t loc_id) /* link to group */ status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -892,7 +892,7 @@ gen_extlink_src(hid_t loc_id) status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -900,7 +900,7 @@ gen_extlink_src(hid_t loc_id) /* dangling link - no obj*/ status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -908,7 +908,7 @@ gen_extlink_src(hid_t loc_id) /* dangling link - no file */ status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__); ret = FAIL; goto out; } diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index f03254e..118a3a7 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -112,7 +112,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024); #define SPACE1_DIM2 0 /* Error macros */ -#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); +#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); #define PROGRAM_ERROR \ do { \ AT(); \ diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index 3396217..acad74e 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -6058,7 +6058,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* ref to dset */ status = H5Rcreate(&data_attr_objref[0], file_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6066,7 +6066,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* ref to group */ status = H5Rcreate(&data_attr_objref[1], file_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6074,7 +6074,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* ref to datatype */ status = H5Rcreate(&data_attr_objref[2], file_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6082,7 +6082,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id) /* create attr with obj ref type */ status = make_attr(obj_id, 1, dim_attr_objref, "Attr_OBJREF", H5T_STD_REF_OBJ, data_attr_objref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6122,7 +6122,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) */ sid_regrefed_dset = H5Screate_simple(2, dim_regrefed_dset, NULL); if (sid_regrefed_dset < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6130,7 +6130,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) /* select elements space for reference */ status = H5Sselect_elements(sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6138,7 +6138,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) /* create region reference from elements space */ status = H5Rcreate(&data_attr_regref[0], file_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_regrefed_dset); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6146,7 +6146,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id) /* create attr with region ref type */ status = make_attr(obj_id, 1, dim_attr_regref, "Attr_REGREF", H5T_STD_REF_DSETREG, data_attr_regref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6191,21 +6191,21 @@ gen_refered_objs(hid_t loc_id) */ sid = H5Screate_simple(1, dims1, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } did1 = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (did1 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6216,7 +6216,7 @@ gen_refered_objs(hid_t loc_id) */ gid = H5Gcreate2(loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6228,7 +6228,7 @@ gen_refered_objs(hid_t loc_id) tid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6239,7 +6239,7 @@ gen_refered_objs(hid_t loc_id) */ sid2 = H5Screate_simple(2, dims2, NULL); if (sid2 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6247,7 +6247,7 @@ gen_refered_objs(hid_t loc_id) /* create normal dataset which is refered */ did2 = H5Dcreate2(loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (did2 < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6255,7 +6255,7 @@ gen_refered_objs(hid_t loc_id) /* write values to dataset */ status = H5Dwrite(did2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6311,7 +6311,7 @@ gen_obj_ref(hid_t loc_id) /* obj ref to dataset */ status = H5Rcreate(&objref_buf[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6319,7 +6319,7 @@ gen_obj_ref(hid_t loc_id) /* obj ref to group */ status = H5Rcreate(&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6327,7 +6327,7 @@ gen_obj_ref(hid_t loc_id) /* obj ref to named-datatype */ status = H5Rcreate(&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6337,21 +6337,21 @@ gen_obj_ref(hid_t loc_id) */ sid = H5Screate_simple(1, dims_dset_objref, NULL); if (sid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6363,7 +6363,7 @@ gen_obj_ref(hid_t loc_id) /* add attribute with obj ref */ status = add_attr_with_objref(loc_id, oid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6371,7 +6371,7 @@ gen_obj_ref(hid_t loc_id) /* add attribute with region ref */ status = add_attr_with_regref(loc_id, oid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6423,7 +6423,7 @@ gen_region_ref(hid_t loc_id) sid_trg = H5Screate_simple(2, dims_trg, NULL); if (sid_trg < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6431,7 +6431,7 @@ gen_region_ref(hid_t loc_id) /* select elements space for reference */ status = H5Sselect_elements(sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6439,7 +6439,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from elements space */ status = H5Rcreate(&rr_data[0], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6447,7 +6447,7 @@ gen_region_ref(hid_t loc_id) /* select hyperslab space for reference */ status = H5Sselect_hyperslab(sid_trg, H5S_SELECT_SET, start, stride, count, block); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6455,7 +6455,7 @@ gen_region_ref(hid_t loc_id) /* create region reference from hyperslab space */ status = H5Rcreate(&rr_data[1], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6463,7 +6463,7 @@ gen_region_ref(hid_t loc_id) /* Create dataspace. */ sid_ref = H5Screate_simple(1, dims1, NULL); if (sid_ref < 0) { - HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6472,7 +6472,7 @@ gen_region_ref(hid_t loc_id) oid_ref = H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid_ref, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (oid_ref < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6480,7 +6480,7 @@ gen_region_ref(hid_t loc_id) /* write data as region references */ status = H5Dwrite(oid_ref, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6492,7 +6492,7 @@ gen_region_ref(hid_t loc_id) /* add attribute with obj ref */ status = add_attr_with_objref(loc_id, oid_ref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6500,7 +6500,7 @@ gen_region_ref(hid_t loc_id) /* add attribute with region ref */ status = add_attr_with_regref(loc_id, oid_ref); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6667,7 +6667,7 @@ make_complex_attr_references(hid_t loc_id) objdid = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, objsid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(objdid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6676,7 +6676,7 @@ make_complex_attr_references(hid_t loc_id) objtid = H5Tcopy(H5T_NATIVE_INT); status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, objtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6687,7 +6687,7 @@ make_complex_attr_references(hid_t loc_id) * compound type which contain obj and region reference */ main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (main_gid < 0) { - HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6702,7 +6702,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6725,7 +6725,7 @@ make_complex_attr_references(hid_t loc_id) /* references to dataset */ status = H5Rcreate(&(comp_objref_data[0].val_objref), loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6734,7 +6734,7 @@ make_complex_attr_references(hid_t loc_id) /* references to group */ status = H5Rcreate(&(comp_objref_data[1].val_objref), loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6743,7 +6743,7 @@ make_complex_attr_references(hid_t loc_id) /* references to datatype */ status = H5Rcreate(&(comp_objref_data[2].val_objref), loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6757,7 +6757,7 @@ make_complex_attr_references(hid_t loc_id) H5Acreate2(main_did, "Comp_OBJREF", comp_objref_tid, comp_objref_attr_sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(comp_objref_aid, comp_objref_tid, comp_objref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6778,13 +6778,13 @@ make_complex_attr_references(hid_t loc_id) */ status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Rcreate(&(comp_regref_data[0].val_regref), loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6798,7 +6798,7 @@ make_complex_attr_references(hid_t loc_id) H5Acreate2(main_did, "Comp_REGREF", comp_regref_tid, comp_regref_attr_sid, H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(comp_regref_aid, comp_regref_tid, comp_regref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6823,7 +6823,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Rcreate(&((hobj_ref_t *)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6831,7 +6831,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Rcreate(&((hobj_ref_t *)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6839,7 +6839,7 @@ make_complex_attr_references(hid_t loc_id) status = H5Rcreate(&((hobj_ref_t *)vlen_objref_data[2].p)[0], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6857,7 +6857,7 @@ make_complex_attr_references(hid_t loc_id) H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6865,7 +6865,7 @@ make_complex_attr_references(hid_t loc_id) /* close resource for vlen data */ status = H5Treclaim(vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6885,14 +6885,14 @@ make_complex_attr_references(hid_t loc_id) */ status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__); ret = FAIL; goto out; } status = H5Rcreate(&((hdset_reg_ref_t *)vlen_regref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6910,7 +6910,7 @@ make_complex_attr_references(hid_t loc_id) H5P_DEFAULT, H5P_DEFAULT); status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__); ret = FAIL; goto out; } @@ -6918,7 +6918,7 @@ make_complex_attr_references(hid_t loc_id) /* close resource for vlen data */ status = H5Treclaim(vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data); if (status < 0) { - HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__); ret = FAIL; goto out; } diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h index bfa1ed9..d84d545 100644 --- a/tools/test/misc/vds/UC_common.h +++ b/tools/test/misc/vds/UC_common.h @@ -14,15 +14,6 @@ #ifndef USE_CASE_COMMON_H #define USE_CASE_COMMON_H -/* Use FUNC to safely handle variations of C99 __func__ keyword handling */ -#ifdef H5_HAVE_C99_FUNC -#define FUNC __func__ -#elif defined(H5_HAVE_FUNCTION) -#define FUNC __FUNCTION__ -#else -#error "We need __func__ or __FUNCTION__ to test function names!" -#endif - /****************************************** * Symbols used across multiple use cases * ******************************************/ @@ -41,7 +32,7 @@ #define FALSE 0 /* Testing macros */ -#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC); +#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); #define UC_ERROR \ { \ puts("*ERROR*"); \ -- cgit v0.12