summaryrefslogtreecommitdiff
path: root/tests/coreutils.c
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2023-07-25 14:58:33 -0700
committerMatthew Sotoudeh <matthew@masot.net>2023-07-25 14:58:33 -0700
commit1d943da0cf9154e7ce78ce867cdbb91531c5d78e (patch)
tree40c5c6c3ba7fafa6567aa5b5aa216caecf3935fc /tests/coreutils.c
initial dietc commit
Diffstat (limited to 'tests/coreutils.c')
-rw-r--r--tests/coreutils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/coreutils.c b/tests/coreutils.c
new file mode 100644
index 0000000..60b9176
--- /dev/null
+++ b/tests/coreutils.c
@@ -0,0 +1,16 @@
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+
+int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback