summaryrefslogtreecommitdiffstats
path: root/src/H5Ipkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2014-07-30 20:55:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2014-07-30 20:55:14 (GMT)
commit33ea1ada248725e4cce6316c503e5c760bcca49c (patch)
tree3fd7e951132e6aa9b7d241a418505d3ae6e33587 /src/H5Ipkg.h
parent3f701fda6528be0844afa2315c2a28357591349a (diff)
downloadhdf5-33ea1ada248725e4cce6316c503e5c760bcca49c.zip
hdf5-33ea1ada248725e4cce6316c503e5c760bcca49c.tar.gz
hdf5-33ea1ada248725e4cce6316c503e5c760bcca49c.tar.bz2
[svn-r25496] Description:
Merge 64-bit ID changes from branch to trunk. (Plus a few minor cleanups that aren't on the branch) Tested on: Mac OSX/64 10.9.4 (amazon) w/C++ & FORTRAN (h5committested on branch already for a week)
Diffstat (limited to 'src/H5Ipkg.h')
-rw-r--r--src/H5Ipkg.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index dc8e867..1666b76 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -44,7 +44,7 @@
* field sizes and masks are calculated from TYPE_BITS.
*/
#define TYPE_BITS 7
-#define TYPE_MASK ((1<<TYPE_BITS)-1)
+#define TYPE_MASK (((hid_t)1 << TYPE_BITS) - 1)
#define H5I_MAX_NUM_TYPES TYPE_MASK
@@ -52,11 +52,11 @@
* Number of bits to use for the Atom index in each atom (assumes 8-bit
* bytes). We don't use the sign bit.
*/
-#define ID_BITS ((sizeof(hid_t)*8)-(TYPE_BITS+1))
-#define ID_MASK ((1<<ID_BITS)-1)
+#define ID_BITS ((sizeof(hid_t) * 8) - (TYPE_BITS + 1))
+#define ID_MASK (((hid_t)1 << ID_BITS) - 1)
/* Map an atom to an ID type number */
-#define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a)>>ID_BITS) & TYPE_MASK))
+#define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a) >> ID_BITS) & TYPE_MASK))
/****************************/