Fix undefined behavior in llvm's local changes to googletest.

r100895 landed an llvm-only change to add minix support to googletest.
It did that by putting "defined()" in a macro, which has undefined
behavior.  Slightly reshuffle things to remove that undefined behavior.
Also mention in README.LLVM that minix support is a local change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nico Weber 2016-01-19 21:22:36 +00:00
parent 306bcccc42
commit 3c247736dd
2 changed files with 5 additions and 1 deletions

View File

@ -17,6 +17,7 @@ $ mv COPYING LICENSE.TXT
Modified as follows:
* Added support for FreeBSD.
* Added support for Minix (PR6797).
* To GTestStreamToHelper in include/gtest/internal/gtest-internal.h,
added the ability to stream with raw_os_ostream.
* To refresh Haiku support in include/gtest/internal/gtest-port.h,

View File

@ -92,6 +92,7 @@
// GTEST_OS_LINUX - Linux
// GTEST_OS_LINUX_ANDROID - Google Android
// GTEST_OS_MAC - Mac OS X
// GTEST_OS_MINIX - Minix
// GTEST_OS_NACL - Google Native Client (NaCl)
// GTEST_OS_SOLARIS - Sun Solaris
// GTEST_OS_SYMBIAN - Symbian
@ -248,6 +249,8 @@
# define GTEST_OS_NACL 1
#elif defined(__HAIKU__)
# define GTEST_OS_HAIKU 1
#elif defined(_MINIX)
# define GTEST_OS_MINIX 1
#endif // __CYGWIN__
// Brings in definitions for functions used in the testing::internal::posix
@ -359,7 +362,7 @@
// no support for it at least as recent as Froyo (2.2).
// Minix currently doesn't support it either.
# define GTEST_HAS_STD_WSTRING \
(!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || GTEST_OS_HAIKU || defined(_MINIX)))
(!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || GTEST_OS_HAIKU || GTEST_OS_MINIX))
#endif // GTEST_HAS_STD_WSTRING