diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-06-29 04:58:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 04:58:38 (GMT) |
commit | 734d317da9c759799c92ff47e05e3be7e3e969a9 (patch) | |
tree | f928e0c17e91b9a1124ee9e4b0217a1b4fe68b17 /src | |
parent | 5ddfbc2a736f7f4cc8b109ee3f3e53c4655dbec1 (diff) | |
download | hdf5-734d317da9c759799c92ff47e05e3be7e3e969a9.zip hdf5-734d317da9c759799c92ff47e05e3be7e3e969a9.tar.gz hdf5-734d317da9c759799c92ff47e05e3be7e3e969a9.tar.bz2 |
Removes obsolete equivalents of C99's __func__ (#800)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5A.c | 24 | ||||
-rw-r--r-- | src/H5D.c | 14 | ||||
-rw-r--r-- | src/H5Eprivate.h | 2 | ||||
-rw-r--r-- | src/H5F.c | 16 | ||||
-rw-r--r-- | src/H5FDsplitter.c | 80 | ||||
-rw-r--r-- | src/H5G.c | 12 | ||||
-rw-r--r-- | src/H5HF.c | 12 | ||||
-rw-r--r-- | src/H5HFdbg.c | 2 | ||||
-rw-r--r-- | src/H5HFdblock.c | 2 | ||||
-rw-r--r-- | src/H5L.c | 12 | ||||
-rw-r--r-- | src/H5M.c | 10 | ||||
-rw-r--r-- | src/H5O.c | 14 | ||||
-rw-r--r-- | src/H5R.c | 6 | ||||
-rw-r--r-- | src/H5T.c | 2 | ||||
-rw-r--r-- | src/H5Tcommit.c | 4 | ||||
-rw-r--r-- | src/H5VLcallback.c | 14 | ||||
-rw-r--r-- | src/H5private.h | 90 |
17 files changed, 155 insertions, 161 deletions
@@ -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") @@ -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 @@ -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); @@ -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") @@ -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 */ @@ -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") @@ -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") @@ -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") @@ -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, @@ -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) { |