From d2b89946f80a5d5a2b5055c20549e8327de7605c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Lindstr=C3=B6m?= Date: Fri, 25 Jan 2019 07:33:31 +0100 Subject: Add missing typedefs for WINCE800 (Windows Embedded Compact 2013). --- googletest/include/gtest/internal/gtest-port.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 786497d..49d3f75 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -271,7 +271,14 @@ #ifndef _WIN32_WCE # include # include -#endif // !_WIN32_WCE +#elif _WIN32_WCE >= 0x800 // Windows Embedded Compact 2013 +// Forward declare instead of including / / +typedef wchar_t WCHAR; +typedef WCHAR *PWCHAR, *LPWCH, *PWCH; +typedef const WCHAR *LPCWCH, *PCWCH; +typedef __readableTo(sentinel(0)) const WCHAR *LPCWSTR, *PCWSTR; +typedef const WCHAR *LPCWCHAR, *PCWCHAR; +#endif #if defined __APPLE__ # include @@ -430,6 +437,8 @@ // MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two // separate (equivalent) structs, instead of using typedef typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION; +#elif _WIN32_WCE >= 0x800 +typedef struct CRITICAL_SECTION GTEST_CRITICAL_SECTION; #else // Assume CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION. // This assumption is verified by @@ -2468,7 +2477,7 @@ inline char* StrDup(const char* src) { return _strdup(src); } # endif // __BORLANDC__ # if GTEST_OS_WINDOWS_MOBILE -inline int FileNo(FILE* file) { return reinterpret_cast(_fileno(file)); } +inline int FileNo(FILE* file) { return static_cast(_fileno(file)); } // Stat(), RmDir(), and IsDir() are not needed on Windows CE at this // time and thus not defined there. # else -- cgit v0.12 From 987e7f346ad39d7dd70aac0f4ed41a3bba85d829 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 25 Jan 2019 11:54:00 -0500 Subject: Update WORKSPACE to make bazel work again --- WORKSPACE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 1d5d388..b69578b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,5 +1,7 @@ workspace(name = "com_google_googletest") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + # Abseil http_archive( name = "com_google_absl", -- cgit v0.12 From aafc594a43f1fecbee66edd8d328b30c23aeeaf8 Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Mon, 28 Jan 2019 17:31:42 -0500 Subject: Merge pull request #2086 from hugolm84:fix-dynamic/static-runtime-link PiperOrigin-RevId: 231286700 --- googletest/cmake/internal_utils.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 8c1f9ba..ae32b62 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -22,6 +22,8 @@ macro(fix_default_compiler_settings_) # This replacement code is taken from sample in the CMake Wiki at # https://gitlab.kitware.com/cmake/community/wikis/FAQ#dynamic-replace. foreach (flag_var + CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt) -- cgit v0.12