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 <signal.h> | 8 #include <signal.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 int _fstat32i64(int fd, struct _stat32i64* buf); | 57 int _fstat32i64(int fd, struct _stat32i64* buf); |
58 int _fstat64i32(int fd, struct _stat64i32* buf); | 58 int _fstat64i32(int fd, struct _stat64i32* buf); |
59 #elif !defined(__linux__) | 59 #elif !defined(__linux__) |
60 struct stat; | 60 struct stat; |
61 extern int fstat(int fd, struct stat* buf) NOTHROW; | 61 extern int fstat(int fd, struct stat* buf) NOTHROW; |
62 #endif | 62 #endif |
63 int fsync(int fd); | 63 int fsync(int fd); |
64 int ftruncate(int fd, off_t length) NOTHROW; | 64 int ftruncate(int fd, off_t length) NOTHROW; |
65 char* NAME(getcwd)(char* buf, getcwd_size_t size) NOTHROW; | 65 char* NAME(getcwd)(char* buf, getcwd_size_t size) NOTHROW; |
66 char* getwd(char* buf) NOTHROW; | 66 char* getwd(char* buf) NOTHROW; |
| 67 #if !defined(__BIONIC__) |
67 int getdents(int fd, void* buf, unsigned int count) NOTHROW; | 68 int getdents(int fd, void* buf, unsigned int count) NOTHROW; |
| 69 #else |
| 70 struct dirent; |
| 71 int getdents(unsigned int fd, struct dirent* buf, unsigned int count) NOTHROW; |
| 72 #endif |
68 int NAME(isatty)(int fd) NOTHROW; | 73 int NAME(isatty)(int fd) NOTHROW; |
69 int lchown(const char* path, uid_t owner, gid_t group) NOTHROW; | 74 int lchown(const char* path, uid_t owner, gid_t group) NOTHROW; |
70 int link(const char* oldpath, const char* newpath) NOTHROW; | 75 int link(const char* oldpath, const char* newpath) NOTHROW; |
71 off_t NAME(lseek)(int fd, off_t offset, int whence) NOTHROW; | 76 off_t NAME(lseek)(int fd, off_t offset, int whence) NOTHROW; |
72 #if defined(WIN32) | 77 #if defined(WIN32) |
73 int _mkdir(const char* path); | 78 int _mkdir(const char* path); |
74 #else | 79 #else |
75 int mkdir(const char* path, mode_t mode) NOTHROW; | 80 int mkdir(const char* path, mode_t mode) NOTHROW; |
76 #endif | 81 #endif |
77 void* mmap(void* addr, size_t length, int prot, int flags, int fd, | 82 void* mmap(void* addr, size_t length, int prot, int flags, int fd, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 int setsockopt(int fd, int lvl, int optname, const void* optval, | 125 int setsockopt(int fd, int lvl, int optname, const void* optval, |
121 socklen_t len); | 126 socklen_t len); |
122 int shutdown(int fd, int how); | 127 int shutdown(int fd, int how); |
123 int socket(int domain, int type, int protocol); | 128 int socket(int domain, int type, int protocol); |
124 int socketpair(int domain, int type, int protocl, int* sv); | 129 int socketpair(int domain, int type, int protocl, int* sv); |
125 #endif // PROVIDES_SOCKET_API | 130 #endif // PROVIDES_SOCKET_API |
126 | 131 |
127 EXTERN_C_END | 132 EXTERN_C_END |
128 | 133 |
129 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_ | 134 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_ |
OLD | NEW |