diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-13 14:33:51 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-13 14:33:51 +0000 |
commit | fb5b547845302fe64f118f9bc5eb0ef636cfafb7 (patch) | |
tree | dade2ef6bd2186d3a9957430326143c3accaa25d /binutils/configure.in | |
parent | 2a1b9a480accc2f7049279646ba33cd887eb3abe (diff) | |
download | binutils-gdb-fb5b547845302fe64f118f9bc5eb0ef636cfafb7.tar.gz |
* strings.c (statbuf): New typedef.
(file_stat): Define.
(strings_object_file): Avoid using get_file_size, instead do the
checks here, using file_stat.
* configure.in (HAVE_STAT64): New test.
* configure: Rebuilt.
* config.in: Rebuilt.
Diffstat (limited to 'binutils/configure.in')
-rw-r--r-- | binutils/configure.in | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/binutils/configure.in b/binutils/configure.in index 88890843983..3eaa8251649 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -118,10 +118,27 @@ 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 +AC_MSG_CHECKING([for stat64]) +AC_CACHE_VAL(bu_cv_have_stat64, +[AC_TRY_LINK([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);], +bu_cv_have_stat64=yes, +[saved_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" + AC_TRY_LINK([#include <sys/stat.h>], [struct stat64 st; stat64 ("/tmp/foo", &st);], +bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE", +bu_cv_have_stat64=no) + CPPFLAGS=$saved_CPPFLAGS])]) +AC_MSG_RESULT($bu_cv_have_stat64) +if test "$bu_cv_have_stat64" != no; then + AC_DEFINE([HAVE_STAT64], 1, + [Is stat64 available?]) +fi +if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE" \ + || test "$bu_cv_have_stat64" = "need -D_LARGEFILE64_SOURCE"; then + AC_DEFINE([_LARGEFILE64_SOURCE], 1, + [Enable LFS]) + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" fi # Some systems have frexp only in -lm, not in -lc. |