summaryrefslogtreecommitdiffstats
path: root/test/big.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-11-16 19:08:18 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-11-16 19:08:18 (GMT)
commite7643394b0a3d761b438ff22a7b6372d1182dd15 (patch)
tree3ac321e6731ba4150502cc0248bbcc871b7467fd /test/big.c
parentdf77c715ccec86c58b648ad780dc84f633a929b8 (diff)
downloadhdf5-e7643394b0a3d761b438ff22a7b6372d1182dd15.zip
hdf5-e7643394b0a3d761b438ff22a7b6372d1182dd15.tar.gz
hdf5-e7643394b0a3d761b438ff22a7b6372d1182dd15.tar.bz2
[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.
Diffstat (limited to 'test/big.c')
-rw-r--r--test/big.c8
1 files changed, 7 insertions, 1 deletions
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<NELMTS(fd); i++) fd[i] = -1;