summaryrefslogtreecommitdiffstats
path: root/bin/make_vers
diff options
context:
space:
mode:
Diffstat (limited to 'bin/make_vers')
-rwxr-xr-xbin/make_vers34
1 files changed, 25 insertions, 9 deletions
diff --git a/bin/make_vers b/bin/make_vers
index c6d2c04..7154dfb 100755
--- a/bin/make_vers
+++ b/bin/make_vers
@@ -90,7 +90,8 @@ sub print_checkoptions ($) {
my $curr_idx; # Current API version index
# Print the option checking
- print $fh "\n/* Issue error if contradicting macros have been defined. */\n";
+ print $fh "\n\n/* Issue error if contradicting macros have been defined. */\n";
+ print $fh "/* (Can't use an older (deprecated) API version if deprecated symbols have been disabled) */\n";
# Print the #ifdef
print $fh "#if (";
@@ -119,26 +120,40 @@ sub print_checkoptions ($) {
##############################################################################
# Print "global" API version macro settings
#
-sub print_globalapivers ($) {
+sub print_globalapidefvers ($) {
my $fh = shift; # File handle for output file
my $curr_idx; # Current API version index
# Print the descriptive comment
- print $fh "\n\n/* If a particular \"global\" version of the library's interfaces is chosen,\n";
- print $fh " * set the versions for the API symbols affected.\n";
+ print $fh "\n\n/* If a particular default \"global\" version of the library's interfaces is\n";
+ print $fh " * chosen, set the corresponding version macro for API symbols.\n";
print $fh " *\n";
- print $fh " * Note: If an application has already chosen a particular version for an\n";
- print $fh " * API symbol, the individual API version macro takes priority.\n";
print $fh " */\n";
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
# Print API version ifdef
- print $fh "#if defined(H5_USE_1", ($curr_idx * 2), "_API_DEFAULT) && !defined(H5_USE_1", ($curr_idx * 2), "_API)\n";
+ print $fh "\n#if defined(H5_USE_1", ($curr_idx * 2), "_API_DEFAULT) && !defined(H5_USE_1", ($curr_idx * 2), "_API)\n";
# Print API version definition
print $fh " " x $indent, "#define H5_USE_1", ($curr_idx * 2), "_API 1\n";
# Print API version endif
- print $fh "#endif /* H5_USE_1", ($curr_idx * 2), "_API_DEFAULT && !H5_USE_1", ($curr_idx * 2), "_API */\n\n";
+ print $fh "#endif /* H5_USE_1", ($curr_idx * 2), "_API_DEFAULT && !H5_USE_1", ($curr_idx * 2), "_API */\n";
}
+}
+
+##############################################################################
+# Print "global" API symbol version macro settings
+#
+sub print_globalapisymbolvers ($) {
+ my $fh = shift; # File handle for output file
+ my $curr_idx; # Current API version index
+
+ # Print the descriptive comment
+ print $fh "\n\n/* If a particular \"global\" version of the library's interfaces is chosen,\n";
+ print $fh " * set the versions for the API symbols affected.\n";
+ print $fh " *\n";
+ print $fh " * Note: If an application has already chosen a particular version for an\n";
+ print $fh " * API symbol, the individual API version macro takes priority.\n";
+ print $fh " */\n";
# Loop over supported older library APIs and define the appropriate macros
for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
@@ -444,8 +459,9 @@ sub create_public ($) {
print_copyright(*HEADER);
print_warning(*HEADER);
print_startprotect(*HEADER, $file);
+ print_globalapidefvers(*HEADER);
print_checkoptions(*HEADER);
- print_globalapivers(*HEADER);
+ print_globalapisymbolvers(*HEADER);
print_defaultapivers(*HEADER);
print_endprotect(*HEADER, $file);