From c03e9b1a8e8f0897dfcbba22f73b1ff2b97a7564 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 21 Jan 2023 12:20:10 -0600 Subject: [PATCH] fix: largefile support cmake tests (#4627) --- cmake/LargeFileSupport.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/LargeFileSupport.cmake b/cmake/LargeFileSupport.cmake index a0d59935e..426cbb048 100644 --- a/cmake/LargeFileSupport.cmake +++ b/cmake/LargeFileSupport.cmake @@ -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 + # + # Begin with a linefeed to ensure the first line isn't part + # of the #defines below + set(LFS_TEST_PROGRAM " + #include #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; }")