Skip to content

Commit

Permalink
Fix for no deprecated symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Dec 8, 2024
1 parent 4145a4c commit aec8468
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions bin/make_vers
Original file line number Diff line number Diff line change
Expand Up @@ -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 " || ";
}
}
Expand All @@ -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 " || ";
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/H5version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit aec8468

Please sign in to comment.