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

Side by Side Diff: ppapi/native_client/src/untrusted/irt_stub/ppapi_plugin_start.c

Issue 1333673002: Build PPAPI NaCl Glibc tests with GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « ppapi/native_client/src/untrusted/irt_stub/BUILD.gn ('k') | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium 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 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
11 #include "native_client/src/include/elf32.h" 11 #include "native_client/src/include/elf32.h"
12 #include "native_client/src/include/elf_auxv.h" 12 #include "native_client/src/include/elf_auxv.h"
13 #include "native_client/src/untrusted/irt/irt.h" 13 #include "native_client/src/untrusted/irt/irt.h"
14 #include "ppapi/nacl_irt/public/irt_ppapi.h" 14 #include "ppapi/nacl_irt/public/irt_ppapi.h"
15 #include "ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h" 15 #include "ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h"
16 #include "ppapi/native_client/src/untrusted/irt_stub/thread_creator.h" 16 #include "ppapi/native_client/src/untrusted/irt_stub/thread_creator.h"
17 17
18 static void fatal_error(const char *message) { 18 static void fatal_error(const char *message) {
19 write(2, message, strlen(message)); 19 ssize_t wrote __attribute__((unused));
20 wrote = write(2, message, strlen(message));
20 _exit(127); 21 _exit(127);
21 } 22 }
22 23
23 /* 24 /*
24 * TODO(mcgrathr): This extremely stupid function should not exist. 25 * TODO(mcgrathr): This extremely stupid function should not exist.
25 * If the startup calling sequence were sane, this would be done 26 * If the startup calling sequence were sane, this would be done
26 * someplace that has the initial pointer locally rather than stealing 27 * someplace that has the initial pointer locally rather than stealing
27 * it from environ. 28 * it from environ.
28 * See http://code.google.com/p/nativeclient/issues/detail?id=651 29 * See http://code.google.com/p/nativeclient/issues/detail?id=651
29 */ 30 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 62
62 struct nacl_irt_ppapihook hooks; 63 struct nacl_irt_ppapihook hooks;
63 if (sizeof(hooks) != query_func(NACL_IRT_PPAPIHOOK_v0_1, 64 if (sizeof(hooks) != query_func(NACL_IRT_PPAPIHOOK_v0_1,
64 &hooks, sizeof(hooks))) 65 &hooks, sizeof(hooks)))
65 fatal_error("PpapiPluginStart: PPAPI hooks not found\n"); 66 fatal_error("PpapiPluginStart: PPAPI hooks not found\n");
66 67
67 __nacl_register_thread_creator(&hooks); 68 __nacl_register_thread_creator(&hooks);
68 69
69 return hooks.ppapi_start(funcs); 70 return hooks.ppapi_start(funcs);
70 } 71 }
OLDNEW
« no previous file with comments | « ppapi/native_client/src/untrusted/irt_stub/BUILD.gn ('k') | ppapi/tests/testing_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698