summaryrefslogtreecommitdiff
path: root/cmake/TestFileOffsetBits.c
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-09-28 08:11:41 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-09-28 08:11:41 +0000
commitd518970039a19a2a9b6d2bdd592cc88a43897bbb (patch)
tree57bac2cf7e63e9352228231062763baac627563c /cmake/TestFileOffsetBits.c
parent8363a6ab1e031bb4b2e40a92e56efd40fdab1aa1 (diff)
[trunk] Start FolderReorgProposal task
Update issue 177
Diffstat (limited to 'cmake/TestFileOffsetBits.c')
-rw-r--r--cmake/TestFileOffsetBits.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/TestFileOffsetBits.c b/cmake/TestFileOffsetBits.c
new file mode 100644
index 00000000..993b2da4
--- /dev/null
+++ b/cmake/TestFileOffsetBits.c
@@ -0,0 +1,10 @@
+#include <sys/types.h>
+
+int main(int argc, char **argv)
+{
+ /* 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 ];
+ return 0;
+}
+