Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: ports/nacl-spawn/cli_main.c

Issue 1417223003: Switch from using 'nacl_main' to 'main' entry point (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/mongoose/build.sh ('k') | ports/nacl-spawn/nacl_spawn_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/nacl-spawn/cli_main.c
diff --git a/ports/nacl-spawn/cli_main.c b/ports/nacl-spawn/cli_main.c
index b928d34fbe36c652ec7ff2d0723979f01d8c635f..5cc20d7ce481f4e9026bd5165b7b5286faa30179 100644
--- a/ports/nacl-spawn/cli_main.c
+++ b/ports/nacl-spawn/cli_main.c
@@ -12,12 +12,15 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include <stdbool.h>
#include "nacl_io/nacl_io.h"
#include "nacl_main.h"
#include "ppapi_simple/ps.h"
#include "ppapi_simple/ps_main.h"
+bool _cli_main_init = false;
+
#ifdef _NEWLIB_VERSION
void setprogname(const char *progname) __attribute__((weak));
#endif
@@ -37,7 +40,10 @@ void nacl_setprogname(char* argv0) {
#endif
}
+int main(int argc, char* argv[]);
+
int cli_main(int argc, char* argv[]) {
+ _cli_main_init = true;
if (argv && argv[0])
nacl_setprogname(argv[0]);
@@ -46,7 +52,8 @@ int cli_main(int argc, char* argv[]) {
fprintf(stderr, "nacl_setup_env failed: %d\n", rtn);
return 1;
}
- return nacl_main(argc, argv);
+
+ return main(argc, argv);
}
PPAPI_SIMPLE_REGISTER_MAIN(cli_main)
« no previous file with comments | « ports/mongoose/build.sh ('k') | ports/nacl-spawn/nacl_spawn_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698