summaryrefslogtreecommitdiff
path: root/openjpeg/cmake/TestFileOffsetBits.c
diff options
context:
space:
mode:
Diffstat (limited to 'openjpeg/cmake/TestFileOffsetBits.c')
-rw-r--r--openjpeg/cmake/TestFileOffsetBits.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openjpeg/cmake/TestFileOffsetBits.c b/openjpeg/cmake/TestFileOffsetBits.c
new file mode 100644
index 000000000..cd679c113
--- /dev/null
+++ b/openjpeg/cmake/TestFileOffsetBits.c
@@ -0,0 +1,11 @@
+#include <sys/types.h>
+
+/* Cause a compile-time error if off_t is smaller than 64 bits */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+int off_t_is_large[ (LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1 ];
+
+int main(int argc, char **argv)
+{
+ return 0;
+}
+