summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2020-02-21 20:30:34 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2020-02-21 20:30:34 (GMT)
commit51b8c63864c72de9a7b40c00673fe07510fec27e (patch)
tree298e9a2584860a24f55d2bce1fc60faed2bef2dd /bin
parentc4f785bc93c5f4e8677b325c321e0f9ed41c3baa (diff)
parentc5ab2285639a801f87a77987db1a0b609a020314 (diff)
downloadhdf5-51b8c63864c72de9a7b40c00673fe07510fec27e.zip
hdf5-51b8c63864c72de9a7b40c00673fe07510fec27e.tar.gz
hdf5-51b8c63864c72de9a7b40c00673fe07510fec27e.tar.bz2
Merge develop
Diffstat (limited to 'bin')
-rwxr-xr-xbin/checkapi4
-rwxr-xr-xbin/checkposix3
-rwxr-xr-xbin/debug-ohdr2
-rwxr-xr-xbin/dependencies4
-rwxr-xr-xbin/distdep5
-rwxr-xr-xbin/errors3
-rw-r--r--bin/h5cc.in7
-rwxr-xr-xbin/iostats2
-rwxr-xr-xbin/make_err3
-rwxr-xr-xbin/make_overflow3
-rwxr-xr-xbin/make_vers53
-rwxr-xr-xbin/runbkgprog3
-rwxr-xr-xbin/trace37
-rwxr-xr-xbin/warnhist22
14 files changed, 113 insertions, 38 deletions
diff --git a/bin/checkapi b/bin/checkapi
index 6882dea..f5dcacc 100755
--- a/bin/checkapi
+++ b/bin/checkapi
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -13,6 +13,8 @@
#
require 5.003;
+use warnings;
+
# Purpose: insures that API functions aren't called internally.
# Usage: checkapi H5*.c
my $filename = "";
diff --git a/bin/checkposix b/bin/checkposix
index 30128e3..233d15c 100755
--- a/bin/checkposix
+++ b/bin/checkposix
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
+use warnings;
#
# Copyright by The HDF Group.
diff --git a/bin/debug-ohdr b/bin/debug-ohdr
index 5b0a4b3..1363456 100755
--- a/bin/debug-ohdr
+++ b/bin/debug-ohdr
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
diff --git a/bin/dependencies b/bin/dependencies
index 82247da..367351a 100755
--- a/bin/dependencies
+++ b/bin/dependencies
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -11,6 +11,8 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+use warnings;
+
my $depend_file;
my $new_depend_file;
my $srcdir;
diff --git a/bin/distdep b/bin/distdep
index 4643700..cd310e0 100755
--- a/bin/distdep
+++ b/bin/distdep
@@ -1,4 +1,7 @@
-#!/usr/bin/perl -p
+#!/bin/sh
+#! -*-perl-*-
+eval 'exec perl -p -x -S $0 ${1+"$@"}'
+ if 0;
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
diff --git a/bin/errors b/bin/errors
index 3c99fdc..107bb9c 100755
--- a/bin/errors
+++ b/bin/errors
@@ -1,5 +1,6 @@
-#!/usr/local/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
+use warnings;
use Text::Tabs;
# NOTE: THE FORMAT OF HRETURN_ERROR AND HGOTO_ERROR MACROS HAS
diff --git a/bin/h5cc.in b/bin/h5cc.in
index 9c4e3ca..d6b7a12 100644
--- a/bin/h5cc.in
+++ b/bin/h5cc.in
@@ -121,13 +121,6 @@ usage() {
echo " -echo Show all the shell commands executed"
echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/"
echo " subdirectories [default: $prefix]"
- # A wonderfully informative "usage" message.
- echo "usage: $prog_name [OPTIONS] <compile line>"
- echo " OPTIONS:"
- echo " -help This help message."
- echo " -echo Show all the shell commands executed"
- echo " -prefix=DIR Prefix directory to find HDF5 lib/ and include/"
- echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built"
diff --git a/bin/iostats b/bin/iostats
index f054b9c..e389992 100755
--- a/bin/iostats
+++ b/bin/iostats
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
diff --git a/bin/make_err b/bin/make_err
index 623c1b6..7f38591 100755
--- a/bin/make_err
+++ b/bin/make_err
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
$indent=4;
+use warnings;
#
# Copyright by The HDF Group.
diff --git a/bin/make_overflow b/bin/make_overflow
index ccd640e..cee0126 100755
--- a/bin/make_overflow
+++ b/bin/make_overflow
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
use strict;
+use warnings;
# Global settings
diff --git a/bin/make_vers b/bin/make_vers
index 1ea1402..74b0ae2 100755
--- a/bin/make_vers
+++ b/bin/make_vers
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
+use warnings;
# Global settings
# (The max_idx parameter is the only thing that needs to be changed when adding
@@ -89,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 (";
@@ -118,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)) {
@@ -338,7 +354,18 @@ sub parse_line ($) {
my $vers_idx; # Index of version in array
# Do some validation on the input
- if(!( $_ =~ /v1[02468]/ || $_ =~ /v11[02468]/ )) {
+ # Note: v111 is allowed because H5O functions were prematurely versioned
+ # in HDF5 1.10. Because users were affected by this, the versioning
+ # was rescinded but the H5O version 2 functions were kept to be
+ # called directly. Now that the version macros are added in 1.12,
+ # along with a 3rd version of the H5O functions, the H5O function
+ # version for default api=v110 should be version 1 to work correctly
+ # with 1.10 applications that were using unversioned H5O functions,
+ # and the H5O function version should be version 3 for default api=v112
+ # (the default api version for 1.12). Allowing a v111 entry and
+ # incrementing its index 13 lines below allows a version 2 that is
+ # never accessed via the H5O function macros.
+ if(!( $_ =~ /v1[02468]/ || $_ =~ /v11[02468]/ || $_ =~ /v111/ )) {
die "bad version information: $name";
}
if(exists($sym_versions{$_})) {
@@ -351,6 +378,9 @@ sub parse_line ($) {
#print "parse_line: _=$_\n";
# Get the index of the version
($vers_idx) = ($_ =~ /v1(\d+)/);
+ if($vers_idx == 11) {
+ $vers_idx++;
+ }
$vers_idx /= 2;
#print "parse_line: vers_idx='$vers_idx'\n";
push(@vers_nums, $vers_idx);
@@ -443,8 +473,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);
diff --git a/bin/runbkgprog b/bin/runbkgprog
index 69fa2d0..f04ea89 100755
--- a/bin/runbkgprog
+++ b/bin/runbkgprog
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
+use warnings;
$indent=4;
#
diff --git a/bin/trace b/bin/trace
index 54b6f8f..de6a83f 100755
--- a/bin/trace
+++ b/bin/trace
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
##
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -12,6 +12,7 @@
# help@hdfgroup.org.
##
require 5.003;
+use warnings;
$Source = "";
##############################################################################
@@ -70,6 +71,7 @@ $Source = "";
"uint32_t" => "Iu",
"uint64_t" => "UL",
"H5I_type_t" => "It",
+ "H5O_token_t" => "k",
"H5G_link_t" => "Ll", #Same as H5L_type_t now
"H5L_type_t" => "Ll",
"MPI_Comm" => "Mc",
@@ -78,7 +80,9 @@ $Source = "";
"off_t" => "o",
"H5O_type_t" => "Ot",
"H5P_class_t" => "p",
- "hobj_ref_t" => "r",
+ "hobj_ref_t" => "Ro",
+ "hdset_reg_ref_t" => "Rd",
+ "H5R_ref_t" => "Rr",
"H5R_type_t" => "Rt",
"char" => "s",
"unsigned char" => "s",
@@ -97,23 +101,35 @@ $Source = "";
"H5T_str_t" => "Tz",
"unsigned long" => "Ul",
"unsigned long long" => "UL",
+ "H5VL_subclass_t" => "VS",
+ "H5VL_get_conn_lvl_t" => "VL",
"H5VL_attr_get_t" => "Va",
+ "H5VL_attr_optional_t" => "Vs",
"H5VL_attr_specific_t" => "Vb",
+ "H5VL_blob_specific_t" => "VB",
"H5VL_class_value_t" => "VC",
"H5VL_dataset_get_t" => "Vc",
"H5VL_dataset_specific_t" => "Vd",
+ "H5VL_dataset_optional_t" => "Vt",
"H5VL_datatype_get_t" => "Ve",
"H5VL_datatype_specific_t" => "Vf",
+ "H5VL_datatype_optional_t" => "Vu",
"H5VL_file_get_t" => "Vg",
"H5VL_file_specific_t" => "Vh",
+ "H5VL_file_optional_t" => "Vv",
"H5VL_group_get_t" => "Vi",
"H5VL_group_specific_t" => "Vj",
+ "H5VL_group_optional_t" => "Vw",
"H5VL_link_create_type_t" => "Vk",
"H5VL_link_get_t" => "Vl",
"H5VL_link_specific_t" => "Vm",
+ "H5VL_link_optional_t" => "Vx",
"H5VL_object_get_t" => "Vn",
"H5VL_object_specific_t" => "Vo",
+ "H5VL_object_optional_t" => "Vy",
"H5VL_request_specific_t" => "Vr",
+ "H5VL_request_optional_t" => "Vz",
+ "H5VL_blob_optional_t" => "VA",
"void" => "x",
"FILE" => "x",
"H5A_operator_t" => "x",
@@ -149,12 +165,18 @@ $Source = "";
"H5I_search_func_t" => "x",
"H5L_class_t" => "x",
"H5L_elink_traverse_t" => "x",
- "H5L_iterate_t" => "x",
+ "H5L_info1_t" => "x",
+ "H5L_info2_t" => "x",
+ "H5L_iterate1_t" => "x",
+ "H5L_iterate2_t" => "x",
"H5M_iterate_t" => 'x',
"H5MM_allocate_t" => "x",
"H5MM_free_t" => "x",
- "H5O_info_t" => "x",
- "H5O_iterate_t" => "x",
+ "H5O_info1_t" => "x",
+ "H5O_info2_t" => "x",
+ "H5O_native_info_t" => "x",
+ "H5O_iterate1_t" => "x",
+ "H5O_iterate2_t" => "x",
"H5O_mcdt_search_cb_t" => "x",
"H5P_cls_create_func_t" => "x",
"H5P_cls_copy_func_t" => "x",
@@ -217,6 +239,11 @@ sub argstring ($$$) {
# certain type qualifiers, and indirection.
$atype =~ s/^\bconst\b//;
$atype =~ s/\bH5_ATTR_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_DEPRECATED_USED\b//g;
+ $atype =~ s/\bH5_ATTR_NDEBUG_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_DEBUG_API_USED\b//g;
+ $atype =~ s/\bH5_ATTR_PARALLEL_UNUSED\b//g;
+ $atype =~ s/\bH5_ATTR_PARALLEL_USED\b//g;
$atype =~ s/\s+/ /g;
$ptr = length $1 if $atype =~ s/(\*+)//;
$atype =~ s/^\s+//;
diff --git a/bin/warnhist b/bin/warnhist
index 7e56246..a88474b 100755
--- a/bin/warnhist
+++ b/bin/warnhist
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
require 5.003;
+use warnings;
#
# Copyright by The HDF Group.
@@ -205,8 +206,13 @@ while (<>) {
($last_c_name, $toss) = split /\:/, $_;
}
+ # Retain C/C++ compile line, which comes with the line of warning
+ if($_ =~ /.*[A-Za-z0-9_]\.[chC]\(.*[0-9]\):.*#.*/) {
+ $last_c_name = $_;
+ }
+
# Skip lines that don't have the word "warning"
- next if $_ !~ /[Ww]arning:/;
+ next if $_ !~ /[Ww]arning/;
# Skip warnings from linker
next if $_ =~ /ld: warning:/;
@@ -256,11 +262,16 @@ while (<>) {
} elsif($_ =~ /^\".*, line [0-9]+: *[Ww]arning:.*/) {
($name, $toss, $warning, $extra, $extra2) = split /\:/, $_;
($name, $line) = split /\,/, $name;
- $name =~ s/^\"//g;
- $name =~ s/\"$//g;
- $line =~ s/^\s*line\s*//g;
+ $name =~ s/^\"//g;
+ $name =~ s/\"$//g;
+ $line =~ s/^\s*line\s*//g;
# print "name:'", $name, "'-'", $line, "'\n";
# print "warning:'", $warning, "'\n";
+ # Check for Intel icc warning
+ } elsif($_ =~ /.*[A-Za-z0-9_]\.[chC]\(.*[0-9]\):.*#.*/) {
+ ($last_c_name, $toss, $warning) = split /\:/, $last_c_name;
+ ($name, $line) = split /\(/, $last_c_name;
+ $line =~ s/\)//g;
} else {
# Check for 'character offset' field appended to file & line #
# (This is probably specific to GCC)
@@ -330,6 +341,7 @@ while (<>) {
# Convert all quotes to '
$warning =~ s/‘/'/g;
$warning =~ s/’/'/g;
+ $warning =~ s/"/'/g;
#
# These skipped messages & "genericizations" may be specific to GCC