| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2014 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 #ifndef NACL_SPAWN_NACL_MAIN_H_ | 7 #ifndef NACL_SPAWN_NACL_MAIN_H_ |
| 8 #define NACL_SPAWN_NACL_MAIN_H_ | 8 #define NACL_SPAWN_NACL_MAIN_H_ |
| 9 | 9 |
| 10 #include <spawn.h> | 10 #include <spawn.h> |
| 11 | 11 |
| 12 #include "nacl_io/log.h" | 12 #include "nacl_io/log.h" |
| 13 | 13 |
| 14 #if defined(NDEBUG) | 14 #if defined(NDEBUG) |
| 15 #define NACL_LOG(format, ...) | 15 #define NACL_LOG(format, ...) |
| 16 #else | 16 #else |
| 17 #define NACL_LOG(format, ...) nacl_io_log(format, ##__VA_ARGS__) | 17 #define NACL_LOG(format, ...) nacl_io_log(format, ##__VA_ARGS__) |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 __BEGIN_DECLS | 20 __BEGIN_DECLS |
| 21 | 21 |
| 22 /* | 22 /* |
| 23 * Entry point expected by libcli_main.a | 23 * Entry point expected by libcli_main.a |
| 24 */ | 24 */ |
| 25 extern int nacl_main(int argc, char* argv[]); | 25 extern int nacl_main(int argc, char* argv[]) |
| 26 __attribute__ ((visibility ("default"))); |
| 26 | 27 |
| 27 /* | 28 /* |
| 28 * Untar a startup bundle to a particular root. | 29 * Untar a startup bundle to a particular root. |
| 29 * | 30 * |
| 30 * NOTE: This lives in libcli_main.a | 31 * NOTE: This lives in libcli_main.a |
| 31 * Args: | 32 * Args: |
| 32 * arg0: The contents of argv[0], used to determine relative tar location. | 33 * arg0: The contents of argv[0], used to determine relative tar location. |
| 33 * tarfile: The name of a tarfile to extract. | 34 * tarfile: The name of a tarfile to extract. |
| 34 * root: The absolute path to extract the startup tar file to. | 35 * root: The absolute path to extract the startup tar file to. |
| 35 */ | 36 */ |
| 36 extern int nacl_startup_untar( | 37 extern int nacl_startup_untar( |
| 37 const char* argv0, const char* tarfile, const char* root); | 38 const char* argv0, const char* tarfile, const char* root); |
| 38 | 39 |
| 39 __END_DECLS | 40 __END_DECLS |
| 40 | 41 |
| 41 #endif /* NACL_SPAWN_NACL_MAIN_H_ */ | 42 #endif /* NACL_SPAWN_NACL_MAIN_H_ */ |
| OLD | NEW |