summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2009-06-16 18:19:40 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2009-06-16 18:19:40 (GMT)
commit41b80569d76de56169e1a71a0e8f407d8ed46c09 (patch)
treeb5d3a2d1bccb89919cd616c72a6475a7a33625fd /tools
parent5e8d84b4214d3d0c5b9edeb51fe4c711b865132d (diff)
downloadhdf5-41b80569d76de56169e1a71a0e8f407d8ed46c09.zip
hdf5-41b80569d76de56169e1a71a0e8f407d8ed46c09.tar.gz
hdf5-41b80569d76de56169e1a71a0e8f407d8ed46c09.tar.bz2
[svn-r17058] added some "dummy" declarations for d_status
this error home/hdftest/snapshots-hdf5/current/tools/lib/h5tools_ref.c:126: undefined reference to `d_status' happens because the original developer of h5tools_ref.c declared these 2 variables in that source file extern char *progname; extern int d_status; this means that all programs that use this source file (typically all tools) will have to define these 2 variables, even if they are *not* used. examples const char *progname = "h5jam"; int d_status = EXIT_SUCCESS; "progname" is usually used to print the program name in the usage, and "d_status" is just a return value of the tool, usually. I was wondering about removing these 2 declarations from h5tools_ref.c extern char *progname; extern int d_status; and define those variables on each tool if they are only needed (it seems to me that only h5ls and h5dump actually "need" them) tested: smirom parallel
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/h5diffgentest.c3
-rw-r--r--tools/h5diff/ph5diff_main.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index b07c425..95b28ee 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -97,6 +97,9 @@ static int write_dset(hid_t loc_id,int rank,hsize_t *dims,const char *name,hid_t
*-------------------------------------------------------------------------
*/
+/* module-scoped variables */
+int d_status = EXIT_SUCCESS;
+
int main(void)
{
test_basic(FILE1, FILE2, FILE11);
diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c
index c613879..1990138 100644
--- a/tools/h5diff/ph5diff_main.c
+++ b/tools/h5diff/ph5diff_main.c
@@ -52,6 +52,8 @@ static void ph5diff_worker(int );
*-------------------------------------------------------------------------
*/
+/* module-scoped variables */
+int d_status = EXIT_SUCCESS;
int main(int argc, const char *argv[])
{