diff options
author | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
commit | 7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19 (patch) | |
tree | 077f044b08d256dd8348f977fe56d18c08fccd78 /contrib/libc++/include/fstream | |
parent | d83b894ff4280333de5ef40496cfd061b515ba54 (diff) | |
parent | baa75b9984d33ea49ffb76a73507b64d879166cc (diff) | |
download | FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.zip FreeBSD-src-7bd22d0949674b61e2c1a97cbb6caeeb5ab7fd19.tar.gz |
Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!
Approved by: dim (mentor)
Diffstat (limited to 'contrib/libc++/include/fstream')
-rw-r--r-- | contrib/libc++/include/fstream | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/libc++/include/fstream b/contrib/libc++/include/fstream index b6a2ab0..8e1b1fb 100644 --- a/contrib/libc++/include/fstream +++ b/contrib/libc++/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; |