From bd6857eab69cd6db493f710aa3b240903b7706e7 Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Fri, 3 Sep 2004 14:27:40 -0500 Subject: [svn-r9203] Purpose: bug fix Description: Description: the dataset region reference data was not portable between the Cray T3E and other machines Solution: this was due to the fact that the buffer to store the heap ID and index was using a sizeof(int) for its size 4 is used instead of sizeof(int) to permit portability between the Crays and other machines (the heap ID is always encoded as an int32 anyway) Solution: Platforms tested: linux aix solaris Misc. update: --- src/H5Rpublic.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index c40fd16..574ce80 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -52,11 +52,14 @@ typedef struct { /* Object reference structure for user's code */ typedef haddr_t hobj_ref_t; /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) */ -#define H5R_DSET_REG_REF_BUF_SIZE (sizeof(haddr_t)+sizeof(int)) +#define H5R_DSET_REG_REF_BUF_SIZE (sizeof(haddr_t)+4) +/* 4 is used instead of sizeof(int) to permit portability between + the Crays and other machines (the heap ID is always encoded as an int32 anyway) +*/ /* Dataset Region reference structure for user's code */ typedef struct { unsigned char heapid[H5R_DSET_REG_REF_BUF_SIZE]; /* Buffer to store heap ID and index */ - /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) plus an int (4 bytes typically, but could be 8 bytes) */ + /* Needs to be large enough to store largest haddr_t in a worst case machine (ie. 8 bytes currently) plus an int */ } hdset_reg_ref_t; /* Publicly visible datastructures */ -- cgit v0.12