Bug 1471177 - Use mingw-specific IFStream and OFStream implementation only when building againstd libstdc++. r=froydnj, a=RyanVM
authorJacek Caban <jacek@codeweavers.com>
Tue, 26 Jun 2018 13:06:17 +0200
changeset 449904 ce326730c91e68c227d4d7f854001335bbb21982
parent 449903 c01e26f35e0293041c183f72740f601bc5098cfe
child 449905 b8d266ef27f9801e8b3b3760ce93e4e16c6d8eb7
push id113
push userryanvm@gmail.com
push dateFri, 13 Jul 2018 21:59:42 +0000
treeherdermozilla-esr60@c633b410482c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, RyanVM
bugs1471177
milestone60.1.1
Bug 1471177 - Use mingw-specific IFStream and OFStream implementation only when building againstd libstdc++. r=froydnj, a=RyanVM 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(); }