forked from OSchip/llvm-project
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. llvm-svn: 258190
This commit is contained in:
parent
65e80b963a
commit
4e41694538
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue