diff options
| -rw-r--r-- | modules/FindKDE4Internal.cmake | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 9d9f22cb..230ca1d5 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -873,6 +873,25 @@ if (CMAKE_SYSTEM_NAME MATCHES Linux)     endif (CMAKE_C_COMPILER MATCHES "icc")  endif (CMAKE_SYSTEM_NAME MATCHES Linux) +if (UNIX) +   set ( _KDE4_PLATFORM_DEFINITIONS "${_KDE4_PLATFORM_DEFINITIONS} -D_LARGEFILE64_SOURCE") + +   check_cxx_source_compiles(" +#include <sys/types.h> + /* 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 << 62) - 1 + ((off_t) 1 << 62)) + +  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; +" +      _OFFT_IS_64BIT) + +   if (not ${_OFFT_IS_64BIT}) +     set ( _KDE4_PLATFORM_DEFINITIONS "${_KDE4_PLATFORM_DEFINITIONS} -D_FILE_OFFSET_BITS=64") +   endif (not ${_OFFT_IS_64BIT}) +endif (UNIX)  if (CMAKE_SYSTEM_NAME MATCHES BSD)     set ( _KDE4_PLATFORM_DEFINITIONS -D_GNU_SOURCE ) | 
