diff options
Diffstat (limited to 'cmake/LargeFiles.c')
-rw-r--r-- | cmake/LargeFiles.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/LargeFiles.c b/cmake/LargeFiles.c new file mode 100644 index 0000000..d11ea97 --- /dev/null +++ b/cmake/LargeFiles.c @@ -0,0 +1,15 @@ +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> + +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define VALID_ARRAY_LENGTH 1 +#define INVALID_ARRAY_LENGTH -1 + +int main(int argc, const char **argv) +{ + int a[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? VALID_ARRAY_LENGTH : INVALID_ARRAY_LENGTH]; + off_t offset = ftello(NULL); + fseeko(NULL, offset, SEEK_SET); + return 0; +} |