Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
42bf979c
Commit
42bf979c
authored
Nov 30, 2010
by
vladlosev
Browse files
Adds Google Native Client compatibility (issue 329).
parent
e3490254
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
include/gtest/internal/gtest-port.h
include/gtest/internal/gtest-port.h
+9
-1
src/gtest-filepath.cc
src/gtest-filepath.cc
+2
-2
No files found.
include/gtest/internal/gtest-port.h
View file @
42bf979c
...
@@ -88,6 +88,7 @@
...
@@ -88,6 +88,7 @@
// GTEST_OS_CYGWIN - Cygwin
// GTEST_OS_CYGWIN - Cygwin
// GTEST_OS_LINUX - Linux
// GTEST_OS_LINUX - Linux
// GTEST_OS_MAC - Mac OS X
// GTEST_OS_MAC - Mac OS X
// GTEST_OS_NACL - Google Native Client (NaCl)
// GTEST_OS_SOLARIS - Sun Solaris
// GTEST_OS_SOLARIS - Sun Solaris
// GTEST_OS_SYMBIAN - Symbian
// GTEST_OS_SYMBIAN - Symbian
// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
// GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile)
...
@@ -230,6 +231,8 @@
...
@@ -230,6 +231,8 @@
#define GTEST_OS_SOLARIS 1
#define GTEST_OS_SOLARIS 1
#elif defined(_AIX)
#elif defined(_AIX)
#define GTEST_OS_AIX 1
#define GTEST_OS_AIX 1
#elif defined __native_client__
#define GTEST_OS_NACL 1
#endif // __CYGWIN__
#endif // __CYGWIN__
// Brings in definitions for functions used in the testing::internal::posix
// Brings in definitions for functions used in the testing::internal::posix
...
@@ -240,7 +243,12 @@
...
@@ -240,7 +243,12 @@
// is not the case, we need to include headers that provide the functions
// is not the case, we need to include headers that provide the functions
// mentioned above.
// mentioned above.
#include <unistd.h>
#include <unistd.h>
#include <strings.h>
#if !GTEST_OS_NACL
// TODO(vladl@google.com): Remove this condition when Native Client SDK adds
// strings.h (tracked in
// http://code.google.com/p/nativeclient/issues/detail?id=1175).
#include <strings.h> // Native Client doesn't provide strings.h.
#endif
#elif !GTEST_OS_WINDOWS_MOBILE
#elif !GTEST_OS_WINDOWS_MOBILE
#include <direct.h>
#include <direct.h>
#include <io.h>
#include <io.h>
...
...
src/gtest-filepath.cc
View file @
42bf979c
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
#elif GTEST_OS_WINDOWS
#elif GTEST_OS_WINDOWS
#include <direct.h>
#include <direct.h>
#include <io.h>
#include <io.h>
#elif GTEST_OS_SYMBIAN
#elif GTEST_OS_SYMBIAN
|| GTEST_OS_NACL
// Symbian OpenC
has
PATH_MAX in sys/syslimits.h
// Symbian OpenC
and NaCl have
PATH_MAX in sys/syslimits.h
#include <sys/syslimits.h>
#include <sys/syslimits.h>
#else
#else
#include <limits.h>
#include <limits.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment