Compute the size of off_t and bypass the checks for fopen64() and stat64()
if off_t is 64-bit. Otherwise, we get fatal (due to -Werror) warnings on Mac OS X 10.6 because stat64() is deprecated on that host.
This commit is contained in:
parent
ef66228296
commit
1e0ab6fbf0
@ -94,7 +94,17 @@ AC_CHECK_FUNC([mkdtemp],
|
|||||||
[Define to 1 if you have the `mkdtemp' function.]))
|
[Define to 1 if you have the `mkdtemp' function.]))
|
||||||
|
|
||||||
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
|
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
|
||||||
# needs to be defined for it
|
# needs to be defined for it.
|
||||||
|
#
|
||||||
|
# If off_t is 64-bit, then we don't need to bother. It's important to
|
||||||
|
# try and avoid these calls if we can because some platforms that have
|
||||||
|
# them (e.g. Mac OS X 10.6) mark them as deprecated and they cause
|
||||||
|
# fatal (due to -Werror) warnings.
|
||||||
|
AC_CHECK_SIZEOF(off_t)
|
||||||
|
if test x"${ac_cv_sizeof_off_t}" = x8; then
|
||||||
|
bu_cv_have_fopen64=no
|
||||||
|
bu_cv_have_stat64=no
|
||||||
|
fi
|
||||||
AC_MSG_CHECKING([for fopen64])
|
AC_MSG_CHECKING([for fopen64])
|
||||||
AC_CACHE_VAL(bu_cv_have_fopen64,
|
AC_CACHE_VAL(bu_cv_have_fopen64,
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");])],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");])],
|
||||||
|
Loading…
Reference in New Issue
Block a user