[ruby-cvs:55031] yugui:r47882 (trunk): Fixes build failures on Portable Native Client.

yugui at ruby-lang.org yugui at ruby-lang.org
Sat Oct 11 22:33:17 JST 2014


yugui	2014-10-11 22:33:14 +0900 (Sat, 11 Oct 2014)

  New Revision: 47882

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47882

  Log:
    Fixes build failures on Portable Native Client.
    
    Note: Some of the fixes are for newlib in general but not NaCl-specific.
    
    * include/ruby/intern.h (rb_fd_select): declare struct timeval, or the
      struct gets local to the function in C99.
    
    * file.c (#include): add nacl/stat.h for PNaCl.
      (utimes): added a declaration for PNaCl.
      (stat_atimespec): stat::st_atimensec is long long but
      timespec::tv_nsec is long in PNaCl.
      (stat_mtimespec, stat_ctimespec): ditto.
      (rb_group_member): disable getgroups unless HAVE_GETGROUPS.
      (eaccess): unify the fallback to generic defined(USE_GETEUID).
    
    * io.c: include sys/time.h for struct timeval.
      (rb_close_before_exec): nothing we can do if F_GETFD is not
      available.
      (ioctl): pnacl newlib actually doesn't have ioctl.
    
    * process.c (maxgroups): it is used iff
       defined(_SC_NGROUPS_MAX) || defined(NGROUPS_MAX) but not
       defined(HAVE_GETGROUPS) || defined(HAVE_SETGROUPS).
      (obj2gid): fail unless the object is a Fixnum if getgrnam is not
      available.
      (disable_child_handler_fork_child): sigaction is not available in
      PNaCl newlib.
    
    * configure.in (warnflags, strict_warnflags): avoid -ansi for strlcpy.
      (rb_cv_gcc_atomic_builtins): also check
      __atomic_or_etch because it is used in ruby_atomic.h.
      (rb_cv_gcc_sync_builtins): ditto.
      (HAVE_GETGRNAM): added.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
    trunk/file.c
    trunk/include/ruby/intern.h
    trunk/io.c
    trunk/nacl/README.nacl
    trunk/process.c


More information about the ruby-cvs mailing list