summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5FDint.c18
-rw-r--r--src/H5FDmpio.c4
-rw-r--r--src/H5FDmulti.c20
-rw-r--r--src/H5FDprivate.h18
4 files changed, 43 insertions, 17 deletions
diff --git a/src/H5FDint.c b/src/H5FDint.c
index 128f30f..cd48197 100644
--- a/src/H5FDint.c
+++ b/src/H5FDint.c
@@ -93,7 +93,11 @@
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr)
+H5FD_locate_signature(H5FD_t *file,
+#ifndef H5_DEBUG_BUILD
+const
+#endif /* H5_DEBUG_BUILD */
+H5P_genplist_t *dxpl, haddr_t *sig_addr)
{
haddr_t addr, eoa, eof;
uint8_t buf[H5F_SIGNATURE_LEN];
@@ -158,7 +162,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
+H5FD_read(H5FD_t *file,
+#ifndef H5_DEBUG_BUILD
+const
+#endif /* H5_DEBUG_BUILD */
+H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
size_t size, void *buf/*out*/)
{
haddr_t eoa = HADDR_UNDEF;
@@ -226,7 +234,11 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
+H5FD_write(H5FD_t *file,
+#ifndef H5_DEBUG_BUILD
+const
+#endif /* H5_DEBUG_BUILD */
+H5P_genplist_t *dxpl, H5FD_mem_t type, haddr_t addr,
size_t size, const void *buf)
{
haddr_t eoa = HADDR_UNDEF;
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index ed70e20..a3a404f 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -90,7 +90,7 @@ static herr_t H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hadd
size_t size, void *buf);
static herr_t H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, const void *buf);
-static herr_t H5FD_mpio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
+static herr_t H5FD_mpio_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_mpio_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static int H5FD_mpio_mpi_rank(const H5FD_t *_file);
static int H5FD_mpio_mpi_size(const H5FD_t *_file);
@@ -1866,7 +1866,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, unsigned closing)
+H5FD_mpio_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
int mpi_code; /* mpi return code */
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index d0dfab3..a0ee8a8 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -1290,7 +1290,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
} else {
H5FD_mem_t mmt = file->fa.memb_map[type];
- if(H5FD_MEM_DEFAULT==mmt)
+ if(H5FD_MEM_DEFAULT == mmt)
mmt = type;
if(file->memb[mmt]) {
@@ -1361,13 +1361,15 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
if(H5FD_MEM_DEFAULT == mmt)
mmt = type;
- /* Handle backward compatibility in a quick and simple way. v1.6 library had EOA for the entire virtual
- * file. But it wasn't meaningful. So v1.8 library doesn't have it anymore. It saves the EOA for the
- * metadata file, instead. Here we try to figure out whether the EOA is from a v1.6 file by comparing its
- * value. If it is a big value, we assume it's from v1.6 and simply discard it. This is the normal case
- * when the metadata file has the smallest starting address. If the metadata file has the biggest address,
- * the EOAs of v1.6 and v1.8 files are the same. It won't cause any trouble. (Please see Issue 2598
- * in Jira) SLU - 2011/6/21
+ /* Handle backward compatibility in a quick and simple way. v1.6 library
+ * had EOA for the entire virtual file. But it wasn't meaningful. So v1.8
+ * library doesn't have it anymore. It saves the EOA for the metadata file,
+ * instead. Here we try to figure out whether the EOA is from a v1.6 file
+ * by comparing its value. If it is a big value, we assume it's from v1.6
+ * and simply discard it. This is the normal case when the metadata file
+ * has the smallest starting address. If the metadata file has the biggest
+ * address, the EOAs of v1.6 and v1.8 files are the same. It won't cause
+ * any trouble. (Please see Issue 2598 in Jira) SLU - 2011/6/21
*/
if(H5FD_MEM_SUPER == type && file->memb_eoa[H5FD_MEM_SUPER] > 0 && eoa > file->memb_eoa[H5FD_MEM_SUPER])
return 0;
@@ -1378,7 +1380,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
H5E_BEGIN_TRY {
status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt]));
} H5E_END_TRY;
- if (status<0)
+ if(status < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1)
return 0;
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 915f7e1..c40dc54 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -130,7 +130,11 @@ struct H5P_genplist_t;
struct H5F_t;
H5_DLL int H5FD_term_interface(void);
-H5_DLL herr_t H5FD_locate_signature(H5FD_t *file, const H5P_genplist_t *dxpl, haddr_t *sig_addr);
+H5_DLL herr_t H5FD_locate_signature(H5FD_t *file,
+#ifndef H5_DEBUG_BUILD
+const
+#endif /* H5_DEBUG_BUILD */
+H5P_genplist_t *dxpl, haddr_t *sig_addr);
H5_DLL H5FD_class_t *H5FD_get_class(hid_t id);
H5_DLL hsize_t H5FD_sb_size(H5FD_t *file);
H5_DLL herr_t H5FD_sb_encode(H5FD_t *file, char *name/*out*/, uint8_t *buf);
@@ -154,9 +158,17 @@ H5_DLL haddr_t H5FD_get_eof(const H5FD_t *file, H5FD_mem_t type);
H5_DLL haddr_t H5FD_get_maxaddr(const H5FD_t *file);
H5_DLL herr_t H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags);
H5_DLL herr_t H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map);
-H5_DLL herr_t H5FD_read(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
+H5_DLL herr_t H5FD_read(H5FD_t *file,
+#ifndef H5_DEBUG_BUILD
+const
+#endif /* H5_DEBUG_BUILD */
+H5P_genplist_t *dxpl, H5FD_mem_t type,
haddr_t addr, size_t size, void *buf/*out*/);
-H5_DLL herr_t H5FD_write(H5FD_t *file, const H5P_genplist_t *dxpl, H5FD_mem_t type,
+H5_DLL herr_t H5FD_write(H5FD_t *file,
+#ifndef H5_DEBUG_BUILD
+const
+#endif /* H5_DEBUG_BUILD */
+H5P_genplist_t *dxpl, H5FD_mem_t type,
haddr_t addr, size_t size, const void *buf);
H5_DLL herr_t H5FD_flush(H5FD_t *file, hid_t dxpl_id, hbool_t closing);
H5_DLL herr_t H5FD_truncate(H5FD_t *file, hid_t dxpl_id, hbool_t closing);