mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
* 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:
parent
aac8fbf09f
commit
f105a01a3e
6 changed files with 58 additions and 10 deletions
|
@ -173,6 +173,30 @@ ruby_getaddrinfo(nodename, servname, hints, res)
|
|||
#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo((node),(serv),(hints),(res))
|
||||
#endif
|
||||
|
||||
#if defined(_AIX)
|
||||
static int
|
||||
ruby_getaddrinfo__aix(nodename, servname, hints, res)
|
||||
char *nodename;
|
||||
char *servname;
|
||||
struct addrinfo *hints;
|
||||
struct addrinfo **res;
|
||||
{
|
||||
int error = getaddrinfo(nodename, servname, hints, res);
|
||||
struct addrinfo *r;
|
||||
if (error)
|
||||
return error;
|
||||
for (r = *res; r != NULL; r = r->ai_next) {
|
||||
if (r->ai_addr->sa_family == 0)
|
||||
r->ai_addr->sa_family = r->ai_family;
|
||||
if (r->ai_addr->sa_len == 0)
|
||||
r->ai_addr->sa_len = r->ai_addrlen;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#undef getaddrinfo
|
||||
#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res))
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CLOSESOCKET
|
||||
#undef close
|
||||
#define close closesocket
|
||||
|
@ -2413,7 +2437,9 @@ sock_s_getnameinfo(argc, argv)
|
|||
* 4th element holds numeric form, don't resolve.
|
||||
* see ipaddr().
|
||||
*/
|
||||
#ifdef AI_NUMERICHOST /* AIX 4.3.3 doesn't have AI_NUMERICHOST. */
|
||||
hints.ai_flags |= AI_NUMERICHOST;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue