summaryrefslogtreecommitdiffstats
path: root/include/gtest/internal
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-11-30 22:10:12 (GMT)
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-11-30 22:10:12 (GMT)
commit42bf979ce7c107bfc214758e4a511232dd9b2e0a (patch)
tree0674e71dda39d8d79d65049d7c0ff0f2fd89d9be /include/gtest/internal
parente349025485edf4a09907eee2d1f553d1f7fb5bd1 (diff)
downloadgoogletest-42bf979ce7c107bfc214758e4a511232dd9b2e0a.zip
googletest-42bf979ce7c107bfc214758e4a511232dd9b2e0a.tar.gz
googletest-42bf979ce7c107bfc214758e4a511232dd9b2e0a.tar.bz2
Adds Google Native Client compatibility (issue 329).
Diffstat (limited to 'include/gtest/internal')
-rw-r--r--include/gtest/internal/gtest-port.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h
index a9c7cae..f08f6df 100644
--- a/include/gtest/internal/gtest-port.h
+++ b/include/gtest/internal/gtest-port.h
@@ -88,6 +88,7 @@
// GTEST_OS_CYGWIN - Cygwin
// GTEST_OS_LINUX - Linux
// GTEST_OS_MAC - Mac OS X
+// GTEST_OS_NACL - Google Native Client (NaCl)
// GTEST_OS_SOLARIS - Sun Solaris
// GTEST_OS_SYMBIAN - Symbian
// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
@@ -230,6 +231,8 @@
#define GTEST_OS_SOLARIS 1
#elif defined(_AIX)
#define GTEST_OS_AIX 1
+#elif defined __native_client__
+#define GTEST_OS_NACL 1
#endif // __CYGWIN__
// Brings in definitions for functions used in the testing::internal::posix
@@ -240,7 +243,12 @@
// is not the case, we need to include headers that provide the functions
// mentioned above.
#include <unistd.h>
-#include <strings.h>
+#if !GTEST_OS_NACL
+// TODO(vladl@google.com): Remove this condition when Native Client SDK adds
+// strings.h (tracked in
+// http://code.google.com/p/nativeclient/issues/detail?id=1175).
+#include <strings.h> // Native Client doesn't provide strings.h.
+#endif
#elif !GTEST_OS_WINDOWS_MOBILE
#include <direct.h>
#include <io.h>