aboutsummaryrefslogtreecommitdiff
path: root/binutils/configure.in
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-12-04 10:11:22 +0000
committerJakub Jelinek <jakub@redhat.com>2001-12-04 10:11:22 +0000
commitcedd9a58070bd8620dfb12983a53249c776b6872 (patch)
tree2e3b1a0914acdbbe4c2f42b01049d747f3e88715 /binutils/configure.in
parentd126725049bcee3c863e3908d1ea51cc5e13afed (diff)
downloadgdb-cedd9a58070bd8620dfb12983a53249c776b6872.zip
gdb-cedd9a58070bd8620dfb12983a53249c776b6872.tar.gz
gdb-cedd9a58070bd8620dfb12983a53249c776b6872.tar.bz2
* strings.c: Include config.h before bfd.h.
(file_off): New type. (file_open): Define. (print_strings): Use file_off instead of file_ptr. Print addresses which don't fit into long correctly. (get_char): Use file_off instead of file_ptr. Use getc_unlocked if available. (strings_file): Use file_off instead of file_ptr. Use file_open. * configure.in: Check for getc_unlocked. Check for fopen64 and whether _LARGEFILE64_SOURCE needs to be defined for it. * configure: Rebuilt. * config.h.in: Rebuilt.
Diffstat (limited to 'binutils/configure.in')
-rw-r--r--binutils/configure.in24
1 files changed, 23 insertions, 1 deletions
diff --git a/binutils/configure.in b/binutils/configure.in
index 23d517b..0555852 100644
--- a/binutils/configure.in
+++ b/binutils/configure.in
@@ -100,7 +100,29 @@ AC_SUBST(DEMANGLER_NAME)
AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
AC_HEADER_SYS_WAIT
AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(sbrk utimes setmode)
+AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked)
+
+# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
+# needs to be defined for it
+AC_MSG_CHECKING([for fopen64])
+AC_CACHE_VAL(bu_cv_have_fopen64,
+[AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
+bu_cv_have_fopen64=yes,
+[saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
+bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE",
+bu_cv_have_fopen64=no)
+ CPPFLAGS=$saved_CPPFLAGS])])
+AC_MSG_RESULT($bu_cv_have_fopen64)
+if test $bu_cv_have_fopen64 != no; then
+ AC_DEFINE([HAVE_FOPEN64], 1,
+ [Is fopen64 available?])
+ if test $bu_cv_have_fopen64 = "need -D_LARGEFILE64_SOURCE"; then
+ AC_DEFINE([_LARGEFILE64_SOURCE], 1,
+ [Enable LFS])
+ fi
+fi
# Some systems have frexp only in -lm, not in -lc.
AC_SEARCH_LIBS(frexp, m)