summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-05-06 02:09:32 (GMT)
committerKamil Rytarowski <n54@gmx.com>2017-05-06 02:18:58 (GMT)
commitfac0dfbe738e4c6973e2137c776560459f142dce (patch)
treeebc2823d1f0f738731acac28f105a1480184e6b0 /googletest
parent0ad83afdaa3319dadd9f03299bd62f93e6afe2d3 (diff)
downloadgoogletest-fac0dfbe738e4c6973e2137c776560459f142dce.zip
googletest-fac0dfbe738e4c6973e2137c776560459f142dce.tar.gz
googletest-fac0dfbe738e4c6973e2137c776560459f142dce.tar.bz2
Add NetBSD supportrefs/pull/1081/head
NetBSD is a modern UNIX-like Operating System. Enable GTEST_HAS_PTHREAD and GTEST_HAS_DEATH_TEST on NetBSD.
Diffstat (limited to 'googletest')
-rw-r--r--googletest/include/gtest/internal/gtest-port-arch.h2
-rw-r--r--googletest/include/gtest/internal/gtest-port.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/googletest/include/gtest/internal/gtest-port-arch.h b/googletest/include/gtest/internal/gtest-port-arch.h
index 74ab949..f32fc06 100644
--- a/googletest/include/gtest/internal/gtest-port-arch.h
+++ b/googletest/include/gtest/internal/gtest-port-arch.h
@@ -84,6 +84,8 @@
# define GTEST_OS_HPUX 1
#elif defined __native_client__
# define GTEST_OS_NACL 1
+#elif defined __NetBSD__
+# define GTEST_OS_NETBSD 1
#elif defined __OpenBSD__
# define GTEST_OS_OPENBSD 1
#elif defined __QNX__
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 38a8365..23f7339 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -128,6 +128,7 @@
// GTEST_OS_MAC - Mac OS X
// GTEST_OS_IOS - iOS
// GTEST_OS_NACL - Google Native Client (NaCl)
+// GTEST_OS_NETBSD - NetBSD
// GTEST_OS_OPENBSD - OpenBSD
// GTEST_OS_QNX - QNX
// GTEST_OS_SOLARIS - Sun Solaris
@@ -607,7 +608,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
// to your compiler flags.
# define GTEST_HAS_PTHREAD (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX \
- || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NACL)
+ || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD)
#endif // GTEST_HAS_PTHREAD
#if GTEST_HAS_PTHREAD
@@ -800,7 +801,7 @@ using ::std::tuple_size;
(GTEST_OS_MAC && !GTEST_OS_IOS) || \
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
- GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD)
+ GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD)
# define GTEST_HAS_DEATH_TEST 1
#endif