summaryrefslogtreecommitdiffstats
path: root/test/H5srcdir.h
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-03-23 16:41:44 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-03-23 16:41:44 (GMT)
commitccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf (patch)
tree1c23b22fc52993f69114d22c0769890f653ff50e /test/H5srcdir.h
parent2aabc3f41568a5daec0f1cae711c97a5bb82878d (diff)
downloadhdf5-ccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf.zip
hdf5-ccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf.tar.gz
hdf5-ccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf.tar.bz2
[svn-r20301] brought revisions 19868:20300 from the 1.8.6_vms branch to the 1.8 branch
Diffstat (limited to 'test/H5srcdir.h')
-rw-r--r--test/H5srcdir.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/H5srcdir.h b/test/H5srcdir.h
index 55700cb..8bc8780 100644
--- a/test/H5srcdir.h
+++ b/test/H5srcdir.h
@@ -32,7 +32,11 @@ static char srcdir_path[1024] = "";
static char srcdir_testpath[1024] = "";
/* Append the test file name to the srcdir path and return the whole string */
+#ifdef H5_VMS
+static const char *H5_get_srcdir_filename(char *filename)
+#else
static const char *H5_get_srcdir_filename(const char *filename)
+#endif
{
const char *srcdir = HDgetenv("srcdir");
@@ -43,8 +47,17 @@ static const char *H5_get_srcdir_filename(const char *filename)
/* Build path to test file */
if((HDstrlen(srcdir) + HDstrlen(filename) + 2) < sizeof(srcdir_testpath)) {
HDstrcpy(srcdir_testpath, srcdir);
+#ifdef H5_VMS
+ if(filename[0] == '[') {
+ char *tmp = filename;
+ srcdir_testpath[strlen(srcdir)-1] = '\0';
+ strcat(srcdir_testpath, ++tmp);
+ } else
+ strcat(srcdir_testpath, filename);
+#else
HDstrcat(srcdir_testpath, "/");
HDstrcat(srcdir_testpath, filename);
+#endif
return(srcdir_testpath);
} /* end if */
else