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 /tools/lib | |
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 'tools/lib')
-rw-r--r-- | tools/lib/h5tools_error.h | 18 |
1 files changed, 5 insertions, 13 deletions
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; \ |