summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lindström <hugo.lindstrom@trimble.se>2019-01-25 06:33:31 (GMT)
committerHugo Lindström <hugo.lindstrom@trimble.se>2019-01-25 12:59:18 (GMT)
commitd2b89946f80a5d5a2b5055c20549e8327de7605c (patch)
treeff3ae95378983447100622132c6a9322d8142f82
parent2fe3bd994b3189899d93f1d5a881e725e046fdc2 (diff)
downloadgoogletest-d2b89946f80a5d5a2b5055c20549e8327de7605c.zip
googletest-d2b89946f80a5d5a2b5055c20549e8327de7605c.tar.gz
googletest-d2b89946f80a5d5a2b5055c20549e8327de7605c.tar.bz2
Add missing typedefs for WINCE800 (Windows Embedded Compact 2013).refs/pull/2081/head
-rw-r--r--googletest/include/gtest/internal/gtest-port.h13
1 files 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 <sys/types.h>
# include <sys/stat.h>
-#endif // !_WIN32_WCE
+#elif _WIN32_WCE >= 0x800 // Windows Embedded Compact 2013
+// Forward declare instead of including <windows.h> / <windef.h> / <winnt.h>
+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 <AvailabilityMacros.h>
@@ -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<int>(_fileno(file)); }
+inline int FileNo(FILE* file) { return static_cast<int>(_fileno(file)); }
// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
// time and thus not defined there.
# else