Googletest export
Guard #includes for threading related headers with GTEST_IS_THREADSAFE Some platforms that don't support threading give errors for including these headers PiperOrigin-RevId: 406133623
This commit is contained in:
parent
5a93ce1247
commit
cbf46d3f27
@ -260,9 +260,17 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
// #include <condition_variable> // Guarded by GTEST_IS_THREADSAFE below
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <locale>
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
// #include <mutex> // Guarded by GTEST_IS_THREADSAFE below
|
||||||
|
#include <tuple>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#ifndef _WIN32_WCE
|
#ifndef _WIN32_WCE
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
@ -274,15 +282,6 @@
|
|||||||
# include <TargetConditionals.h>
|
# include <TargetConditionals.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <condition_variable> // NOLINT
|
|
||||||
#include <iostream>
|
|
||||||
#include <locale>
|
|
||||||
#include <memory>
|
|
||||||
#include <mutex> // NOLINT
|
|
||||||
#include <string>
|
|
||||||
#include <tuple>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "gtest/internal/custom/gtest-port.h"
|
#include "gtest/internal/custom/gtest-port.h"
|
||||||
#include "gtest/internal/gtest-port-arch.h"
|
#include "gtest/internal/gtest-port-arch.h"
|
||||||
|
|
||||||
@ -759,6 +758,12 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
|||||||
|
|
||||||
#endif // GTEST_IS_THREADSAFE
|
#endif // GTEST_IS_THREADSAFE
|
||||||
|
|
||||||
|
#if GTEST_IS_THREADSAFE
|
||||||
|
// Some platforms don't support including these threading related headers.
|
||||||
|
#include <condition_variable> // NOLINT
|
||||||
|
#include <mutex> // NOLINT
|
||||||
|
#endif // GTEST_IS_THREADSAFE
|
||||||
|
|
||||||
// GTEST_API_ qualifies all symbols that must be exported. The definitions below
|
// GTEST_API_ qualifies all symbols that must be exported. The definitions below
|
||||||
// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in
|
// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in
|
||||||
// gtest/internal/custom/gtest-port.h
|
// gtest/internal/custom/gtest-port.h
|
||||||
|
Loading…
Reference in New Issue
Block a user