From aec84684b60ec1a4de82a124bd57fea16b822d22 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sun, 8 Dec 2024 04:19:22 -0800 Subject: [PATCH] Fix for no deprecated symbols --- bin/make_vers | 13 +++++++------ src/H5version.h | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/make_vers b/bin/make_vers index 547543596a9..b286bbb2f79 100755 --- a/bin/make_vers +++ b/bin/make_vers @@ -121,11 +121,12 @@ sub print_checkoptions ($) { # Print the #ifdef print $fh "#if ("; $curr_idx = 0; - foreach my $api_vers (@versions) { - print $fh "defined(H5_USE_", $api_vers, "_API)"; + for my $i (0 .. $#versions - 1) { + + print $fh "defined(H5_USE_", $versions[$i], "_API)"; $curr_idx++; - if ($curr_idx < @versions) { + if ($curr_idx < @versions - 1) { print $fh " || "; } } @@ -137,11 +138,11 @@ sub print_checkoptions ($) { # Print the #endif print $fh "#endif /* ("; $curr_idx = 0; - foreach my $api_vers (@versions) { - print $fh "defined(H5_USE_", $api_vers, "_API)"; + for my $i (0 .. $#versions - 1) { + print $fh "defined(H5_USE_", $versions[$i], "_API)"; $curr_idx++; - if ($curr_idx < @versions) { + if ($curr_idx < @versions - 1) { print $fh " || "; } } diff --git a/src/H5version.h b/src/H5version.h index 7c9b3e63c21..9fe80159695 100644 --- a/src/H5version.h +++ b/src/H5version.h @@ -50,9 +50,9 @@ /* Issue error if contradicting macros have been defined. */ /* (Can't use an older (deprecated) API version if deprecated symbols have been disabled) */ -#if (defined(H5_USE_16_API) || defined(H5_USE_18_API) || defined(H5_USE_110_API) || defined(H5_USE_112_API) || defined(H5_USE_114_API) || defined(H5_USE_200_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) +#if (defined(H5_USE_16_API) || defined(H5_USE_18_API) || defined(H5_USE_110_API) || defined(H5_USE_112_API) || defined(H5_USE_114_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) #error "Can't choose old API versions when deprecated APIs are disabled" -#endif /* (defined(H5_USE_16_API) || defined(H5_USE_18_API) || defined(H5_USE_110_API) || defined(H5_USE_112_API) || defined(H5_USE_114_API) || defined(H5_USE_200_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) */ +#endif /* (defined(H5_USE_16_API) || defined(H5_USE_18_API) || defined(H5_USE_110_API) || defined(H5_USE_112_API) || defined(H5_USE_114_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) */ /* If a particular "global" version of the library's interfaces is chosen,