diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-12-04 10:11:22 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-12-04 10:11:22 +0000 |
commit | cedd9a58070bd8620dfb12983a53249c776b6872 (patch) | |
tree | 2e3b1a0914acdbbe4c2f42b01049d747f3e88715 /binutils/configure | |
parent | d126725049bcee3c863e3908d1ea51cc5e13afed (diff) | |
download | gdb-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')
-rwxr-xr-x | binutils/configure | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/binutils/configure b/binutils/configure index 2268453..6868341 100755 --- a/binutils/configure +++ b/binutils/configure @@ -4899,7 +4899,7 @@ EOF fi -for ac_func in sbrk utimes setmode +for ac_func in sbrk utimes setmode getc_unlocked do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:4906: checking for $ac_func" >&5 @@ -4955,6 +4955,67 @@ fi done +# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE +# needs to be defined for it +echo $ac_n "checking for fopen64""... $ac_c" 1>&6 +echo "configure:4962: checking for fopen64" >&5 +if eval "test \"`echo '$''{'bu_cv_have_fopen64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 4967 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +FILE *f = fopen64 ("/tmp/foo","r"); +; return 0; } +EOF +if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + bu_cv_have_fopen64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + saved_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + cat > conftest.$ac_ext <<EOF +#line 4984 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +FILE *f = fopen64 ("/tmp/foo","r"); +; return 0; } +EOF +if { (eval echo configure:4991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bu_cv_have_fopen64=no +fi +rm -f conftest* +fi +rm -f conftest* +fi + CPPFLAGS=$saved_CPPFLAGS + +echo "$ac_t""$bu_cv_have_fopen64" 1>&6 +if test $bu_cv_have_fopen64 != no; then + cat >> confdefs.h <<\EOF +#define HAVE_FOPEN64 1 +EOF + + if test $bu_cv_have_fopen64 = "need -D_LARGEFILE64_SOURCE"; then + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + fi +fi + # Some systems have frexp only in -lm, not in -lc. echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6 |