From 13a935b0baf3990eed76486e0f47c1d574f2f916 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 24 Nov 2015 00:17:11 +0000 Subject: 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 --- ext/extmk.rb | 3 --- ext/socket/basicsocket.c | 4 ---- ext/socket/extconf.rb | 5 +---- ext/socket/getaddrinfo.c | 11 ++--------- ext/socket/getnameinfo.c | 6 +----- ext/socket/rubysocket.h | 11 +---------- 6 files changed, 5 insertions(+), 35 deletions(-) (limited to 'ext') diff --git a/ext/extmk.rb b/ext/extmk.rb index 0f76bfcdc4..bed183034a 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -616,9 +616,6 @@ void Init_ext(void)\n{\n#$extinit} open(extinit.c, "w") {|fe| fe.print src} end - if RUBY_PLATFORM =~ /beos/ - $extflags.delete("-L/usr/local/lib") - end $extpath.delete("$(topdir)") $extflags = libpathflag($extpath) << " " << $extflags.strip conf = [ 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 #ifndef _WIN32 #include -#if defined(__BEOS__) && !defined(BONE) -# include -#else -# include -#endif +#include #include #if defined(HAVE_ARPA_INET_H) #include @@ -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 #include #ifndef _WIN32 -#if defined(__BEOS__) && !defined(BONE) -# include -#else -# include -#endif +#include #include #if defined(HAVE_ARPA_INET_H) #include 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 -# else -# include -# endif +# include # include # ifdef HAVE_NETINET_IN_SYSTM_H # include @@ -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 -- cgit v1.2.3