From e7643394b0a3d761b438ff22a7b6372d1182dd15 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 16 Nov 1998 14:08:18 -0500 Subject: [svn-r916] Problem: In machine (e.g. O2K) where long long and long are the same sizes, it ended up defining GB8LL as 1 which is way too small for the dataset size. Solution: Add an entry to define GB8LL if long can hold it. When all fails, define GB8LL as 0. During runtime, enough_room() will detect this special value and skips the test. Platform tested: O2K IRIX64. --- test/big.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/big.c b/test/big.c index fc51e6e..58e7fbc 100644 --- a/test/big.c +++ b/test/big.c @@ -33,8 +33,10 @@ #define GB8LL ((unsigned long long)8*1024*1024*1024) #elif SIZEOF___INT64 > SIZEOF_LONG #define GB8LL ((unsigned __int64)8*1024*1024*1024) +#elif SIZEOF_LONG >= 8 +#define GB8LL ((unsigned long)8*1024*1024*1024) #else -#define GB8LL ((long)1) +#define GB8LL ((unsigned long)0) /* can not do the test */ #endif static hsize_t @@ -135,6 +137,10 @@ enough_room(void) size_t i, size = (size_t)1 << 30; char name[32]; + /* verify if this machine supports 8GB sizes */ + if (GB8LL==0) + goto done; + /* Initialize file descriptors */ for (i=0; i