summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-12-05 17:33:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-12-05 17:33:31 (GMT)
commitb46e9055944a06b642b1ff1a200aea84cdfb34a6 (patch)
tree189ce595bbc6c0ce4ae49f47b635fd1e0b2ee325 /test
parente3c98c2899039b0a3e49205bad3a84ebbfacdff4 (diff)
downloadhdf5-b46e9055944a06b642b1ff1a200aea84cdfb34a6.zip
hdf5-b46e9055944a06b642b1ff1a200aea84cdfb34a6.tar.gz
hdf5-b46e9055944a06b642b1ff1a200aea84cdfb34a6.tar.bz2
[svn-r4673] Purpose:
Backward Compatibility Fix Description: H5Pset_fapl_log's parameters have changed from a simple "verbosity" level to bit-masked flags to enable various behaviors. Solution: Added in v1.4 compat stuff, on the unlikely chance that others are actually using this code in some production way. There are no C++ or FORTRAN wrappers for this call. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'test')
-rw-r--r--test/h5test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 62fdc90..da4c02f 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -393,7 +393,11 @@ h5_fileaccess(void)
char s[1024];
hid_t fapl = -1;
hsize_t fam_size = 100*1024*1024; /*100 MB*/
+#ifdef H5_WANT_H5_V1_4_COMPAT
+ long verbosity = 1;
+#else /* H5_WANT_H5_V1_4_COMPAT */
long log_flags = H5FD_LOG_LOC_IO;
+#endif /* H5_WANT_H5_V1_4_COMPAT */
H5FD_mem_t mt;
/* First use the environment variable, then the constant */
@@ -456,12 +460,21 @@ h5_fileaccess(void)
}
if (H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT)<0) return -1;
} else if (!HDstrcmp(name, "log")) {
+#ifdef H5_WANT_H5_V1_4_COMPAT
+ /* Log file access */
+ if ((val = strtok(NULL, " \t\n\r")))
+ verbosity = strtol(val, NULL, 0);
+
+ if (H5Pset_fapl_log(fapl, NULL, (int)verbosity) < 0)
+ return -1;
+#else /* H5_WANT_H5_V1_4_COMPAT */
/* Log file access */
if ((val = HDstrtok(NULL, " \t\n\r")))
log_flags = HDstrtol(val, NULL, 0);
if (H5Pset_fapl_log(fapl, NULL, log_flags, 0) < 0)
return -1;
+#endif /* H5_WANT_H5_V1_4_COMPAT */
} else {
/* Unknown driver */
return -1;