aboutsummaryrefslogtreecommitdiffstats
path: root/include/fstream
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/fstream
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/fstream')
-rw-r--r--include/fstream4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/fstream b/include/fstream
index b6a2ab0e158a..8e1b1fb69e25 100644
--- a/include/fstream
+++ b/include/fstream
@@ -171,6 +171,8 @@ typedef basic_fstream<wchar_t> wfstream;
#include <__locale>
#include <cstdio>
+#include <__undef_min_max>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
@@ -547,7 +549,7 @@ basic_filebuf<_CharT, _Traits>::close()
{
__rt = this;
unique_ptr<FILE, int(*)(FILE*)> __h(__file_, fclose);
- if ((__cm_ & ios_base::out) && sync())
+ if (sync())
__rt = 0;
if (fclose(__h.release()) == 0)
__file_ = 0;