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

Unified Diff: ports/python-static/nacl.patch

Issue 907563002: Simplify cli_main (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 10 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/python-static/build.sh ('k') | ports/sdl/nacl.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/python-static/nacl.patch
diff --git a/ports/python-static/nacl.patch b/ports/python-static/nacl.patch
index d48ae54fe586d5bdab9e72cf7db3b14364fe737e..aca01f3f2e2f1071d1c07c91f027293ee28461f8 100644
--- a/ports/python-static/nacl.patch
+++ b/ports/python-static/nacl.patch
@@ -423,7 +423,7 @@ diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
diff --git a/Modules/python.c b/Modules/python.c
--- a/Modules/python.c
+++ b/Modules/python.c
-@@ -6,6 +6,36 @@
+@@ -6,6 +6,12 @@
#include <floatingpoint.h>
#endif
@@ -431,36 +431,12 @@ diff --git a/Modules/python.c b/Modules/python.c
+#define main nacl_main
+#include <stdio.h>
+#include <sys/utsname.h>
-+
-+// Stubs for functions implemented through PPAPI.
-+int spawnv(int mode, const char* path, char *const argv[]) {
-+ return 0;
-+}
-+
-+int spawnve(int mode, const char* path,
-+ char *const argv[], char *const envp[]) {
-+ return 0;
-+}
-+
-+// Dummy implementation of uname. This is only needed for the sel_ldr
-+// version of python. Otherwise it gets provided by nacl_io.
-+int uname(struct utsname *buf)
-+{
-+ sprintf(buf->sysname, "NaCl");
-+ return 0;
-+}
+#endif
+
-+// Dummy implementation of nacl_spawn_vfork_exit, otherwise provided
-+// by nacl_spawn.
-+void nacl_spawn_vfork_exit(int status) {
-+ _exit(status);
-+}
-+
int
main(int argc, char **argv)
{
-@@ -20,5 +44,9 @@ main(int argc, char **argv)
+@@ -20,5 +26,9 @@ main(int argc, char **argv)
m = fpgetmask();
fpsetmask(m & ~FP_X_OFL);
#endif
« no previous file with comments | « ports/python-static/build.sh ('k') | ports/sdl/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698