* bignum.c (get2comp): calculate proper 2's complement for

negative numbers.  a bug in normalizing negative numbers
  reported from Honda Hiroki <hhonda@ipflex.com>.

* ext/socket/socket.c (ruby_getaddrinfo__aix): merged a patch from
  KUBO Takehiro <kubo@jiubao.org> to support AIX.  [ruby-list:40832]

* lib/yaml/rubytypes.rb (Array::to_yaml): merged a patch from
  Tilman Sauerbeck <tilman@code-monkey.de>.  [ruby-core:05055]

* lib/yaml/rubytypes.rb (Hash::to_yaml): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2005-06-08 03:20:09 +00:00
parent aac8fbf09f
commit f105a01a3e
6 changed files with 58 additions and 10 deletions

View file

@ -177,8 +177,13 @@ main()
}
for (ai = aitop; ai; ai = ai->ai_next) {
if (ai->ai_family == AF_LOCAL) continue;
if (ai->ai_addr == NULL ||
ai->ai_addrlen == 0 ||
if (ai->ai_addr == NULL)
goto bad;
#if defined(_AIX)
ai->ai_addr->sa_len = ai->ai_addrlen;
ai->ai_addr->sa_family = ai->ai_family;
#endif
if (ai->ai_addrlen == 0 ||
getnameinfo(ai->ai_addr, ai->ai_addrlen,
straddr, sizeof(straddr), strport, sizeof(strport),
NI_NUMERICHOST|NI_NUMERICSERV) != 0) {