On Friday 26 April 2019, Micah Snyder (micasnyd) wrote:

>  > I don't know when it was removed but glibc 2.23 isn't contains it
>  > and AC_SYS_LARGEFILE works.
> 
> I don't have any complaint about setting it AC_SYS_LARGEFILE globally,
> rather than just in the system-installed libmspack condition we have 
> right now.  You're quite right about requiring the glibc version check
> in configure.ac.   

I found interesting example in configure.ac of elfutils 
https://sourceware.org/elfutils/

dnl This test must come as early as possible after the compiler configuration
dnl tests, because the choice of the file model can (in principle) affect
dnl whether functions and headers are available, whether they work, etc.
AC_SYS_LARGEFILE

dnl Older glibc had a broken fts that didn't work with Large File Systems.
dnl We want the version that can handler LFS, but include workaround if we
dnl get a bad one. Add define to CFLAGS (not AC_DEFINE it) since we need to
dnl check it before including config.h (which might define _FILE_OFFSET_BITS).
AC_CACHE_CHECK([whether fts.h is bad when included (with LFS)], ac_cv_bad_fts,
  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <fts.h>]])],
                     ac_cv_bad_fts=no, ac_cv_bad_fts=yes)])
AS_IF([test "x$ac_cv_bad_fts" = "xyes"], [CFLAGS="$CFLAGS -DBAD_FTS=1"])

-- 
Regards, Sergey
_______________________________________________

clamav-devel mailing list
clamav-devel@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-devel

Please submit your patches to our Github: 
https://github.com/Cisco-Talos/clamav-devel/pulls

Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to