diff options
author | Paolo Carlini <pcarlini@suse.de> | 2003-11-21 20:30:12 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2003-11-21 20:30:12 +0000 |
commit | 5c89246dfba0114a9a5954a0ea00a9f06c7ff923 (patch) | |
tree | 6deb989f1a08bf67e4fe02d7dbaee357ed2dddb0 | |
parent | 9cca376f2deab04bbb8c358b67b09146af2943d7 (diff) | |
download | gcc-5c89246dfba0114a9a5954a0ea00a9f06c7ff923.zip gcc-5c89246dfba0114a9a5954a0ea00a9f06c7ff923.tar.gz gcc-5c89246dfba0114a9a5954a0ea00a9f06c7ff923.tar.bz2 |
PR libstdc++/12882 (partial)
2003-11-21 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12882 (partial)
* acinclude.m4 (GLIBCXX_CHECK_LFS): Check fseeko64
and ftello64 too.
* include/ext/stdio_sync_filebuf.h (seekoff): Use fseeko64
and ftello64 if available.
* aclocal.m4: Regenerate.
* configure: Ditto.
From-SVN: r73815
-rw-r--r-- | libstdc++-v3/ChangeLog | 10 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 5 | ||||
-rw-r--r-- | libstdc++-v3/aclocal.m4 | 9 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 11 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/stdio_sync_filebuf.h | 6 |
5 files changed, 33 insertions, 8 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5e600e6..abce904 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2003-11-21 Paolo Carlini <pcarlini@suse.de> + + PR libstdc++/12882 (partial) + * acinclude.m4 (GLIBCXX_CHECK_LFS): Check fseeko64 + and ftello64 too. + * include/ext/stdio_sync_filebuf.h (seekoff): Use fseeko64 + and ftello64 if available. + * aclocal.m4: Regenerate. + * configure: Ditto. + 2003-11-20 Benjamin Kosnik <bkoz@redhat.com> * include/debug/formatter.h: Use _Tp as template argument. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index a9ee4e0..7455b69 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -600,7 +600,10 @@ AC_DEFUN(GLIBCXX_CHECK_LFS, [ [#include <unistd.h> #include <stdio.h> ], - [fopen64("t", "w"); + [FILE* fp; + fopen64("t", "w"); + fseeko64(fp, 0, SEEK_CUR); + ftello64(fp); lseek64(1, 0, SEEK_CUR);], [glibcxx_cv_LFS=yes], [glibcxx_cv_LFS=no]) diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4 index ea472fd..efbf8c3 100644 --- a/libstdc++-v3/aclocal.m4 +++ b/libstdc++-v3/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.7.8 -*- Autoconf -*- +# generated automatically by aclocal 1.7.9 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. @@ -613,7 +613,10 @@ AC_DEFUN(GLIBCXX_CHECK_LFS, [ [#include <unistd.h> #include <stdio.h> ], - [fopen64("t", "w"); + [FILE* fp; + fopen64("t", "w"); + fseeko64(fp, 0, SEEK_CUR); + ftello64(fp); lseek64(1, 0, SEEK_CUR);], [glibcxx_cv_LFS=yes], [glibcxx_cv_LFS=no]) @@ -2009,7 +2012,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.7.8])]) + [AM_AUTOMAKE_VERSION([1.7.9])]) # Helper functions for option handling. -*- Autoconf -*- diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 72ecf6d..fa0050a 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -3795,6 +3795,7 @@ cygwin* | mingw* |pw32*) ;; darwin* | rhapsody*) + # this will be overwritten by pass_all, but leave it in just in case lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in @@ -3805,6 +3806,7 @@ darwin* | rhapsody*) lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac + lt_cv_deplibs_check_method=pass_all ;; freebsd* ) @@ -4267,7 +4269,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4270 "configure"' > conftest.$ac_ext + echo '#line 4272 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4871,7 +4873,7 @@ fi; # # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 4874 "configure" +#line 4876 "configure" struct S { ~S(); }; void bar(); void foo() @@ -26898,7 +26900,10 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -fopen64("t", "w"); +FILE* fp; + fopen64("t", "w"); + fseeko64(fp, 0, SEEK_CUR); + ftello64(fp); lseek64(1, 0, SEEK_CUR); ; return 0; diff --git a/libstdc++-v3/include/ext/stdio_sync_filebuf.h b/libstdc++-v3/include/ext/stdio_sync_filebuf.h index 4727c6b..e610912 100644 --- a/libstdc++-v3/include/ext/stdio_sync_filebuf.h +++ b/libstdc++-v3/include/ext/stdio_sync_filebuf.h @@ -180,9 +180,13 @@ namespace __gnu_cxx __whence = SEEK_CUR; else __whence = SEEK_END; - +#ifdef _GLIBCXX_USE_LFS + if (!fseeko64(_M_file, __off, __whence)) + __ret = std::streampos(ftello64(_M_file)); +#else if (!fseek(_M_file, __off, __whence)) __ret = std::streampos(std::ftell(_M_file)); +#endif return __ret; } |