aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext/stdio_sync_filebuf.h
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2004-03-19 19:31:38 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2004-03-19 19:31:38 +0000
commit8268bba6f884dfcbcda28ab0f1500551d75399e7 (patch)
treea90ad99706f5c95504a4981c4047803de06537be /libstdc++-v3/include/ext/stdio_sync_filebuf.h
parent33d13fac08a9400ab517ad8ef4e7e323210bf5f2 (diff)
downloadgcc-8268bba6f884dfcbcda28ab0f1500551d75399e7.zip
gcc-8268bba6f884dfcbcda28ab0f1500551d75399e7.tar.gz
gcc-8268bba6f884dfcbcda28ab0f1500551d75399e7.tar.bz2
re PR libstdc++/12077 ([3.4 only] wcin.rdbuf()->in_avail() return value too high)
2004-03-19 Paolo Carlini <pcarlini@suse.de> Petur Runolfsson <peturr02@ru.is> PR libstdc++/12077 * include/ext/stdio_sync_filebuf.h (showmanyc): Remove, there's no way to find out the conversion used by the underlying FILE*. * testsuite/ext/stdio_sync_filebuf/wchar_t/12077.cc: New. * testsuite/27_io/objects/char/9.cc: Tweak. Co-Authored-By: Petur Runolfsson <peturr02@ru.is> From-SVN: r79695
Diffstat (limited to 'libstdc++-v3/include/ext/stdio_sync_filebuf.h')
-rw-r--r--libstdc++-v3/include/ext/stdio_sync_filebuf.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/libstdc++-v3/include/ext/stdio_sync_filebuf.h b/libstdc++-v3/include/ext/stdio_sync_filebuf.h
index 2076ca5..cdf1e7c 100644
--- a/libstdc++-v3/include/ext/stdio_sync_filebuf.h
+++ b/libstdc++-v3/include/ext/stdio_sync_filebuf.h
@@ -1,6 +1,6 @@
// Iostreams wrapper for stdio FILE* -*- C++ -*-
-// Copyright (C) 2003 Free Software Foundation, Inc.
+// Copyright (C) 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -38,16 +38,6 @@
#include <streambuf>
#include <unistd.h>
-
-#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
-# include <sys/stat.h>
-# ifdef _GLIBCXX_HAVE_S_ISREG
-# define _GLIBCXX_ISREG(x) S_ISREG(x)
-# else
-# define _GLIBCXX_ISREG(x) (((x) & S_IFMT) == S_IFREG)
-# endif
-#endif
-
#include <cstdio>
#ifdef _GLIBCXX_USE_WCHAR_T
@@ -82,7 +72,6 @@ namespace __gnu_cxx
{ }
protected:
-
int_type
syncgetc();
@@ -132,19 +121,6 @@ namespace __gnu_cxx
virtual std::streamsize
xsgetn(char_type* __s, std::streamsize __n);
- virtual std::streamsize
- showmanyc()
- {
-#if defined(_GLIBCXX_HAVE_S_ISREG) || defined(_GLIBCXX_HAVE_S_IFREG)
- // Regular files.
- struct stat __buffer;
- int __ret = fstat(fileno(_M_file), &__buffer);
- if (!__ret && _GLIBCXX_ISREG(__buffer.st_mode))
- return __buffer.st_size - ftell(_M_file);
-#endif
- return 0;
- }
-
virtual int_type
overflow(int_type __c = traits_type::eof())
{