Commit 5c89246d by Paolo Carlini Committed by Paolo Carlini

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
parent 9cca376f
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> 2003-11-20 Benjamin Kosnik <bkoz@redhat.com>
* include/debug/formatter.h: Use _Tp as template argument. * include/debug/formatter.h: Use _Tp as template argument.
......
...@@ -600,7 +600,10 @@ AC_DEFUN(GLIBCXX_CHECK_LFS, [ ...@@ -600,7 +600,10 @@ AC_DEFUN(GLIBCXX_CHECK_LFS, [
[#include <unistd.h> [#include <unistd.h>
#include <stdio.h> #include <stdio.h>
], ],
[fopen64("t", "w"); [FILE* fp;
fopen64("t", "w");
fseeko64(fp, 0, SEEK_CUR);
ftello64(fp);
lseek64(1, 0, SEEK_CUR);], lseek64(1, 0, SEEK_CUR);],
[glibcxx_cv_LFS=yes], [glibcxx_cv_LFS=yes],
[glibcxx_cv_LFS=no]) [glibcxx_cv_LFS=no])
......
# 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 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
...@@ -613,7 +613,10 @@ AC_DEFUN(GLIBCXX_CHECK_LFS, [ ...@@ -613,7 +613,10 @@ AC_DEFUN(GLIBCXX_CHECK_LFS, [
[#include <unistd.h> [#include <unistd.h>
#include <stdio.h> #include <stdio.h>
], ],
[fopen64("t", "w"); [FILE* fp;
fopen64("t", "w");
fseeko64(fp, 0, SEEK_CUR);
ftello64(fp);
lseek64(1, 0, SEEK_CUR);], lseek64(1, 0, SEEK_CUR);],
[glibcxx_cv_LFS=yes], [glibcxx_cv_LFS=yes],
[glibcxx_cv_LFS=no]) [glibcxx_cv_LFS=no])
...@@ -2009,7 +2012,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) ...@@ -2009,7 +2012,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
# Call AM_AUTOMAKE_VERSION so it can be traced. # Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 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 -*- # Helper functions for option handling. -*- Autoconf -*-
......
...@@ -3795,6 +3795,7 @@ cygwin* | mingw* |pw32*) ...@@ -3795,6 +3795,7 @@ cygwin* | mingw* |pw32*)
;; ;;
darwin* | rhapsody*) 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_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_cmd='/usr/bin/file -L'
case "$host_os" in case "$host_os" in
...@@ -3805,6 +3806,7 @@ darwin* | rhapsody*) ...@@ -3805,6 +3806,7 @@ darwin* | rhapsody*)
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
;; ;;
esac esac
lt_cv_deplibs_check_method=pass_all
;; ;;
freebsd* ) freebsd* )
...@@ -4267,7 +4269,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" ...@@ -4267,7 +4269,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in case $host in
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # 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 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
...@@ -4871,7 +4873,7 @@ fi; ...@@ -4871,7 +4873,7 @@ fi;
# #
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 4874 "configure" #line 4876 "configure"
struct S { ~S(); }; struct S { ~S(); };
void bar(); void bar();
void foo() void foo()
...@@ -26898,7 +26900,10 @@ cat >>conftest.$ac_ext <<_ACEOF ...@@ -26898,7 +26900,10 @@ cat >>conftest.$ac_ext <<_ACEOF
int int
main () main ()
{ {
fopen64("t", "w"); FILE* fp;
fopen64("t", "w");
fseeko64(fp, 0, SEEK_CUR);
ftello64(fp);
lseek64(1, 0, SEEK_CUR); lseek64(1, 0, SEEK_CUR);
; ;
return 0; return 0;
...@@ -180,9 +180,13 @@ namespace __gnu_cxx ...@@ -180,9 +180,13 @@ namespace __gnu_cxx
__whence = SEEK_CUR; __whence = SEEK_CUR;
else else
__whence = SEEK_END; __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)) if (!fseek(_M_file, __off, __whence))
__ret = std::streampos(std::ftell(_M_file)); __ret = std::streampos(std::ftell(_M_file));
#endif
return __ret; return __ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment