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 | 5 |
| 6 #include <sys/types.h> // Include something that will define __GLIBC__. |
| 7 |
| 8 // The entire file is wrapped in this #if. We do this so this .cc file can be |
| 9 // compiled, even on a non-newlib build. |
| 10 #if defined(__native_client__) && !defined(__GLIBC__) |
| 11 |
6 #include "nacl_mounts/kernel_wrap.h" | 12 #include "nacl_mounts/kernel_wrap.h" |
7 #include <dirent.h> | 13 #include <dirent.h> |
8 #include <errno.h> | 14 #include <errno.h> |
9 #include <irt.h> | 15 #include <irt.h> |
10 #include <sys/stat.h> | 16 #include <sys/stat.h> |
11 #include "nacl_mounts/kernel_intercept.h" | 17 #include "nacl_mounts/kernel_intercept.h" |
12 | 18 |
13 EXTERN_C_BEGIN | 19 EXTERN_C_BEGIN |
14 | 20 |
15 #define REAL(name) __nacl_irt_##name##_real | 21 #define REAL(name) __nacl_irt_##name##_real |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 DO_WRAP(fdio, dup); | 160 DO_WRAP(fdio, dup); |
155 DO_WRAP(fdio, fstat); | 161 DO_WRAP(fdio, fstat); |
156 DO_WRAP(fdio, getdents); | 162 DO_WRAP(fdio, getdents); |
157 DO_WRAP(fdio, read); | 163 DO_WRAP(fdio, read); |
158 DO_WRAP(fdio, seek); | 164 DO_WRAP(fdio, seek); |
159 DO_WRAP(fdio, write); | 165 DO_WRAP(fdio, write); |
160 DO_WRAP(filename, open); | 166 DO_WRAP(filename, open); |
161 DO_WRAP(filename, stat); | 167 DO_WRAP(filename, stat); |
162 } | 168 } |
163 } nacl_mounts_static_initializer; | 169 } nacl_mounts_static_initializer; |
| 170 |
| 171 #endif // defined(__native_client__) && !defined(__GLIBC__) |
OLD | NEW |