aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext/stdio_sync_filebuf.h
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2003-11-21 20:30:12 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2003-11-21 20:30:12 +0000
commit5c89246dfba0114a9a5954a0ea00a9f06c7ff923 (patch)
tree6deb989f1a08bf67e4fe02d7dbaee357ed2dddb0 /libstdc++-v3/include/ext/stdio_sync_filebuf.h
parent9cca376f2deab04bbb8c358b67b09146af2943d7 (diff)
downloadgcc-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
Diffstat (limited to 'libstdc++-v3/include/ext/stdio_sync_filebuf.h')
-rw-r--r--libstdc++-v3/include/ext/stdio_sync_filebuf.h6
1 files changed, 5 insertions, 1 deletions
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;
}