Bug 1441558 Do not compile the Poison IO Interposer on MinGW r?froydnj
MozReview-Commit-ID: DNkqdZNuUfK
old mode 100644
new mode 100755
--- a/xpcom/build/PoisonIOInterposer.h
+++ b/xpcom/build/PoisonIOInterposer.h
@@ -31,17 +31,17 @@ void MozillaUnRegisterDebugHandle(intptr
/** Unregister file descriptor from being ignored by poisoning IO interposer */
void MozillaUnRegisterDebugFD(int aFd);
/** Unregister file from being ignored by poisoning IO interposer */
void MozillaUnRegisterDebugFILE(FILE* aFile);
MOZ_END_EXTERN_C
-#if defined(XP_WIN) || defined(XP_MACOSX)
+#if defined(XP_MACOSX) || (defined(XP_WIN) && !defined(__MINGW32__))
#ifdef __cplusplus
namespace mozilla {
/**
* Check if a file is registered as a debug file.
*/
bool IsDebugFile(intptr_t aFileID);
@@ -68,17 +68,17 @@ void OnlyReportDirtyWrites();
* Clear IO poisoning, this is only safe to do on the main-thread when no other
* threads are running.
*/
void ClearPoisonIOInterposer();
} // namespace mozilla
#endif /* __cplusplus */
-#else /* XP_WIN || XP_MACOSX */
+#else /* defined(XP_MACOSX) || (defined(XP_WIN) && !defined(__MINGW32__)) */
#ifdef __cplusplus
namespace mozilla {
inline bool IsDebugFile(intptr_t aFileID) { return true; }
inline void InitPoisonIOInterposer() {}
inline void ClearPoisonIOInterposer() {}
#ifdef XP_MACOSX
inline void OnlyReportDirtyWrites() {}
old mode 100644
new mode 100755
--- a/xpcom/build/moz.build
+++ b/xpcom/build/moz.build
@@ -23,21 +23,24 @@ EXPORTS.mozilla += [
'PoisonIOInterposer.h',
'XPCOM.h',
'XREAppData.h',
]
if CONFIG['OS_ARCH'] == 'WINNT':
EXPORTS += ['nsWindowsDllInterceptor.h']
EXPORTS.mozilla += ['perfprobe.h']
- SOURCES += [
- 'perfprobe.cpp',
- 'PoisonIOInterposerBase.cpp',
- 'PoisonIOInterposerWin.cpp',
- ]
+ SOURCES += ['perfprobe.cpp']
+ if CONFIG['CC_TYPE'] != 'gcc':
+ SOURCES += [
+ 'PoisonIOInterposerBase.cpp',
+ 'PoisonIOInterposerWin.cpp',
+ ]
+ else:
+ SOURCES += ['PoisonIOInterposerStub.cpp']
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += [
'PoisonIOInterposerBase.cpp',
'PoisonIOInterposerMac.cpp',
]
SOURCES += ['mach_override.c']
SOURCES['mach_override.c'].flags += ['-Wno-unused-function']
else: