diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2005-02-01 04:13:42 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2005-02-01 04:13:42 (GMT) |
commit | 1db4cc25966c432525ce99e15a41c81db43854df (patch) | |
tree | 59d51b84249fa9dcd6226982230ac42b2eb393ca /tools | |
parent | 7e28ae7b47f475ec89f3b78730e3d67bea037397 (diff) | |
download | hdf5-1db4cc25966c432525ce99e15a41c81db43854df.zip hdf5-1db4cc25966c432525ce99e15a41c81db43854df.tar.gz hdf5-1db4cc25966c432525ce99e15a41c81db43854df.tar.bz2 |
[svn-r9905] Purpose:
fix bugs.
Description:
The three variables, g_nTasks, outBuff, and outBuffOffset, were
declared in ph5diff.h. That means they are declared in various
*.c files that include it, thus having the appearance of multiple
defined. Most C compilers are forgiving of this error but
the g++ rejects this practice.
Solution:
Make it only an extern declaration in ph5diff.h but really
defined them in h5diff_util.c
Platforms tested:
sleipnir using g++ since this only failed in Daily test.
Also testes in heping, serial and parallel modes.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5diff_util.c | 4 | ||||
-rw-r--r-- | tools/lib/ph5diff.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index fe2e73c..d4b6437 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -16,6 +16,10 @@ #include "ph5diff.h" #include "H5private.h" +/* global variables */ +int g_nTasks; +char outBuff[OUTBUFF_SIZE]; +unsigned int outBuffOffset; /*------------------------------------------------------------------------- * Function: parallel_print diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 636e4c0..320b39a 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -30,9 +30,9 @@ #define MPI_TAG_END 6 #define MPI_TAG_PARALLEL 7 -int g_nTasks; -char outBuff[OUTBUFF_SIZE]; -unsigned int outBuffOffset; +extern int g_nTasks; +extern char outBuff[OUTBUFF_SIZE]; +extern unsigned int outBuffOffset; struct diff_args { |