* ext/socket/extconf.rb: get rid of warnings by

-Wmissing-declarations or -Wold-style-definition options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-12-01 08:45:22 +00:00
Родитель 05e2da638f
Коммит b0f588fe0e
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -43,9 +43,10 @@ if enable_config("ipv6", default_ipv6)
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
int int
main() main(void)
{ {
socket(AF_INET6, SOCK_STREAM, 0); socket(AF_INET6, SOCK_STREAM, 0);
return 0;
} }
EOF EOF
$defs << "-DENABLE_IPV6" << "-DINET6" $defs << "-DENABLE_IPV6" << "-DINET6"
@ -263,7 +264,7 @@ getaddr_info_ok = (enable_config("wide-getaddrinfo") && :wide) ||
#endif #endif
int int
main() main(void)
{ {
int passive, gaierr, inet4 = 0, inet6 = 0; int passive, gaierr, inet4 = 0, inet6 = 0;
struct addrinfo hints, *ai, *aitop; struct addrinfo hints, *ai, *aitop;
@ -347,12 +348,12 @@ main()
if (aitop) if (aitop)
freeaddrinfo(aitop); freeaddrinfo(aitop);
exit(EXIT_SUCCESS); return EXIT_SUCCESS;
bad: bad:
if (aitop) if (aitop)
freeaddrinfo(aitop); freeaddrinfo(aitop);
exit(EXIT_FAILURE); return EXIT_FAILURE;
} }
EOF EOF
if ipv6 and not getaddr_info_ok if ipv6 and not getaddr_info_ok