diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-17 21:38:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-17 21:38:20 (GMT) |
commit | fd547cd11ffa59c66aa93a5c55f6b979792e76d7 (patch) | |
tree | fcca518af22b90099a766da4419e593d373cd390 /tools/h5repack/h5repack_main.c | |
parent | 8a14f5dc0ecf2a550916d5fd8ff5804d6e641240 (diff) | |
download | hdf5-fd547cd11ffa59c66aa93a5c55f6b979792e76d7.zip hdf5-fd547cd11ffa59c66aa93a5c55f6b979792e76d7.tar.gz hdf5-fd547cd11ffa59c66aa93a5c55f6b979792e76d7.tar.bz2 |
[svn-r18413] Description:
Unify srcdir handling for test executables and allow them to use the srcdir
setting from configure time without requiring the 'srcdir' environment variable
be set (although you still can, to override the built in setting). Attempted
to get this right for Windows builds also.
Also add dependency between src/H5Tinit.c and src/libhdf5.settings, so
that the test/testcheck_version.sh script works correctly.
Tested on:
Linux/32 2.6 (jam)
Mac OS X/32 10.6.2 (amazon)
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r-- | tools/h5repack/h5repack_main.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 03aaa46..78bae25 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -513,18 +513,8 @@ void read_info(const char *filename, FILE *fp; char c; int i, rc=1; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing file */ - /* compose the name of the file to open, using the srcdir, if appropriate */ - if (srcdir){ - strcpy(data_file,srcdir); - strcat(data_file,"/"); - } - strcat(data_file,filename); - - - if ((fp = fopen(data_file, "r")) == (FILE *)NULL) { + if ((fp = fopen(filename, "r")) == (FILE *)NULL) { error_msg(progname, "cannot open options file %s\n", filename); exit(EXIT_FAILURE); } |