| Index: native_client_sdk/src/libraries/gtest/nacl_gtest_dummy_sys.cc
|
| diff --git a/native_client_sdk/src/libraries/gtest/nacl_gtest_dummy_sys.cc b/native_client_sdk/src/libraries/gtest/nacl_gtest_dummy_sys.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ef7cf61f10dd0607c41bb9c04203695d84e0fce3
|
| --- /dev/null
|
| +++ b/native_client_sdk/src/libraries/gtest/nacl_gtest_dummy_sys.cc
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#if defined(__native_client__)
|
| +#include <errno.h>
|
| +#include <string.h>
|
| +#include <sys/types.h>
|
| +#endif
|
| +
|
| +extern "C" {
|
| +
|
| +#if defined(__native_client__)
|
| +
|
| +char* getcwd(char* buf, size_t size) {
|
| + if (size < 2) {
|
| + errno = ERANGE;
|
| + return NULL;
|
| + }
|
| +
|
| + return strncpy(buf, ".", size);
|
| +}
|
| +
|
| +int unlink(const char* pathname) {
|
| + errno = ENOSYS;
|
| + return -1;
|
| +}
|
| +
|
| +int mkdir(const char* pathname, mode_t mode) {
|
| + errno = ENOSYS;
|
| + return -1;
|
| +}
|
| +
|
| +#endif
|
| +
|
| +} // extern "C"
|
|
|