diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2014-07-30 20:56:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2014-07-30 20:56:40 (GMT) |
commit | e8c162613b75fb3b269830defa769728f439db72 (patch) | |
tree | 7c02108c8d1012fb7e8a2b54c5503a5c2f5c019c /src/H5Ipkg.h | |
parent | ff1a9ae0e74ded0274729313ba24df578ffaf678 (diff) | |
download | hdf5-e8c162613b75fb3b269830defa769728f439db72.zip hdf5-e8c162613b75fb3b269830defa769728f439db72.tar.gz hdf5-e8c162613b75fb3b269830defa769728f439db72.tar.bz2 |
[svn-r25497] Description:
Merge changes that correspond to the 64-bit ID changes (without the actual
switch to 64-bit IDs) to the 1.8 release branch. (Plus a few minor cleanups
and alignments with the trunk 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.h | 8 |
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)) /****************************/ |