diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2008-04-09 13:56:52 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2008-04-09 13:56:52 (GMT) |
commit | 0f7c9bcd5ee8e3ca54855d1de0a43a09f1272fca (patch) | |
tree | 50102b1acfb3171e5869d80d62be5b15c361e808 /test/links.c | |
parent | ae63d4bf4f8201707e16344e62b781e7eaad65fa (diff) | |
download | hdf5-0f7c9bcd5ee8e3ca54855d1de0a43a09f1272fca.zip hdf5-0f7c9bcd5ee8e3ca54855d1de0a43a09f1272fca.tar.gz hdf5-0f7c9bcd5ee8e3ca54855d1de0a43a09f1272fca.tar.bz2 |
[svn-r14822] 1. src/H5private.h: fixed a bug in CHECK_ABSOLUTE() for windows.
2. test/links.c: fixed one external link test to be the same as in 1.8.
Diffstat (limited to 'test/links.c')
-rw-r--r-- | test/links.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/test/links.c b/test/links.c index f940bb1..7671c60 100644 --- a/test/links.c +++ b/test/links.c @@ -2603,10 +2603,10 @@ external_link_env(hid_t fapl, hbool_t new_format) { hid_t fid = (-1); /* File ID */ hid_t gid = (-1); /* Group IDs */ + char *envval=NULL; static char *new_env = "HDF5_EXT_PREFIX=.:tmp"; - static char *env_var = "HDF5_EXT_PREFIX"; - static envstring[NAME_BUF_SIZE]; + static char *old_env = "HDF5_EXT_PREFIX="; char filename1[NAME_BUF_SIZE], filename2[NAME_BUF_SIZE], @@ -2644,24 +2644,17 @@ external_link_env(hid_t fapl, hbool_t new_format) /* Create external link to target file */ if(H5Lcreate_external(filename2, "/A", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* get original value for the HDF library environment variable for external link if set */ - envval = HDgetenv(env_var); if (HDputenv(new_env) < 0) TEST_ERROR - /* Open object through external link */ H5E_BEGIN_TRY { gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT); } H5E_END_TRY; - /* restore value for the environment variable as needed */ - if ((envval != NULL) && (*envval)) { - sprintf(envstring, "%s=%s", env_var, envval); - if (HDputenv(envstring) < 0) - TEST_ERROR - } - + if (HDputenv(old_env) < 0) + TEST_ERROR + /* should be able to find the target file from pathnames set via environment variable */ if (gid < 0) { H5_FAILED(); |