Have basic_istream seekg, putback and unget first clear eofbit. Fixes http://llvm.org/bugs/show_bug.cgi?id=13089.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162608 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/istream b/include/istream
index 7312425..b48f856 100644
--- a/include/istream
+++ b/include/istream
@@ -1263,6 +1263,7 @@
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
+ this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __sen(*this, true);
if (__sen)
{
@@ -1290,6 +1291,7 @@
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
+ this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __sen(*this, true);
if (__sen)
{
@@ -1368,6 +1370,7 @@
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
+ this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __sen(*this, true);
if (__sen)
if (this->rdbuf()->pubseekpos(__pos, ios_base::in) == pos_type(-1))