| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 * NaCl logging module. | 8 * NaCl logging module. |
| 9 * | 9 * |
| 10 * This module is used in many parts of Native Client to generate | 10 * This module is used in many parts of Native Client to generate |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 * flag to Chrome. (This is not recommended for normal use, since it | 76 * flag to Chrome. (This is not recommended for normal use, since it |
| 77 * eliminates a layer of defense.) | 77 * eliminates a layer of defense.) |
| 78 */ | 78 */ |
| 79 | 79 |
| 80 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_LOG_H__ | 80 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_LOG_H__ |
| 81 #define NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_LOG_H__ | 81 #define NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_LOG_H__ |
| 82 | 82 |
| 83 #include <stdarg.h> | 83 #include <stdarg.h> |
| 84 | 84 |
| 85 #include "native_client/src/include/nacl_base.h" | 85 #include "native_client/src/include/nacl_base.h" |
| 86 #include "native_client/src/include/nacl_defines.h" |
| 86 | 87 |
| 87 #ifdef __native_client__ | 88 #ifdef __native_client__ |
| 88 # define ATTRIBUTE_FORMAT_PRINTF(m, n) __attribute__((format(printf, m, n))) | 89 # define ATTRIBUTE_FORMAT_PRINTF(m, n) __attribute__((format(printf, m, n))) |
| 89 # define NACL_PLATFORM_HAS_TLS 1 | 90 # define NACL_PLATFORM_HAS_TLS 1 |
| 90 # define NACL_PLATFORM_HAS_TSD 1 | 91 # define NACL_PLATFORM_HAS_TSD 1 |
| 91 #else | 92 #else |
| 92 # include "native_client/src/include/portability.h" | 93 # include "native_client/src/include/portability.h" |
| 93 # if NACL_WINDOWS | 94 # if NACL_WINDOWS |
| 94 # if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 | 95 # if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 |
| 95 # if NACL_BUILD_SUBARCH == 32 | 96 # if NACL_BUILD_SUBARCH == 32 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 * to aborting. NB: it is not a good idea to depend on too much | 366 * to aborting. NB: it is not a good idea to depend on too much |
| 366 * within |fn|, since the application state is likely | 367 * within |fn|, since the application state is likely |
| 367 * inconsistent/unstable. It is probably a good idea to only use | 368 * inconsistent/unstable. It is probably a good idea to only use |
| 368 * low-level routines or system calls directly. | 369 * low-level routines or system calls directly. |
| 369 */ | 370 */ |
| 370 void NaClLogSetAbortBehavior(void (*fn)(void)); | 371 void NaClLogSetAbortBehavior(void (*fn)(void)); |
| 371 | 372 |
| 372 EXTERN_C_END | 373 EXTERN_C_END |
| 373 | 374 |
| 374 #endif /* NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_LOG_H__ */ | 375 #endif /* NATIVE_CLIENT_SRC_TRUSTED_PLATFORM_NACL_LOG_H__ */ |
| OLD | NEW |