1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

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

View file

@ -7,8 +7,11 @@ if(NOT DEFINED NO_LFS_MACROS_REQUIRED)
# We can't simply define LARGE_OFF_T to be 9223372036854775807, # We can't simply define LARGE_OFF_T to be 9223372036854775807,
# since some C++ compilers masquerading as C compilers # since some C++ compilers masquerading as C compilers
# incorrectly reject 9223372036854775807. # 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)) #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 off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1];
int main() { return 0; }") int main() { return 0; }")