* ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix

domain socket filename is bigger than sizeof(sun_path).
  This limit is not rigid on some platforms such as Darwin and SunOS.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-02-28 13:29:55 +00:00
Родитель 9a1d5b04cd
Коммит 338ec3cee7
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Thu Feb 28 22:23:27 2013 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix
domain socket filename is bigger than sizeof(sun_path).
This limit is not rigid on some platforms such as Darwin and SunOS.
Thu Feb 28 21:33:01 2013 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in(AC_DISABLE_OPTION_CHECKING): avoid warning "WARNING:

Просмотреть файл

@ -1048,9 +1048,6 @@ inspect_sockaddr(VALUE addrinfo, VALUE ret)
while (s < e)
rb_str_catf(ret, ":%02x", (unsigned char)*s++);
}
if (addr->sun_path + sizeof(addr->sun_path) < (char*)&rai->addr + rai->sockaddr_len)
rb_str_catf(ret, "(sockaddr %d bytes too long)",
(int)(rai->sockaddr_len - (addr->sun_path + sizeof(addr->sun_path) - (char*)&rai->addr)));
}
break;
}