In article <[EMAIL PROTECTED]>,
Alan DeKok <[EMAIL PROTECTED]> wrote:
>"Miquel van Smoorenburg" <[EMAIL PROTECTED]> wrote:
>> So for freeradius to handle > 2GB files on Linux (and Solaris, and
>> almost any other Unix on a 32 bits processor except FreeBSD which
>> has 64 bits file offsets by default) you need to compile with flags
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>
> Hmm... I wasn't aware of those options. Would there be any impact
>with using them? Or should they be turned on in a 'configure' option?
I'm not sure. INN has LFS (Large File Summit) support, and they
handle it in configure, since apparently some systems force
you to link to an extra library.
dnl If configuring with large file support, determine the right flags to
dnl use based on the platform. This is the wrong approach; autoconf 2.50
dnl comes with a macro that takes the right approach. But this works well
dnl enough until we switch to autoconf 2.50 or later.
if test x"$inn_enable_largefiles" = xyes ; then
AC_MSG_CHECKING(for largefile linkage)
case "$host" in
*-aix4.[01]*)
AC_MSG_RESULT(no)
AC_MSG_ERROR([AIX before 4.2 does not support large files])
;;
*-aix4*)
AC_MSG_RESULT(ok)
LFS_CFLAGS="-D_LARGE_FILES"
LFS_LDFLAGS=""
LFS_LIBS=""
;;
*-hpux*)
AC_MSG_RESULT(ok)
LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
LFS_LDFLAGS=""
LFS_LIBS=""
;;
*-irix*)
AC_MSG_RESULT(no)
AC_MSG_ERROR([Large files not supported on this platform])
;;
*-linux*)
AC_MSG_RESULT(maybe)
LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
LFS_LDFLAGS=""
LFS_LIBS=""
AC_DEFINE([_GNU_SOURCE], 1,
[Some versions of glibc need this defined for pread/pwrite.])
;;
*-solaris*)
AC_MSG_RESULT(ok)
AC_PATH_PROG(GETCONF, getconf)
if test -z "$GETCONF" ; then
AC_MSG_ERROR([getconf required to configure large file support])
fi
LFS_CFLAGS=`$GETCONF LFS_CFLAGS`
LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS`
LFS_LIBS=`$GETCONF LFS_LIBS`
;;
*)
AC_MSG_RESULT(maybe)
LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
LFS_LDFLAGS=""
LFS_LIBS=""
;;
esac
AC_SUBST(LFS_CFLAGS)
AC_SUBST(LFS_LDFLAGS)
AC_SUBST(LFS_LIBS)
fi
Mike.
--
Computers are useless, they only give answers. --Pablo Picasso
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html