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

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

Issue 433193002: [NaCl SDK] nacl_io: Remove unneeded glibc syscall entry points. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #if defined(__native_client__)
6 #include <errno.h>
7 #include <string.h>
8 #include <sys/types.h>
9 #endif
10
11 extern "C" {
12
13 #if defined(__native_client__)
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
19 char* getcwd(char* buf, size_t size) {
20 if (size < 2) {
21 errno = ERANGE;
22 return NULL;
23 }
24
25 return strncpy(buf, ".", size);
26 }
27
28 int unlink(const char* pathname) {
29 errno = ENOSYS;
30 return -1;
31 }
32
33 int mkdir(const char* pathname, mode_t mode) {
34 errno = ENOSYS;
35 return -1;
36 }
37
38 #endif
39
40 } // extern "C"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698