Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Side by Side Diff: native_client_sdk/src/libraries/gtest/nacl_gtest_dummy_sys.cc

Issue 11066105: [NaCl SDK] nacl_mounts: wrap functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/gtest_ppapi/gtest_module.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if defined(__native_client__) 5 #if defined(__native_client__)
6 #include <errno.h> 6 #include <errno.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #endif 9 #endif
10 10
11 extern "C" { 11 extern "C" {
12 12
13 #if defined(__native_client__) 13 #if defined(__native_client__)
14 14
15 char* getcwd(char* buf, size_t size) __attribute__ ((weak));
16 int unlink(const char* pathname) __attribute__ ((weak));
17 int mkdir(const char* pathname, mode_t mode) __attribute__ ((weak));
18
15 char* getcwd(char* buf, size_t size) { 19 char* getcwd(char* buf, size_t size) {
16 if (size < 2) { 20 if (size < 2) {
17 errno = ERANGE; 21 errno = ERANGE;
18 return NULL; 22 return NULL;
19 } 23 }
20 24
21 return strncpy(buf, ".", size); 25 return strncpy(buf, ".", size);
22 } 26 }
23 27
24 int unlink(const char* pathname) { 28 int unlink(const char* pathname) {
25 errno = ENOSYS; 29 errno = ENOSYS;
26 return -1; 30 return -1;
27 } 31 }
28 32
29 int mkdir(const char* pathname, mode_t mode) { 33 int mkdir(const char* pathname, mode_t mode) {
30 errno = ENOSYS; 34 errno = ENOSYS;
31 return -1; 35 return -1;
32 } 36 }
33 37
34 #endif 38 #endif
35 39
36 } // extern "C" 40 } // extern "C"
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/gtest_ppapi/gtest_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698