OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /** @file hello_world.c | 6 /** @file hello_world.c |
7 * This example demonstrates loading, running and scripting a very simple | 7 * This example demonstrates loading, running and scripting a very simple |
8 * NaCl module. | 8 * NaCl module. |
9 */ | 9 */ |
10 #include <stdio.h> | 10 #include <stdio.h> |
11 #include <stdlib.h> | 11 #include <stdlib.h> |
12 #include <string.h> | 12 #include <string.h> |
13 | 13 |
14 #include "ppapi/c/pp_errors.h" | 14 #include "ppapi/c/pp_errors.h" |
15 #include "ppapi/c/pp_module.h" | 15 #include "ppapi/c/pp_module.h" |
16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
17 #include "ppapi/c/ppb.h" | 17 #include "ppapi/c/ppb.h" |
18 #include "ppapi/c/ppb_console.h" | 18 #include "ppapi/c/ppb_console.h" |
19 #include "ppapi/c/ppb_instance.h" | 19 #include "ppapi/c/ppb_instance.h" |
20 #include "ppapi/c/ppb_messaging.h" | 20 #include "ppapi/c/ppb_messaging.h" |
21 #include "ppapi/c/ppb_var.h" | 21 #include "ppapi/c/ppb_var.h" |
22 #include "ppapi/c/ppp.h" | 22 #include "ppapi/c/ppp.h" |
23 #include "ppapi/c/ppp_instance.h" | 23 #include "ppapi/c/ppp_instance.h" |
24 #include "ppapi/c/ppp_messaging.h" | 24 #include "ppapi/c/ppp_messaging.h" |
25 | 25 |
26 #if defined(__native_client__) | 26 #if defined(__native_client__) |
27 #if defined(__CLANG__) | 27 #if defined(__pnacl__) |
28 #define TCNAME "pnacl" | 28 #define TCNAME "pnacl" |
29 #elif defined(__GLIBC__) | 29 #elif defined(__GLIBC__) |
30 #define TCNAME "glibc" | 30 #define TCNAME "glibc" |
31 #else | 31 #else |
32 #define TCNAME "newlib" | 32 #define TCNAME "newlib" |
33 #endif | 33 #endif |
34 #else | 34 #else |
35 #define TCNAME "host" | 35 #define TCNAME "host" |
36 #endif | 36 #endif |
37 | 37 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 211 } |
212 return NULL; | 212 return NULL; |
213 } | 213 } |
214 | 214 |
215 | 215 |
216 /** | 216 /** |
217 * Called before the plugin module is unloaded. | 217 * Called before the plugin module is unloaded. |
218 */ | 218 */ |
219 PP_EXPORT void PPP_ShutdownModule() { | 219 PP_EXPORT void PPP_ShutdownModule() { |
220 } | 220 } |
OLD | NEW |