Bug 1471177 - Use mingw-specific IFStream and OFStream implementation only when building againstd libstdc++. r=froydnj
authorJacek Caban <jacek@codeweavers.com>
Tue, 26 Jun 2018 13:06:17 +0200
changeset 423854 23fb443b22143c059267eb254ddd4b2e9fcc4e41
parent 423816 1c235a552c32ba6c97e6030c497c49f72c7d48a8
child 423855 b1342f2deeec2ae5ce47ded5f5de9237412312de
push id104680
push userdluca@mozilla.com
push dateWed, 27 Jun 2018 10:41:30 +0000
treeherdermozilla-inbound@a696f7b13f44 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1471177
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1471177 - Use mingw-specific IFStream and OFStream implementation only when building againstd libstdc++. r=froydnj MozReview-Commit-ID: 6aKGtK7B74z
mfbt/FStream.h
--- a/mfbt/FStream.h
+++ b/mfbt/FStream.h
@@ -13,25 +13,25 @@
 
 #ifndef mozilla_FStream_h
 #define mozilla_FStream_h
 
 #include "mozilla/Char16.h"
 #include <istream>
 #include <ostream>
 #include <fstream>
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) && defined(__GLIBCXX__)
 #include "mozilla/UniquePtr.h"
 #include <fcntl.h>
 #include <ext/stdio_filebuf.h>
 #endif
 
 namespace mozilla {
 
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) && defined(__GLIBCXX__)
 // MinGW does not support wchar_t* overloads that are MSVC extension until
 // C++17, so we have to implement widechar wrappers using a GNU extension.
 class IFStream : public std::istream
 {
 public:
   explicit IFStream(char16ptr_t filename, openmode mode = in);
 
   std::filebuf* rdbuf() const { return mFileBuf.get(); }