OLD | NEW |
(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) { |
| 16 if (size < 2) { |
| 17 errno = ERANGE; |
| 18 return NULL; |
| 19 } |
| 20 |
| 21 return strncpy(buf, ".", size); |
| 22 } |
| 23 |
| 24 int unlink(const char* pathname) { |
| 25 errno = ENOSYS; |
| 26 return -1; |
| 27 } |
| 28 |
| 29 int mkdir(const char* pathname, mode_t mode) { |
| 30 errno = ENOSYS; |
| 31 return -1; |
| 32 } |
| 33 |
| 34 #endif |
| 35 |
| 36 } // extern "C" |
OLD | NEW |