1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Merges a patch form naclports.

* configure.in (RUBY_NACL and others): Supports PNaCl.
* dln.c: replace the old hacky dynamic loading over HTTP with nacl_io.
* file.c: tenatively use access(2) instead of eaccess.
  (rb_file_load_ok): weaken with attribute but not by postprocess.
* io.c (socket.h): now NaCl has socket.h
  (flock): disable here instead of nacl/ioctl.h
* nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY):
  respect path to them if they are absolute.
  This helps naclports to build ruby in their source tree.
  (PROGRAM_NMF, .SUFFIXES): support .pnexe for PNaCl.
  (ruby.o, file.o): move the hack to attributes in ruby.c and file.c
* nacl/ioctl.h: removed. move the hack to io.c.
* nacl/nacl-config.rb: support arm, pnacl and others.
* nacl/pepper_main.c: support build in a naclports tree.
* ruby.c (rb_load_file): weaken with attribute but not by postprocess.

The patch is by sbc@google.com and the Native Client Authors.
It is available at:
* 873ca4910a/ports/ruby/nacl.patch

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2014-10-11 02:11:53 +00:00
parent f21431e574
commit 69ac654c90
10 changed files with 75 additions and 69 deletions

View file

@ -210,7 +210,7 @@ pruby_async_return_value(void* data, VALUE value)
static struct PP_Var
pruby_cstr_to_var(const char* str)
{
#ifdef PPB_VAR_INTERFACE_1_0
#ifndef PPB_VAR_INTERFACE_1_1
if (var_interface != NULL)
return var_interface->VarFromUtf8(module_id, str, strlen(str));
return PP_MakeUndefined();
@ -252,7 +252,7 @@ pruby_str_to_var(volatile VALUE str)
fprintf(stderr, "[BUG] Unexpected object type: %x\n", TYPE(str));
exit(EXIT_FAILURE);
}
#ifdef PPB_VAR_INTERFACE_1_0
#ifndef PPB_VAR_INTERFACE_1_1
if (var_interface != NULL) {
return var_interface->VarFromUtf8(module_id, RSTRING_PTR(str), RSTRING_LEN(str));
}
@ -517,7 +517,7 @@ static void Instance_DidDestroy(PP_Instance instance) {
* the top left of the plugin's coordinate system (not the page). If the
* plugin is invisible, @a clip will be (0, 0, 0, 0).
*/
#ifdef PPP_INSTANCE_INTERFACE_1_0
#ifndef PPP_INSTANCE_INTERFACE_1_1
static void
Instance_DidChangeView(PP_Instance instance,
const struct PP_Rect* position,