-
-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove code paths where long long < 8 bytes (#3098)
The C99 standard says that a long long is 8+ bytes. This change removes a few parts of the code where we assume that a long long could be less than that.
- Loading branch information
Showing
2 changed files
with
4 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,6 @@ | |
* [email protected]. * | ||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
|
||
/* | ||
* Programmer: Robb Matzke | ||
* Wednesday, April 8, 1998 | ||
* Modified: Albert Cheng | ||
* September 11, 2010 | ||
*/ | ||
/* | ||
* The purpose of this test is to verify if a virtual file driver can handle: | ||
* a. Large file (2GB) | ||
|
@@ -62,12 +56,6 @@ | |
|
||
#define MAX_TRIES 100 | ||
|
||
#if H5_SIZEOF_LONG_LONG >= 8 | ||
#define GB8LL ((unsigned long long)8 * 1024 * 1024 * 1024) | ||
#else | ||
#define GB8LL 0 /*cannot do the test*/ | ||
#endif | ||
|
||
/* Define Small, Large, Extra Large, Huge File which | ||
* correspond to less than 2GB, 2GB, 4GB, and tens of GB file size. | ||
* NO_FILE stands for "no file" to be tested. | ||
|
@@ -330,7 +318,7 @@ static int | |
writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n) | ||
{ | ||
hsize_t size1[4] = {8, 1024, 1024, 1024}; | ||
hsize_t size2[1] = {GB8LL}; | ||
hsize_t size2[1] = {8LL * 1024LL * 1024LL * 1024LL}; | ||
hsize_t hs_start[1]; | ||
hsize_t hs_size[1]; | ||
hid_t file = -1, space1 = -1, space2 = -1, mem_space = -1, d1 = -1, d2 = -1; | ||
|
@@ -689,12 +677,6 @@ test_family(hid_t fapl) | |
* because we would generate multi-gigabyte files. | ||
*/ | ||
HDputs("Checking if file system is adequate for this test..."); | ||
if (sizeof(long long) < 8 || 0 == GB8LL) { | ||
HDputs("Test skipped because sizeof(long long) is too small. This"); | ||
HDputs("hardware apparently doesn't support 64-bit integer types."); | ||
usage(); | ||
goto quit; | ||
} | ||
if (!sparse_support) { | ||
HDputs("Test skipped because file system does not support holes."); | ||
usage(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters