X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=cmake%2FTestFileOffsetBits.c;h=cd679c1130cd0d3733fa6d16fb5006541990f7bd;hb=14d03e8ed5dcdb8552c8a4c7c9a383b29a6891cb;hp=993b2da43e9a6c423b5604285d881f4ea12f09a9;hpb=d518970039a19a2a9b6d2bdd592cc88a43897bbb;p=openjpeg.git diff --git a/cmake/TestFileOffsetBits.c b/cmake/TestFileOffsetBits.c index 993b2da4..cd679c11 100644 --- a/cmake/TestFileOffsetBits.c +++ b/cmake/TestFileOffsetBits.c @@ -1,10 +1,11 @@ #include +/* 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) { - /* 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; }