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> |
11 #include <stdlib.h> | 11 #include <stdlib.h> |
12 #include <sys/fcntl.h> | 12 #include <sys/fcntl.h> |
13 #include <sys/ioctl.h> | 13 #include <sys/ioctl.h> |
14 #include <sys/types.h> | 14 #include <sys/types.h> |
15 | 15 |
16 #include "nacl_io/ossignal.h" | 16 #include "nacl_io/ossignal.h" |
17 #include "nacl_io/ossocket.h" | 17 #include "nacl_io/ossocket.h" |
18 #include "nacl_io/ostypes.h" | 18 #include "nacl_io/ostypes.h" |
19 #include "nacl_io/osutime.h" | 19 #include "nacl_io/osutime.h" |
20 #include "sdk_util/macros.h" | 20 #include "sdk_util/macros.h" |
21 | 21 |
22 // Curently enable NaCl IO IRT Extension when using arm glibc (which | 22 #if defined(__native_client__) && defined(__GLIBC__) |
| 23 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 9 |
| 24 #define NACL_GLIBC_OLD |
| 25 #else |
| 26 #define NACL_GLIBC_NEW |
| 27 #endif |
| 28 #endif |
| 29 |
| 30 // Curently enable NaCl IO IRT Extension when using newer glibc (which |
23 // only supports this method interception). | 31 // only supports this method interception). |
24 #if defined(__native_client__) && defined(__GLIBC__) && defined(__arm__) | 32 #if defined(NACL_GLIBC_NEW) |
25 # define NACL_IO_IRT_EXT 1 | 33 # define NACL_IO_IRT_EXT 1 |
26 #endif | 34 #endif |
27 | 35 |
28 #if defined(__GLIBC__) | 36 #if defined(__GLIBC__) |
29 #include <sys/cdefs.h> | 37 #include <sys/cdefs.h> |
30 #define NOTHROW __THROW | 38 #define NOTHROW __THROW |
31 #else | 39 #else |
32 #define NOTHROW | 40 #define NOTHROW |
33 #endif | 41 #endif |
34 | 42 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 ssize_t sendmsg(int fd, const struct msghdr* msg, int flags); | 162 ssize_t sendmsg(int fd, const struct msghdr* msg, int flags); |
155 int setsockopt(int fd, int lvl, int optname, const void* optval, socklen_t len); | 163 int setsockopt(int fd, int lvl, int optname, const void* optval, socklen_t len); |
156 int shutdown(int fd, int how); | 164 int shutdown(int fd, int how); |
157 int socket(int domain, int type, int protocol); | 165 int socket(int domain, int type, int protocol); |
158 int socketpair(int domain, int type, int protocl, int* sv); | 166 int socketpair(int domain, int type, int protocl, int* sv); |
159 #endif // PROVIDES_SOCKET_API | 167 #endif // PROVIDES_SOCKET_API |
160 | 168 |
161 EXTERN_C_END | 169 EXTERN_C_END |
162 | 170 |
163 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_ | 171 #endif // LIBRARIES_NACL_IO_KERNEL_WRAP_H_ |
OLD | NEW |