summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-03-24 18:33:45 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-03-24 18:33:45 (GMT)
commit3e8dc8cccc5b907d93e7eeb61d26088142b3d982 (patch)
treeaf10d7b3e3ec99b809fa880af89e8fe8b48777b0 /test/h5test.c
parentf960ff573ea4d7c324be7a392f0b0c85bc796030 (diff)
downloadhdf5-3e8dc8cccc5b907d93e7eeb61d26088142b3d982.zip
hdf5-3e8dc8cccc5b907d93e7eeb61d26088142b3d982.tar.gz
hdf5-3e8dc8cccc5b907d93e7eeb61d26088142b3d982.tar.bz2
[svn-r20315] brought revisions 19868:20300 from the 1.8.6_vms branch to the trunk for VMS work
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 25b751f..8762f90 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1115,10 +1115,22 @@ getenv_all(MPI_Comm comm, int root, const char* name)
hid_t
h5_make_local_copy(char *origfilename, char *local_copy_name)
{
- const char *filename = H5_get_srcdir_filename(origfilename); /* Corrected test file name */
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
ssize_t nread; /* Number of bytes read in */
char buf[READ_BUF_SIZE]; /* Buffer for copying data */
+ char filename[FILENAME_BUF_SIZE] = "";
+#ifdef H5_VMS
+ HDstrcat(filename, origfilename);
+#else
+ char * srcdir = HDgetenv("srcdir"); /* The source directory */
+
+ if(srcdir && ((HDstrlen(srcdir) +
+ HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) {
+ HDstrcpy(filename, srcdir);
+ HDstrcat(filename, "/");
+ }
+ HDstrcat(filename, origfilename);
+#endif
/* Copy old file into temporary file */
if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1;
@@ -1135,4 +1147,3 @@ h5_make_local_copy(char *origfilename, char *local_copy_name)
return 0;
}
-