diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-24 00:17:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-24 00:17:11 +0000 |
commit | 13a935b0baf3990eed76486e0f47c1d574f2f916 (patch) | |
tree | b1e4d0de5ae56c17dfcd3c6e76bc356d6564d6dd /ext/socket | |
parent | f7847ecb7233402d499febd6414ac34400d7b65c (diff) | |
download | ruby-13a935b0baf3990eed76486e0f47c1d574f2f916.tar.gz |
Drop support for BeOS
* beos: Drop support for BeOS now that Haiku is stable.
[Fix GH-1112]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/basicsocket.c | 4 | ||||
-rw-r--r-- | ext/socket/extconf.rb | 5 | ||||
-rw-r--r-- | ext/socket/getaddrinfo.c | 11 | ||||
-rw-r--r-- | ext/socket/getnameinfo.c | 6 | ||||
-rw-r--r-- | ext/socket/rubysocket.h | 11 |
5 files changed, 5 insertions, 32 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c index eef66d4803..2d2b22e1a9 100644 --- a/ext/socket/basicsocket.c +++ b/ext/socket/basicsocket.c @@ -244,7 +244,6 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock) return INT2FIX(0); } -#if !defined(__BEOS__) /* * Document-method: getsockopt * call-seq: @@ -324,9 +323,6 @@ bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname) return rsock_sockopt_new(family, level, option, rb_str_new(buf, len)); } -#else -#define bsock_getsockopt rb_f_notimplement -#endif /* * call-seq: diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 459c10e3cf..1c716c48a7 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -435,9 +435,6 @@ when /mswin(32|64)|mingw/ have_library("ws2_32", "WSACleanup", headers) when /cygwin/ test_func = "socket(0,0,0)" -when /beos/ - test_func = "socket(0,0,0)" - have_library("net", "socket(0,0,0)", headers) when /haiku/ test_func = "socket(0,0,0)" have_library("network", "socket(0,0,0)", headers) @@ -507,7 +504,7 @@ EOF end ipv6 = false - default_ipv6 = /beos|haiku/ !~ RUBY_PLATFORM + default_ipv6 = /haiku/ !~ RUBY_PLATFORM if enable_config("ipv6", default_ipv6) if checking_for("ipv6") {try_link(AF_INET6_SOCKET_CREATION_TEST)} $defs << "-DENABLE_IPV6" << "-DINET6" diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index dcd1cea0df..b01f1cb82e 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -45,11 +45,7 @@ #include <sys/types.h> #ifndef _WIN32 #include <sys/param.h> -#if defined(__BEOS__) && !defined(BONE) -# include <net/socket.h> -#else -# include <sys/socket.h> -#endif +#include <sys/socket.h> #include <netinet/in.h> #if defined(HAVE_ARPA_INET_H) #include <arpa/inet.h> @@ -439,11 +435,8 @@ getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *h s = socket(afd->a_af, SOCK_DGRAM, 0); if (s < 0) continue; -#if defined(__BEOS__) - closesocket(s); -#else + close(s); -#endif if (pai->ai_flags & AI_PASSIVE) { GET_AI(cur->ai_next, afd, afd->a_addrany, port); diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index 37f926f793..bca97acc1f 100644 --- a/ext/socket/getnameinfo.c +++ b/ext/socket/getnameinfo.c @@ -41,11 +41,7 @@ #include <stdio.h> #include <sys/types.h> #ifndef _WIN32 -#if defined(__BEOS__) && !defined(BONE) -# include <net/socket.h> -#else -# include <sys/socket.h> -#endif +#include <sys/socket.h> #include <netinet/in.h> #if defined(HAVE_ARPA_INET_H) #include <arpa/inet.h> diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index 607b861ac1..ecd1dfd4ef 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -27,11 +27,7 @@ # undef HAVE_TYPE_STRUCT_SOCKADDR_DL # endif #else -# if defined(__BEOS__) && !defined(BONE) -# include <net/socket.h> -# else -# include <sys/socket.h> -# endif +# include <sys/socket.h> # include <netinet/in.h> # ifdef HAVE_NETINET_IN_SYSTM_H # include <netinet/in_systm.h> @@ -222,11 +218,6 @@ typedef union { # endif #endif -#ifdef __BEOS__ -# undef close -# define close closesocket -#endif - #define INET_CLIENT 0 #define INET_SERVER 1 #define INET_SOCKS 2 |