Module Name: src
Committed By: thorpej
Date: Thu Oct 15 20:35:01 UTC 2009
Modified Files:
src/external/gpl3/binutils/dist/binutils: configure.in
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/binutils/dist/binutils/configure.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/binutils/dist/binutils/configure.in
diff -u src/external/gpl3/binutils/dist/binutils/configure.in:1.1.1.1 src/external/gpl3/binutils/dist/binutils/configure.in:1.2
--- src/external/gpl3/binutils/dist/binutils/configure.in:1.1.1.1 Tue Aug 18 10:13:54 2009
+++ src/external/gpl3/binutils/dist/binutils/configure.in Thu Oct 15 20:35:01 2009
@@ -94,7 +94,17 @@
[Define to 1 if you have the `mkdtemp' function.]))
# 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_CACHE_VAL(bu_cv_have_fopen64,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");])],