Index: native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c |
diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c b/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8eb4cbbbdbe0d57df4ed386e067b4204a17a7568 |
--- /dev/null |
+++ b/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c |
@@ -0,0 +1,32 @@ |
+/* Copyright 2015 The Chromium Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. */ |
+ |
+#include <ppapi/c/pp_errors.h> |
+#include <ppapi/c/pp_module.h> |
+#include <ppapi/c/ppb.h> |
+ |
+#include "ppapi_simple/ps_interface.h" |
+ |
+/* Defined in ps_instance.c. */ |
+const void* PSGetInterfaceImplementation(const char*); |
+ |
+extern PPB_GetInterface g_ps_get_interface; |
+ |
+/* This is defined to allow an executable to force inclusion of this object |
+ * file. Otherwise PPP_* functions won't be linked in (because they are not |
+ * needed until -lppapi on the link-line, which is usually last. */ |
+FORCE_LINK_THIS(ps_entry) |
+ |
+int32_t PPP_InitializeModule(PP_Module module, PPB_GetInterface get_interface) { |
+ g_ps_get_interface = get_interface; |
+ PSInterfaceInit(); |
+ return PP_OK; |
+} |
+ |
+const void* PPP_GetInterface(const char* interface_name) { |
+ return PSGetInterfaceImplementation(interface_name); |
+} |
+ |
+void PPP_ShutdownModule(void) { |
+} |