From 9aae67b9bf2af8809d61892ba95b0d478da69bd5 Mon Sep 17 00:00:00 2001 From: Matthew Larson Date: Tue, 21 Feb 2023 11:09:18 -0600 Subject: [PATCH] Remove obsolete equivalents of __func__ See https://github.com/HDFGroup/hdf5/pull/800 --- src/util/rest_vol_err.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/util/rest_vol_err.h b/src/util/rest_vol_err.h index 43d8cf65..daca25b2 100644 --- a/src/util/rest_vol_err.h +++ b/src/util/rest_vol_err.h @@ -59,16 +59,6 @@ extern hid_t H5_rest_attr_table_iter_err_min_g; #define TRUE true #endif -/* 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 - - /* Error Macros */ #ifdef H5_NO_DEPRECATED_SYMBOLS @@ -85,7 +75,7 @@ do { (void)H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); \ if (err_func) { \ if (H5_rest_err_stack_g >= 0 && H5_rest_err_class_g >= 0) { \ - H5Epush2(H5_rest_err_stack_g, __FILE__, FUNC, __LINE__, \ + H5Epush2(H5_rest_err_stack_g, __FILE__,__func__, __LINE__, \ H5_rest_err_class_g, err_major, err_minor, __VA_ARGS__); \ } \ else { \ @@ -113,7 +103,7 @@ do { (void)H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); \ if (err_func) { \ if (H5_rest_err_stack_g >= 0 && H5_rest_err_class_g >= 0) \ - H5Epush2(H5_rest_err_stack_g, __FILE__, FUNC, __LINE__, \ + H5Epush2(H5_rest_err_stack_g, __FILE__,__func__, __LINE__, \ H5_rest_err_class_g, err_major, err_minor, __VA_ARGS__); \ else { \ fprintf(stderr, __VA_ARGS__); \ @@ -169,7 +159,7 @@ do { if ( (is_v2_err && err_func.err_func_v2) || \ (!is_v2_err && err_func.err_func_v1) ) { \ if (H5_rest_err_stack_g >= 0 && H5_rest_err_class_g >= 0) { \ - H5Epush2(H5_rest_err_stack_g, __FILE__, FUNC, __LINE__, \ + H5Epush2(H5_rest_err_stack_g, __FILE__,__func__, __LINE__, \ H5_rest_err_class_g, err_major, err_minor, __VA_ARGS__); \ } \ else { \ @@ -210,7 +200,7 @@ do { if ( (is_v2_err && err_func.err_func_v2) || \ (!is_v2_err && err_func.err_func_v1) ) { \ if (H5_rest_err_stack_g >= 0 && H5_rest_err_class_g >= 0) { \ - H5Epush2(H5_rest_err_stack_g, __FILE__, FUNC, __LINE__, \ + H5Epush2(H5_rest_err_stack_g, __FILE__,__func__, __LINE__, \ H5_rest_err_class_g, err_major, err_minor, __VA_ARGS__); \ } \ else { \