Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils/dist/binutils Compute the size of off...



details:   https://anonhg.NetBSD.org/src/rev/fd4e4e1770dd
branches:  trunk
changeset: 748186:fd4e4e1770dd
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Oct 15 20:35:01 2009 +0000

description:
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.

diffstat:

 external/gpl3/binutils/dist/binutils/configure.in |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 4f5a29831963 -r fd4e4e1770dd external/gpl3/binutils/dist/binutils/configure.in
--- a/external/gpl3/binutils/dist/binutils/configure.in Thu Oct 15 17:26:57 2009 +0000
+++ b/external/gpl3/binutils/dist/binutils/configure.in Thu Oct 15 20:35:01 2009 +0000
@@ -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");])],



Home | Main Index | Thread Index | Old Index