summaryrefslogtreecommitdiffstats
path: root/test/big.c
diff options
context:
space:
mode:
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;