fix: largefile support cmake tests (#4627)

This commit is contained in:
Charles Kerr 2023-01-21 12:20:10 -06:00 committed by GitHub
parent 0da0a55259
commit c03e9b1a8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -7,8 +7,11 @@ if(NOT DEFINED NO_LFS_MACROS_REQUIRED)
# We can't simply define LARGE_OFF_T to be 9223372036854775807,
# since some C++ compilers masquerading as C compilers
# incorrectly reject 9223372036854775807.
set(LFS_TEST_PROGRAM
"#include <sys/types.h>
#
# Begin with a linefeed to ensure the first line isn't part
# of the #defines below
set(LFS_TEST_PROGRAM "
#include <sys/types.h>
#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() { return 0; }")