aboutsummaryrefslogtreecommitdiff
path: root/include/__std_stream
diff options
context:
space:
mode:
authorDavid Chisnall <theraven@FreeBSD.org>2012-03-13 14:09:15 +0000
committerDavid Chisnall <theraven@FreeBSD.org>2012-03-13 14:09:15 +0000
commit362d815b81e2b4b66c33b99203d821b8928607e1 (patch)
tree491848d33dbdf1751fd52f321d3fbf70a8e616f2 /include/__std_stream
parent1828c5696f7bf5850943ea6c660a493a5e648669 (diff)
downloadsrc-362d815b81e2b4b66c33b99203d821b8928607e1.tar.gz
src-362d815b81e2b4b66c33b99203d821b8928607e1.zip
Import new version of libc++ into vendor branch.vendor/libc++/r152501
Approved by: dim (mentor)
Notes
Notes: svn path=/vendor/libc++/dist/; revision=232924 svn path=/vendor/libc++/r152501/; revision=232925; tag=vendor/libc++/r152501
Diffstat (limited to 'include/__std_stream')
-rw-r--r--include/__std_stream10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/__std_stream b/include/__std_stream
index 6df6556da767..e562e2c47304 100644
--- a/include/__std_stream
+++ b/include/__std_stream
@@ -17,13 +17,15 @@
#include <__locale>
#include <cstdio>
+#include <__undef_min_max>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
-static const unsigned __limit = 8;
+static const int __limit = 8;
// __stdinbuf
@@ -102,7 +104,7 @@ __stdinbuf<_CharT>::__getchar(bool __consume)
int __nread = _VSTD::max(1, __encoding_);
for (int __i = 0; __i < __nread; ++__i)
{
- char __c = getc(__file_);
+ int __c = getc(__file_);
if (__c == EOF)
return traits_type::eof();
__extbuf[__i] = static_cast<char>(__c);
@@ -129,7 +131,7 @@ __stdinbuf<_CharT>::__getchar(bool __consume)
if (__nread == sizeof(__extbuf))
return traits_type::eof();
{
- char __c = getc(__file_);
+ int __c = getc(__file_);
if (__c == EOF)
return traits_type::eof();
__extbuf[__nread] = static_cast<char>(__c);
@@ -266,7 +268,7 @@ __stdoutbuf<_CharT>::overflow(int_type __c)
if (__r == codecvt_base::partial)
{
this->setp((char_type*)__e, this->pptr());
- this->pbump(this->epptr() - this->pbase());
+ this->pbump(static_cast<int>(this->epptr() - this->pbase()));
}
}
else