OSDN Git Service

2003-11-21 Paolo Carlini <pcarlini@suse.de>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Nov 2003 20:30:12 +0000 (20:30 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Nov 2003 20:30:12 +0000 (20:30 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73815 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/aclocal.m4
libstdc++-v3/configure
libstdc++-v3/include/ext/stdio_sync_filebuf.h

index 5e600e6..abce904 100644 (file)
@@ -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.
index a9ee4e0..7455b69 100644 (file)
@@ -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])
index ea472fd..efbf8c3 100644 (file)
@@ -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 -*-
 
index 72ecf6d..fa0050a 100755 (executable)
@@ -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;
index 4727c6b..e610912 100644 (file)
@@ -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;
       }