summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXuan Bai <xuanbai@hdfgroup.org>2004-12-23 19:22:12 (GMT)
committerXuan Bai <xuanbai@hdfgroup.org>2004-12-23 19:22:12 (GMT)
commitd2d435507c50314153b886a8c864f546f16e26f2 (patch)
tree243ac6c52267ea44d2adf021af75e76f442b71a8
parent90f25e2a4902d71c512f5877fea197ca7e72b99b (diff)
downloadhdf5-d2d435507c50314153b886a8c864f546f16e26f2.zip
hdf5-d2d435507c50314153b886a8c864f546f16e26f2.tar.gz
hdf5-d2d435507c50314153b886a8c864f546f16e26f2.tar.bz2
[svn-r9709] Purpose:
Bug fix. Description: For definitions related to the file stat utilties are included in hdf5/src/h5private.h as following: #ifdef WIN32 #ifdef __MWERKS__ #define HDfstat(F,B) fstat(F,B) typedef struct stat h5_stat_t; typedef off_t h5_stat_size_t; #else /*MSVC*/ #define HDfstat(F,B) _fstati64(F,B) typedef struct _stati64 h5_stat_t; typedef __int64 h5_stat_size_t; #endif #else #define HDfstat(F,B) fstat(F,B) typedef struct stat h5_stat_t; typedef off_t h5_stat_size_t; #endif So, on CodeWarrior, these file stat utilities were defined as off_t. However, in hdf5/tools/misc/h5repart.c, the above file stat utilities on CodeWarrior were defined as __int64 due to missing the Macro for CodeWarrior: #ifdef WIN32 _int64 left_overs=0; /*amount of zeros left over */ _int64 src_offset=0; /*offset in source member */ _int64 dst_offset=0; /*offset in destination member */ _int64 src_size; /*source logical member size */ _int64 src_act_size; /*source actual member size */ _int64 dst_size=1 GB; /*destination logical memb size */ #else off_t left_overs=0; /*amount of zeros left over */ off_t src_offset=0; /*offset in source member */ off_t dst_offset=0; /*offset in destination member */ off_t src_size; /*source logical member size */ off_t src_act_size; /*source actual member size */ off_t dst_size=1 GB; /*destination logical memb size */ #endif Solution: Add the CodeWarrior Macro for above codes in h5repart.c, so those file stat utilties match with the definitions in h5private.h. #if defined(WIN32) && ! defined (__MWERKS__) _int64 left_overs=0; /*amount of zeros left over */ _int64 src_offset=0; /*offset in source member */ _int64 dst_offset=0; /*offset in destination member */ _int64 src_size; /*source logical member size */ _int64 src_act_size; /*source actual member size */ _int64 dst_size=1 GB; /*destination logical memb size */ #else off_t left_overs=0; /*amount of zeros left over */ off_t src_offset=0; /*offset in source member */ off_t dst_offset=0; /*offset in destination member */ off_t src_size; /*source logical member size */ off_t src_act_size; /*source actual member size */ off_t dst_size=1 GB; /*destination logical memb size */ #endif Platforms tested: Heping. Visual Studio 6.0 on Windows XP. CodeWarrior 8.0 on Windows XP. Misc. update:
-rw-r--r--tools/misc/h5repart.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index 2c72852..0518a76 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -208,8 +208,7 @@ main (int argc, char *argv[])
int dst_is_family; /*is dst name a family name? */
int dst_membno=0; /*destination member number */
-#ifdef WIN32
-
+#if defined(WIN32) && ! defined (__MWERKS__)
_int64 left_overs=0; /*amount of zeros left over */
_int64 src_offset=0; /*offset in source member */
_int64 dst_offset=0; /*offset in destination member */