[ruby-cvs:54563] nagachika:r47415 (ruby_2_1): merge revision(s) r45046, r45047, r45063, r45087, r45146, r45150, r45151, r45152: [Backport #9525]

nagachika at ruby-lang.org nagachika at ruby-lang.org
Sat Sep 6 00:14:24 JST 2014


nagachika	2014-09-06 00:14:23 +0900 (Sat, 06 Sep 2014)

  New Revision: 47415

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

  Log:
    merge revision(s) r45046,r45047,r45063,r45087,r45146,r45150,r45151,r45152: [Backport #9525]
    
    * ext/socket: Wrap struct addrinfo by struct rb_addrinfo.
    
    * ext/socket: Bypass getaddrinfo() if node and serv are numeric.
      Reporeted by Naotoshi Seo.  [ruby-core:60801] [Bug #9525]
    
    * ext/socket/extconf.rb: Detect struct sockaddr_in6.sin6_len.
    
    * ext/socket/sockport.h (SET_SIN6_LEN): New macro.
      (INIT_SOCKADDR_IN6): Ditto.
    
    * ext/socket/rubysocket.h (struct rb_addrinfo): Add
      allocated_by_malloc field.
    
    * ext/socket/raddrinfo.c (numeric_getaddrinfo): New function.
      (rb_getaddrinfo): Call numeric_getaddrinfo at first.
      (rb_freeaddrinfo): Free struct addrinfo properly when it is
      allocated by numeric_getaddrinfo.
    
    * ext/socket/raddrinfo.c (numeric_getaddrinfo): Use xcalloc.
      Suggested by Eric Wong.
      https://bugs.ruby-lang.org/issues/9525#note-14
    
    * ext/socket/raddrinfo.c (rb_getaddrinfo): second argument of
      MEMZERO is type.  Coverity Scan found this bug.
    
    * include/ruby/win32.h, win32/win32.c (rb_w32_inet_pton): add a
      wrapper function for inet_pton minimum supported client is
      Vista, as well as inet_ntop.
    
    * ext/socket/option.c (inet_pton): use rb_w32_inet_pton, instead of
      inet_ntop directly, which is unavailable on older version Windows.
    
    * ext/socket/raddrinfo.c (inet_pton): use rb_w32_inet_pton, instead of
      inet_pton directly, which is unavailable on older version Windows.

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/ext/socket/extconf.rb
    branches/ruby_2_1/ext/socket/raddrinfo.c
    branches/ruby_2_1/ext/socket/rubysocket.h
    branches/ruby_2_1/ext/socket/sockport.h
    branches/ruby_2_1/include/ruby/win32.h
    branches/ruby_2_1/version.h
    branches/ruby_2_1/win32/win32.c


More information about the ruby-cvs mailing list