OLD | NEW |
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 #ifndef LIBRARIES_NACL_IO_KERNEL_WRAP_REAL_H_ | 5 #ifndef LIBRARIES_NACL_IO_KERNEL_WRAP_REAL_H_ |
6 #define LIBRARIES_NACL_IO_KERNEL_WRAP_REAL_H_ | 6 #define LIBRARIES_NACL_IO_KERNEL_WRAP_REAL_H_ |
7 | 7 |
8 #include "nacl_io/osstat.h" | 8 #include "nacl_io/osstat.h" |
9 #include "nacl_io/ostypes.h" | 9 #include "nacl_io/ostypes.h" |
10 #include "sdk_util/macros.h" | 10 #include "sdk_util/macros.h" |
11 | 11 |
12 EXTERN_C_BEGIN | 12 EXTERN_C_BEGIN |
13 | 13 |
14 /* NOTE: We do not use off_t because it may be 32 or 64 bit */ | 14 /* NOTE: We do not use off_t because it may be 32 or 64 bit */ |
15 int _real_close(int fd); | 15 int _real_close(int fd); |
16 void _real_exit(int status); | 16 void _real_exit(int status); |
17 int _real_fstat(int fd, struct stat* buf); | 17 int _real_fstat(int fd, struct stat* buf); |
18 int _real_getdents(int fd, void* nacl_buf, size_t nacl_count, size_t* nread); | 18 int _real_getdents(int fd, void* nacl_buf, size_t nacl_count, size_t* nread); |
19 int _real_isatty(int fd, int* result); | 19 int _real_isatty(int fd, int* result); |
20 int _real_lseek(int fd, int64_t offset, int whence, int64_t* new_offset); | 20 int _real_lseek(int fd, int64_t offset, int whence, int64_t* new_offset); |
21 int _real_mkdir(const char* pathname, mode_t mode); | 21 int _real_mkdir(const char* pathname, mode_t mode); |
22 int _real_mmap(void** addr, | 22 int _real_mmap(void** addr, |
23 size_t length, | 23 size_t length, |
24 int prot, | 24 int prot, |
25 int flags, | 25 int flags, |
26 int fd, | 26 int fd, |
27 int64_t offset); | 27 int64_t offset); |
28 int _real_munmap(void* addr, size_t length); | 28 int _real_munmap(void* addr, size_t length); |
29 int _real_open(const char* pathname, int oflag, mode_t cmode, int* newfd); | 29 int _real_open(const char* pathname, int oflag, mode_t mode, int* newfd); |
30 int _real_open_resource(const char* file, int* fd); | 30 int _real_open_resource(const char* file, int* fd); |
31 int _real_read(int fd, void* buf, size_t count, size_t* nread); | 31 int _real_read(int fd, void* buf, size_t count, size_t* nread); |
32 int _real_rmdir(const char* pathname); | 32 int _real_rmdir(const char* pathname); |
33 int _real_write(int fd, const void* buf, size_t count, size_t* nwrote); | 33 int _real_write(int fd, const void* buf, size_t count, size_t* nwrote); |
34 int _real_getcwd(char* pathname, size_t len); | 34 int _real_getcwd(char* pathname, size_t len); |
35 | 35 |
36 EXTERN_C_END | 36 EXTERN_C_END |
37 | 37 |
38 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_REAL_H_ | 38 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_REAL_H_ |
OLD | NEW |