aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/LargeFiles.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-04-30 10:00:29 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2017-04-30 10:00:29 +0200
commitd9c6729c9df44fcaf894cc966e4e2a8ae7109bc3 (patch)
tree24f0e6518939f38330ea51095c88e7f08fdb8bcf /cmake/LargeFiles.c
parent61f67d4dd3f81560417c7b8d1bd5b2611eb7a001 (diff)
parentb6fe7f8535355eb8025f4872efef6cd7d3993db6 (diff)
downloadexternal_heimdall-d9c6729c9df44fcaf894cc966e4e2a8ae7109bc3.zip
external_heimdall-d9c6729c9df44fcaf894cc966e4e2a8ae7109bc3.tar.gz
external_heimdall-d9c6729c9df44fcaf894cc966e4e2a8ae7109bc3.tar.bz2
Merge branch 'master' of https://github.com/Benjamin-Dobell/Heimdall into cm-12.1
Diffstat (limited to 'cmake/LargeFiles.c')
-rw-r--r--cmake/LargeFiles.c15
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;
+}