mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Fix detection of _FILE_OFFSET_BITS in CMake
The test wrongly succeeded in C instead of correctly failing in C++ That caused off_t to be different types in core and in modpython on 32-bit systems, and modpython couldn't load with undefined symbol.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// See TestLargeFiles.cmake for the origin of this file
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user