Bug 1471177 - Use mingw-specific IFStream and OFStream implementation only when building againstd libstdc++. r=froydnj
MozReview-Commit-ID: 6aKGtK7B74z
--- 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(); }