1From a2cdb0c2e1f54b1affc923df3b492feb0c0b102b Mon Sep 17 00:00:00 2001 2From: David 'Digit' Turner <digit@google.com> 3Date: Thu, 25 Apr 2013 23:08:50 +0200 4Subject: Work-around broken abort() on Android/MIPS. 5 6abort() freezes in the Android MIPS emulator, work around this 7by using exit(1) after flushing all opened files, which should 8match the abort() behaviour. 9--- 10 include/gtest/internal/gtest-port.h | 3 +++ 11 1 file changed, 3 insertions(+) 12 13diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h 14index 0011186..b6159f1 100644 15--- a/include/gtest/internal/gtest-port.h 16+++ b/include/gtest/internal/gtest-port.h 17@@ -1813,6 +1813,9 @@ inline const char* GetEnv(const char* name) { 18 // several places in Google Test. This implementation provides a reasonable 19 // imitation of standard behaviour. 20 void Abort(); 21+#elif defined(__ANDROID__) && defined(__mips__) 22+// Work-around broken abort() on Android/MIPS 23+inline void Abort() { fflush(NULL); exit(1); } 24 #else 25 inline void Abort() { abort(); } 26 #endif // GTEST_OS_WINDOWS_MOBILE 27-- 281.7.12.146.g16d26b1 29 30