1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/extconf.rb: check arpa/inet.h for ntohs.

* ext/socket/socket.c: include arpa/inet.h if available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2006-09-02 19:44:42 +00:00
parent b23b5ed620
commit c76ff0753e
3 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Sun Sep 3 04:40:42 2006 Tanaka Akira <akr@fsij.org>
* ext/socket/extconf.rb: check arpa/inet.h for ntohs.
* ext/socket/socket.c: include arpa/inet.h if available.
Sun Sep 3 04:03:06 2006 Tanaka Akira <akr@fsij.org> Sun Sep 3 04:03:06 2006 Tanaka Akira <akr@fsij.org>
* ext/curses/curses.c: define _XOPEN_SOURCE_EXTENDED on HP-UX. * ext/curses/curses.c: define _XOPEN_SOURCE_EXTENDED on HP-UX.

View file

@ -25,6 +25,9 @@ if /solaris/ =~ RUBY_PLATFORM and !try_compile("")
# bug of gcc 3.0 on Solaris 8 ? # bug of gcc 3.0 on Solaris 8 ?
headers << "sys/feature_tests.h" headers << "sys/feature_tests.h"
end end
if have_header("arpa/inet.h")
headers << "arpa/inet.h"
end
ipv6 = false ipv6 = false
default_ipv6 = /cygwin/ !~ RUBY_PLATFORM default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
@ -237,7 +240,6 @@ unless getaddr_info_ok and have_func("getnameinfo", "netdb.h") and have_func("ge
have_func("inet_ntop") or have_func("inet_ntoa") have_func("inet_ntop") or have_func("inet_ntoa")
have_func("inet_pton") or have_func("inet_aton") have_func("inet_pton") or have_func("inet_aton")
have_func("getservbyport") have_func("getservbyport")
have_header("arpa/inet.h")
have_header("arpa/nameser.h") have_header("arpa/nameser.h")
have_header("resolv.h") have_header("resolv.h")
end end

View file

@ -41,6 +41,9 @@
#ifdef HAVE_NETINET_UDP_H #ifdef HAVE_NETINET_UDP_H
# include <netinet/udp.h> # include <netinet/udp.h>
#endif #endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#include <netdb.h> #include <netdb.h>
#endif #endif
#include <errno.h> #include <errno.h>