aboutsummaryrefslogtreecommitdiffstats
path: root/include/gmock/gmock-actions.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-03-11 23:37:56 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-03-11 23:37:56 +0000
commit5b5d62f19019a398167df1f1b59279e049bf24ce (patch)
tree1b4307403525a55b30c6411b4cad6430660817fc /include/gmock/gmock-actions.h
parent93ad3551c060599af0d4789ee0584f1652abf80b (diff)
downloadgoogletest-5b5d62f19019a398167df1f1b59279e049bf24ce.tar.gz
googletest-5b5d62f19019a398167df1f1b59279e049bf24ce.tar.bz2
googletest-5b5d62f19019a398167df1f1b59279e049bf24ce.zip
Makes the code compile on Windows CE.
Diffstat (limited to 'include/gmock/gmock-actions.h')
-rw-r--r--include/gmock/gmock-actions.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/gmock/gmock-actions.h b/include/gmock/gmock-actions.h
index 823054bf..a228eea6 100644
--- a/include/gmock/gmock-actions.h
+++ b/include/gmock/gmock-actions.h
@@ -38,7 +38,11 @@
#include <algorithm>
#include <string>
+
+#ifndef _WIN32_WCE
#include <errno.h>
+#endif
+
#include <gmock/internal/gmock-internal-utils.h>
#include <gmock/internal/gmock-port.h>
@@ -601,6 +605,8 @@ class AssignAction {
const T2 value_;
};
+#ifndef _WIN32_WCE
+
// Implements the SetErrnoAndReturn action to simulate return from
// various system calls and libc functions.
template <typename T>
@@ -619,6 +625,8 @@ class SetErrnoAndReturnAction {
const T result_;
};
+#endif // _WIN32_WCE
+
// Implements the SetArgumentPointee<N>(x) action for any function
// whose N-th argument (0-based) is a pointer to x's type. The
// template parameter kIsProto is true iff type A is ProtocolMessage,
@@ -878,6 +886,8 @@ PolymorphicAction<internal::AssignAction<T1, T2> > Assign(T1* ptr, T2 val) {
return MakePolymorphicAction(internal::AssignAction<T1, T2>(ptr, val));
}
+#ifndef _WIN32_WCE
+
// Creates an action that sets errno and returns the appropriate error.
template <typename T>
PolymorphicAction<internal::SetErrnoAndReturnAction<T> >
@@ -886,6 +896,8 @@ SetErrnoAndReturn(int errval, T result) {
internal::SetErrnoAndReturnAction<T>(errval, result));
}
+#endif // _WIN32_WCE
+
// Various overloads for InvokeWithoutArgs().
// Creates an action that invokes 'function_impl' with no argument.