aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/LargeFiles64.c
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-11-17 07:02:07 +1100
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-11-17 07:02:39 +1100
commit1ddfdc1a880279ce07b2c43f60b7aa138d4ad315 (patch)
tree4ea142d9013a6dfdf84cab401f561d45ff8ccad4 /cmake/LargeFiles64.c
parentd613a87cdb6b27bf5f36200295f926a91f8d27be (diff)
downloadexternal_heimdall-1ddfdc1a880279ce07b2c43f60b7aa138d4ad315.zip
external_heimdall-1ddfdc1a880279ce07b2c43f60b7aa138d4ad315.tar.gz
external_heimdall-1ddfdc1a880279ce07b2c43f60b7aa138d4ad315.tar.bz2
CMake files for Heimdall CLI and mingw support
Diffstat (limited to 'cmake/LargeFiles64.c')
-rw-r--r--cmake/LargeFiles64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/LargeFiles64.c b/cmake/LargeFiles64.c
new file mode 100644
index 0000000..57826b7
--- /dev/null
+++ b/cmake/LargeFiles64.c
@@ -0,0 +1,16 @@
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.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 = ftello64(NULL);
+ fseeko64(NULL, offset, SEEK_SET);
+ return 0;
+}