| 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__. | 6 #include <sys/types.h> // Include something that will define __GLIBC__. |
| 7 | 7 |
| 8 // The entire file is wrapped in this #if. We do this so this .cc file can be | 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. | 9 // compiled, even on a non-newlib build. |
| 10 #if defined(__native_client__) && !defined(__GLIBC__) | 10 #if defined(__native_client__) && !defined(__GLIBC__) |
| 11 | 11 |
| 12 #include "nacl_mounts/kernel_wrap.h" | 12 #include "nacl_io/kernel_wrap.h" |
| 13 #include <dirent.h> | 13 #include <dirent.h> |
| 14 #include <errno.h> | 14 #include <errno.h> |
| 15 #include <irt.h> | 15 #include <irt.h> |
| 16 #include <sys/stat.h> | 16 #include <sys/stat.h> |
| 17 #include "nacl_mounts/kernel_intercept.h" | 17 #include "nacl_io/kernel_intercept.h" |
| 18 | 18 |
| 19 EXTERN_C_BEGIN | 19 EXTERN_C_BEGIN |
| 20 | 20 |
| 21 #define REAL(name) __nacl_irt_##name##_real | 21 #define REAL(name) __nacl_irt_##name##_real |
| 22 #define WRAP(name) __nacl_irt_##name##_wrap | 22 #define WRAP(name) __nacl_irt_##name##_wrap |
| 23 #define STRUCT_NAME(group) __libnacl_irt_##group | 23 #define STRUCT_NAME(group) __libnacl_irt_##group |
| 24 #define DECLARE_STRUCT(group) \ | 24 #define DECLARE_STRUCT(group) \ |
| 25 extern struct nacl_irt_##group STRUCT_NAME(group); | 25 extern struct nacl_irt_##group STRUCT_NAME(group); |
| 26 #define MUX(group, name) STRUCT_NAME(group).name | 26 #define MUX(group, name) STRUCT_NAME(group).name |
| 27 #define DECLARE(group, name) typeof(MUX(group, name)) REAL(name); | 27 #define DECLARE(group, name) typeof(MUX(group, name)) REAL(name); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 DO_WRAP(filename, open); | 180 DO_WRAP(filename, open); |
| 181 DO_WRAP(filename, stat); | 181 DO_WRAP(filename, stat); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 | 185 |
| 186 EXTERN_C_END | 186 EXTERN_C_END |
| 187 | 187 |
| 188 | 188 |
| 189 #endif // defined(__native_client__) && !defined(__GLIBC__) | 189 #endif // defined(__native_client__) && !defined(__GLIBC__) |
| OLD | NEW |