ref: 061203c96b229d7eecb14105914353f7419540c0
parent: c2fdff84a0bcd0c17c745d8e06d99657f8023a01
author: cbagwell <cbagwell>
date: Mon Oct 6 22:17:09 EDT 2008
Attempting largefile work around for platforms with broken header files.
--- a/configure.ac
+++ b/configure.ac
@@ -147,6 +147,18 @@
dnl Large File Support
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
+if test "$ac_cv_sys_file_offset_bits" = "64"; then
+ # This is either a 64-bit platform or a 32-bit platform
+ # that supports large files.
+ # There are to many broken glibc+kernel's out there that
+ # detect 64-bit off_t on 32-bit system and require
+ # _LARGEFILE_SOURCE to make fseeko() go into 64-bit mode.
+ # Force defining _LARGEFILE_SOURCE always. My assumption
+ # is its harmlessly ignored on 64-bit platforms and platforms
+ # that chose other solutions.
+ AC_MSG_NOTICE(Forcing _LARGEFILE_SOURCE to be safe since off_t is 64 bits)
+ AC_DEFINE(_LARGEFILE_SOURCE, 1)
+fi
dnl Allow libtool to be silenced
AC_MSG_CHECKING([whether libtool should be silenced])