summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Fpublic.h6
-rw-r--r--src/H5Pfapl.c133
-rw-r--r--src/H5Ppublic.h6
-rw-r--r--test/dsets.c4
-rw-r--r--test/dtypes.c4
-rw-r--r--test/fillval.c4
-rw-r--r--test/gen_new_group.c4
-rw-r--r--test/h5test.c5
-rw-r--r--test/links.c4
-rwxr-xr-xtest/objcopy.c4
-rw-r--r--test/ohdr.c2
-rw-r--r--test/stab.c4
-rw-r--r--test/tattr.c16
-rw-r--r--test/th5o.c14
-rw-r--r--test/titerate.c6
-rw-r--r--test/tmisc.c4
-rw-r--r--test/unlink.c4
-rw-r--r--tools/h5repack/h5repack_copy.c2
-rw-r--r--tools/h5stat/h5stat_gentest.c2
-rw-r--r--tools/misc/h5mkgrp.c4
20 files changed, 163 insertions, 69 deletions
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 1d98330..0bbfbfb 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -107,6 +107,12 @@ typedef struct H5F_info_t {
} sohm;
} H5F_info_t;
+/* File format versions */
+typedef enum H5F_format_version_t {
+ H5F_FORMAT_EARLIEST, /* Use the earliest possible format for storing objects */
+ H5F_FORMAT_LATEST /* Use the latest possible format available for storing objects*/
+} H5F_format_version_t;
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 81dba0c..a23d31c 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -1876,76 +1876,161 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Pset_latest_format
- *
- * Purpose: Indicates that the library should always use the latest version
- * of the file format when creating objects. If this flag is not set,
- * the library will always use the most backwardly compatibly format
- * possible that can store the information about an object.
- *
- * The default value is set to FALSE (creating backwardly compatible files)
+ * Function: H5Pset_format_bounds
+ *
+ * Purpose: Indicates which versions of the file format the library should
+ * use when creating objects. LOW is the earliest version of the HDF5
+ * library that is guaranteed to be able to access the objects created
+ * (the format of some objects in an HDF5 file may not have changed between
+ * versions of the HDF5 library, possibly allowing earlier versions of the
+ * HDF5 library to access those objects) and HIGH is the latest version
+ * of the library required to access the objects created (later versions
+ * of the HDF5 library will also be able to access those objects).
+ *
+ * LOW is used to require that objects use a more modern format and HIGH
+ * is used to restrict objects from using a more modern format.
+ *
+ * The special values of H5F_FORMAT_EARLIEST and H5F_FORMAT_LATEST can be
+ * used in the following manner: Setting LOW and HIGH to H5F_FORMAT_LATEST
+ * will produce files whose objects use the latest version of the file
+ * format available in the current HDF5 library for each object created.
+ * Setting LOW and HIGH to H5F_FORMAT_EARLIEST will produce files that that
+ * always require the use of the earliest version of the file format for
+ * each object created. [NOTE! LOW=HIGH=H5F_FORMAT_EARLIEST is not
+ * implemented as of version 1.8.0 and setting LOW and HIGH to
+ * H5F_FORMAT_EARLIEST will produce an error currently].
+ *
+ * Currently, the only two valid combinations for this routine are:
+ * LOW = H5F_FORMAT_EARLIEST and HIGH = H5F_FORMAT_LATEST (the default
+ * setting, which creates objects with the ealiest version possible for
+ * each object, but no upper limit on the version allowed to be created if
+ * a newer version of an object's format is required to support a feature
+ * requested with an HDF5 library API routine), and LOW = H5F_FORMAT_LATEST
+ * and HIGH = H5F_FORMAT_LATEST (which is described above).
+ *
+ * The LOW and HIGH values set with this routine at imposed with each
+ * HDF5 library API call that creates objects in the file. API calls that
+ * would violate the LOW or HIGH format bound will fail.
+ *
+ * Setting the LOW and HIGH values will not affect reading/writing existing
+ * objects, only the creation of new objects.
+ *
+ * Note: Eventually we want to add more values to the H5F_format_version_t
+ * enumerated type that indicate library release values where the file
+ * format was changed (like "H5F_FORMAT_1_2_0" for the file format changes
+ * in the 1.2.x release branch and possily even "H5F_FORMAT_1_4_2" for
+ * a change mid-way through the 1.4.x release branch, etc).
+ *
+ * Adding more values will allow applications to make settings like the
+ * following:
+ * LOW = H5F_FORMAT_EARLIEST, HIGH = H5F_FORMAT_1_2_0 => Create objects
+ * with the earliest possible format and don't allow any objects
+ * to be created that require a library version greater than 1.2.x
+ * (This is the "make certain that <application> linked with v1.2.x
+ * of the library can read the file produced" use case)
+ *
+ * LOW = H5F_FORMAT_1_4_2, HIGH = H5F_FORMAT_LATEST => create objects
+ * with at least the version of their format that the 1.4.2 library
+ * uses and allow any later version of the object's format
+ * necessary to represent features used.
+ * (This is the "make certain to take advantage of <new feature>
+ * in the file format" use case (maybe <new feature> is smaller
+ * or scales better than an ealier version, which would otherwise
+ * be used))
+ *
+ * LOW = H5F_FORMAT_1_2_0, HIGH = H5F_FORMAT_1_6_0 => creates objects
+ * with at least the version of their format that the 1.2.x library
+ * uses and don't allow any objects to be created that require a
+ * library version greater than 1.6.x.
+ * (Not certain of a particular use case for these settings,
+ * although its probably just the logical combination of the
+ * previous two; it just falls out as possible/logical (if it turns
+ * out to be hard to implement in some way, we can always disallow
+ * it))
+ *
+ * Note #2: We talked about whether to include enum values for only library
+ * versions where the format changed and decided it would be less confusing
+ * for application developers if we include enum values for _all_ library
+ * releases and then map down to the previous actual library release which
+ * had a format change.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * Friday, September 9, 2006
+ * Sunday, December 30, 2007
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Pset_latest_format(hid_t plist_id, hbool_t latest)
+H5Pset_format_bounds(hid_t plist_id, H5F_format_version_t low,
+ H5F_format_version_t high)
{
H5P_genplist_t *plist; /* Property list pointer */
+ hbool_t latest; /* Whether to use the latest version or not */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pset_latest_format, FAIL)
- H5TRACE2("e", "ib", plist_id, latest);
+ FUNC_ENTER_API(H5Pset_format_bounds, FAIL)
+
+ /* Check args */
+ /* (Note that this is _really_ restricted right now, we'll want to loosen
+ * this up more as we add features - QAK)
+ */
+ if(high != H5F_FORMAT_LATEST)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid high format bound")
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Set values */
+ latest = (low == H5F_FORMAT_LATEST) ? TRUE : FALSE;
if(H5P_set(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format' flag")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set format bounds")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Pset_latest_format() */
+} /* end H5Pset_format_bounds() */
/*-------------------------------------------------------------------------
- * Function: H5Pget_latest_format
+ * Function: H5Pget_format_bounds
*
- * Purpose: Returns the current settings for the 'latest format' flag
+ * Purpose: Returns the current settings for the file format bounds
* from a file access property list.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
- * Friday, September 9, 2006
+ * Thursday, January 3, 2008
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_latest_format(hid_t plist_id, hbool_t *latest/*out*/)
+H5Pget_format_bounds(hid_t plist_id, H5F_format_version_t *low/*out*/,
+ H5F_format_version_t *high/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
+ hbool_t latest; /* Whether to use the latest version or not */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_API(H5Pget_latest_format, FAIL)
- H5TRACE2("e", "ix", plist_id, latest);
+ FUNC_ENTER_API(H5Pget_format_bounds, FAIL)
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get value */
- if(latest)
- if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, latest) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'latest format' flag")
+ if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get format bounds")
+
+ /* Check for setting values to return */
+ /* (Again, this is restricted now, we'll need to open it up later -QAK) */
+ if(low)
+ *low = latest ? H5F_FORMAT_LATEST : H5F_FORMAT_EARLIEST;
+ if(high)
+ *high = H5F_FORMAT_LATEST;
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Pget_latest_format() */
+} /* end H5Pget_format_bounds() */
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index f1e98af..784d15c 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -265,8 +265,10 @@ H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size);
H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size/*out*/);
H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size);
H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size/*out*/);
-H5_DLL herr_t H5Pset_latest_format(hid_t plist_id, hbool_t latest);
-H5_DLL herr_t H5Pget_latest_format(hid_t plist_id, hbool_t *latest);
+H5_DLL herr_t H5Pset_format_bounds(hid_t plist_id, H5F_format_version_t low,
+ H5F_format_version_t high);
+H5_DLL herr_t H5Pget_format_bounds(hid_t plist_id, H5F_format_version_t *low,
+ H5F_format_version_t *high);
/* Dataset creation property list (DCPL) routines */
H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout);
diff --git a/test/dsets.c b/test/dsets.c
index bf58018..2b58110 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6405,8 +6405,8 @@ main(void)
/* Copy the file access property list */
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
diff --git a/test/dtypes.c b/test/dtypes.c
index f01c5e3..4ee4eec 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -4410,10 +4410,10 @@ test_latest(void)
FAIL_STACK_ERROR
- /* Set the 'use the latest format' flag in the FAPL */
+ /* Set the 'use the latest format' bounds in the FAPL */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
FAIL_STACK_ERROR
- if(H5Pset_latest_format(fapl, TRUE) < 0)
+ if(H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0)
FAIL_STACK_ERROR
/* Create file using default FAPL */
diff --git a/test/fillval.c b/test/fillval.c
index acbd2b9..9018f62 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -2142,8 +2142,8 @@ main(int argc, char *argv[])
/* Copy the file access property list */
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR
/* Loop over using new group format */
for(new_format = FALSE; new_format <= TRUE; new_format++) {
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index 1a57b6f..d1f04e0 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -57,8 +57,8 @@ int main(void)
/* Copy the file access property list */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) goto error;
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl, TRUE) < 0) goto error;
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) goto error;
/* Create file for test groups */
if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl)) <0) goto error;
diff --git a/test/h5test.c b/test/h5test.c
index 5424717..af9ca1e 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -597,9 +597,10 @@ h5_fileaccess(void)
* and copy buffer size to the default values. */
if (H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0) return -1;
#endif
- } else if (!HDstrcmp(name, "latest")) {
+ } else if(!HDstrcmp(name, "latest")) {
/* use the latest format */
- if (H5Pset_latest_format(fapl, TRUE)<0) return -1;
+ if(H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0)
+ return -1;
} else {
/* Unknown driver */
return -1;
diff --git a/test/links.c b/test/links.c
index 0e69a3d..4e58500 100644
--- a/test/links.c
+++ b/test/links.c
@@ -10211,8 +10211,8 @@ main(void)
/* Copy the file access property list */
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR
/* Loop over using new group format */
for(new_format = FALSE; new_format <= TRUE; new_format++) {
diff --git a/test/objcopy.c b/test/objcopy.c
index b2df288..eed7794 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -7175,8 +7175,8 @@ main(void)
/* Copy the file access property list */
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR
/* Create an FCPL with sharing enabled */
if((fcpl_shared = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR
diff --git a/test/ohdr.c b/test/ohdr.c
index 0ff5ac0..8ed361a 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -89,7 +89,7 @@ main(void)
HDputs("Using default file format:");
/* Set the format to use for the file */
- if (H5Pset_latest_format(fapl, b) < 0) FAIL_STACK_ERROR
+ if (H5Pset_format_bounds(fapl, (b ? H5F_FORMAT_LATEST : H5F_FORMAT_EARLIEST), H5F_FORMAT_LATEST) < 0) FAIL_STACK_ERROR
/* Create the file to operate on */
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
diff --git a/test/stab.c b/test/stab.c
index 732ac5b..8b483c9 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -1128,8 +1128,8 @@ main(void)
/* Copy the file access property list */
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR
/* Loop over using new group format */
for(new_format = FALSE; new_format <= TRUE; new_format++) {
diff --git a/test/tattr.c b/test/tattr.c
index c04af07..99b1d65 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -2769,7 +2769,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
unsigned nshared_indices; /* # of shared message indices */
- hbool_t latest_format; /* Whether we're using the latest version of the format or not */
+ H5F_format_version_t low, high; /* File format bounds */
htri_t is_empty; /* Are there any attributes? */
htri_t is_dense; /* Are attributes stored densely? */
unsigned u; /* Local index variable */
@@ -2817,9 +2817,9 @@ test_attr_big(hid_t fcpl, hid_t fapl)
ret = H5Pget_shared_mesg_nindexes(fcpl, &nshared_indices);
CHECK(ret, FAIL, "H5Pget_shared_mesg_nindexes");
- /* Retrieve the "use the latest version of the format" flag for creating objects in the file */
- ret = H5Pget_latest_format(fapl, &latest_format);
- CHECK(ret, FAIL, "H5Pget_latest_format");
+ /* Retrieve the format bounds for creating objects in the file */
+ ret = H5Pget_format_bounds(fapl, &low, &high);
+ CHECK(ret, FAIL, "H5Pget_format_bounds");
/* Create a dataset */
dataset = H5Dcreate2(fid, DSET1_NAME, H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
@@ -2881,7 +2881,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
u = 2;
sprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
- if(latest_format) {
+ if(low == H5F_FORMAT_LATEST) {
CHECK(attr, FAIL, "H5Acreate2");
/* Close attribute */
@@ -8864,9 +8864,9 @@ test_attr(void)
fapl2 = H5Pcopy(fapl);
CHECK(fapl2, FAIL, "H5Pcopy");
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- ret = H5Pset_latest_format(fapl2, TRUE);
- CHECK(ret, FAIL, "H5Pset_latest_format");
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ ret = H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST);
+ CHECK(ret, FAIL, "H5Pset_format_bounds");
/* Create a default file creation property list */
fcpl = H5Pcreate(H5P_FILE_CREATE);
diff --git a/test/th5o.c b/test/th5o.c
index d913e47..fec845d 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -581,9 +581,9 @@ test_h5o_plist(void)
fapl = H5Pcreate(H5P_FILE_ACCESS);
CHECK(fapl, FAIL, "H5Pcreate");
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- ret = H5Pset_latest_format(fapl, TRUE);
- CHECK(ret, FAIL, "H5Pset_latest_format");
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ ret = H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST);
+ CHECK(ret, FAIL, "H5Pset_format_bounds");
/* Create a new HDF5 file */
fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -796,13 +796,13 @@ test_h5o_link(void)
/* Loop over using new group format */
for(new_format = FALSE; new_format <= TRUE; new_format++) {
- /* Make a FAPL that uses the "use the latest version of the format" flag */
+ /* Make a FAPL that uses the "use the latest version of the format" bounds */
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
CHECK(fapl_id, FAIL, "H5Pcreate");
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- ret = H5Pset_latest_format(fapl_id, new_format);
- CHECK(ret, FAIL, "H5Pset_latest_format");
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ ret = H5Pset_format_bounds(fapl_id, (new_format ? H5F_FORMAT_LATEST : H5F_FORMAT_EARLIEST), H5F_FORMAT_LATEST);
+ CHECK(ret, FAIL, "H5Pset_format_bounds");
/* Create a new HDF5 file */
file_id = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
diff --git a/test/titerate.c b/test/titerate.c
index 8df1563..63eb84f 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -934,9 +934,9 @@ test_iterate(void)
fapl2 = H5Pcopy(fapl);
CHECK(fapl2, FAIL, "H5Pcopy");
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- ret = H5Pset_latest_format(fapl2, TRUE);
- CHECK(ret, FAIL, "H5Pset_latest_format");
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ ret = H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST);
+ CHECK(ret, FAIL, "H5Pset_format_bounds");
/* These next tests use the same file */
for(new_format = FALSE; new_format <= TRUE; new_format++) {
diff --git a/test/tmisc.c b/test/tmisc.c
index df950ea..cc4e5ec 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -4601,8 +4601,8 @@ test_misc25c(void)
/* Compose file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
CHECK(fapl, FAIL, "H5Pcreate");
- ret = H5Pset_latest_format(fapl, 1);
- CHECK(ret, FAIL, "H5Pset_latest_format");
+ ret = H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST);
+ CHECK(ret, FAIL, "H5Pset_format_bounds");
/* Create the file */
fid = H5Fcreate(MISC25C_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
diff --git a/test/unlink.c b/test/unlink.c
index 7ebfc35..235f763 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -2441,8 +2441,8 @@ main(void)
/* Copy the file access property list */
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
- /* Set the "use the latest version of the format" flag for creating objects in the file */
- if(H5Pset_latest_format(fapl2, TRUE) < 0) TEST_ERROR
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ if(H5Pset_format_bounds(fapl2, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) TEST_ERROR
/* Test with old & new format groups */
for(new_format = FALSE; new_format <= TRUE; new_format++) {
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 2504a96..870bcaa 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -176,7 +176,7 @@ int copy_objects(const char* fnamein,
goto out;
} /* end if */
- if(H5Pset_latest_format(fapl, TRUE) < 0) {
+ if(H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) {
error_msg(progname, "Could not set property for using latest version of the format\n");
goto out;
} /* end if */
diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c
index 22396b6..bf10632 100644
--- a/tools/h5stat/h5stat_gentest.c
+++ b/tools/h5stat/h5stat_gentest.c
@@ -46,7 +46,7 @@ static void gen_file(void)
char attrname[30];
fapl = H5Pcreate(H5P_FILE_ACCESS);
- ret = H5Pset_latest_format(fapl, 1);
+ ret = H5Pset_format_bounds(fapl, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST);
/* Create dataset */
file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
diff --git a/tools/misc/h5mkgrp.c b/tools/misc/h5mkgrp.c
index c39d07b..6de00f7 100644
--- a/tools/misc/h5mkgrp.c
+++ b/tools/misc/h5mkgrp.c
@@ -233,8 +233,8 @@ main(int argc, const char *argv[])
/* Check for creating groups with new format version */
if(params.latest) {
- /* Set the "use the latest version of the format flag */
- if(H5Pset_latest_format(fapl_id, TRUE) < 0) {
+ /* Set the "use the latest version of the format" bounds */
+ if(H5Pset_format_bounds(fapl_id, H5F_FORMAT_LATEST, H5F_FORMAT_LATEST) < 0) {
error_msg(progname, "Could not set property for using latest version of the format\n");
leave(EXIT_FAILURE);
} /* end if */