summaryrefslogtreecommitdiffstats
path: root/src/H5SM.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-12-23 03:28:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-12-23 03:28:37 (GMT)
commit02a90afcdcd9b6a41455a198799bc8033bf56485 (patch)
tree6161562ad0783e66a7df383be002cb90de2eedb2 /src/H5SM.c
parenta0e70a08ba5a886bebca4ec305192693ec2f5a1d (diff)
downloadhdf5-02a90afcdcd9b6a41455a198799bc8033bf56485.zip
hdf5-02a90afcdcd9b6a41455a198799bc8033bf56485.tar.gz
hdf5-02a90afcdcd9b6a41455a198799bc8033bf56485.tar.bz2
[svn-r14358] Description:
Tweak the constants for the shared message flags to be equal to the other flags useds for the underlying messages. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5SM.c')
-rwxr-xr-xsrc/H5SM.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 179a526..9607f23 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -220,7 +220,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d
/* Check for sharing attributes in this file, which means that creation
* indices must be tracked on object header message in the file.
*/
- if(type_flags_used & H5O_MESG_ATTR_FLAG)
+ if(type_flags_used & H5O_SHMESG_ATTR_FLAG)
f->shared->store_msg_crt_idx = TRUE;
/* Write shared message information to the superblock extension */
@@ -263,22 +263,18 @@ H5SM_type_to_flag(unsigned type_id, unsigned *type_flag)
/* Translate the H5O type_id into an H5SM type flag */
switch(type_id) {
+ case H5O_FILL_ID:
+ type_id = H5O_FILL_NEW_ID;
+ /* Fall through... */
+
case H5O_SDSPACE_ID:
- *type_flag = H5O_MESG_SDSPACE_FLAG;
- break;
case H5O_DTYPE_ID:
- *type_flag = H5O_MESG_DTYPE_FLAG;
- break;
- case H5O_FILL_ID:
case H5O_FILL_NEW_ID:
- *type_flag = H5O_MESG_FILL_FLAG;
- break;
case H5O_PLINE_ID:
- *type_flag = H5O_MESG_PLINE_FLAG;
- break;
case H5O_ATTR_ID:
- *type_flag = H5O_MESG_ATTR_FLAG;
+ *type_flag = (unsigned)1 << type_id;
break;
+
default:
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "unknown message type ID")
} /* end switch */
@@ -307,7 +303,7 @@ done:
ssize_t
H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
{
- ssize_t x;
+ size_t x;
unsigned type_flag;
ssize_t ret_value = FAIL;
@@ -322,7 +318,7 @@ H5SM_get_index(const H5SM_master_table_t *table, unsigned type_id)
*/
for(x = 0; x < table->num_indexes; ++x)
if(table->indexes[x].mesg_types & type_flag)
- HGOTO_DONE(x)
+ HGOTO_DONE((ssize_t)x)
/* At this point, ret_value is either the location of the correct
* index or it's still FAIL because we didn't find an index.
@@ -1828,7 +1824,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id)
/* Check for sharing attributes in this file, which means that creation
* indices must be tracked on object header message in the file.
*/
- if(index_flags[u] & H5O_MESG_ATTR_FLAG)
+ if(index_flags[u] & H5O_SHMESG_ATTR_FLAG)
shared->store_msg_crt_idx = TRUE;
} /* end for */