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_H_ | 5 #ifndef LIBRARIES_NACL_IO_KERNEL_WRAP_H_ |
6 #define LIBRARIES_NACL_IO_KERNEL_WRAP_H_ | 6 #define LIBRARIES_NACL_IO_KERNEL_WRAP_H_ |
7 | 7 |
8 #include <assert.h> | 8 #include <assert.h> |
9 #include <signal.h> | 9 #include <signal.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #else | 48 #else |
49 typedef mode_t chmod_mode_t; | 49 typedef mode_t chmod_mode_t; |
50 typedef size_t getcwd_size_t; | 50 typedef size_t getcwd_size_t; |
51 typedef ssize_t read_ssize_t; | 51 typedef ssize_t read_ssize_t; |
52 typedef ssize_t write_ssize_t; | 52 typedef ssize_t write_ssize_t; |
53 #define NAME(x) x | 53 #define NAME(x) x |
54 #endif | 54 #endif |
55 | 55 |
56 EXTERN_C_BEGIN | 56 EXTERN_C_BEGIN |
57 | 57 |
58 void kernel_wrap_init(); | 58 void kernel_wrap_init(void); |
59 void kernel_wrap_uninit(); | 59 void kernel_wrap_uninit(void); |
60 | 60 |
61 int NAME(access)(const char* path, int amode) NOTHROW; | 61 int NAME(access)(const char* path, int amode) NOTHROW; |
62 int NAME(chdir)(const char* path) NOTHROW; | 62 int NAME(chdir)(const char* path) NOTHROW; |
63 int NAME(chmod)(const char* path, chmod_mode_t mode) NOTHROW; | 63 int NAME(chmod)(const char* path, chmod_mode_t mode) NOTHROW; |
64 int chown(const char* path, uid_t owner, gid_t group) NOTHROW; | 64 int chown(const char* path, uid_t owner, gid_t group) NOTHROW; |
65 int NAME(close)(int fd); | 65 int NAME(close)(int fd); |
66 int NAME(dup)(int oldfd) NOTHROW; | 66 int NAME(dup)(int oldfd) NOTHROW; |
67 int NAME(dup2)(int oldfd, int newfd) NOTHROW; | 67 int NAME(dup2)(int oldfd, int newfd) NOTHROW; |
68 int fchown(int fd, uid_t owner, gid_t group) NOTHROW; | 68 int fchown(int fd, uid_t owner, gid_t group) NOTHROW; |
69 #if defined(WIN32) | 69 #if defined(WIN32) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 ssize_t sendmsg(int fd, const struct msghdr* msg, int flags); | 147 ssize_t sendmsg(int fd, const struct msghdr* msg, int flags); |
148 int setsockopt(int fd, int lvl, int optname, const void* optval, socklen_t len); | 148 int setsockopt(int fd, int lvl, int optname, const void* optval, socklen_t len); |
149 int shutdown(int fd, int how); | 149 int shutdown(int fd, int how); |
150 int socket(int domain, int type, int protocol); | 150 int socket(int domain, int type, int protocol); |
151 int socketpair(int domain, int type, int protocl, int* sv); | 151 int socketpair(int domain, int type, int protocl, int* sv); |
152 #endif // PROVIDES_SOCKET_API | 152 #endif // PROVIDES_SOCKET_API |
153 | 153 |
154 EXTERN_C_END | 154 EXTERN_C_END |
155 | 155 |
156 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_ | 156 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_ |
OLD | NEW |