[前][次][番号順一覧][スレッド一覧]

ruby-changes:40652

From: nobu <ko1@a...>
Date: Tue, 24 Nov 2015 09:17:27 +0900 (JST)
Subject: [ruby-changes:40652] nobu:r52731 (trunk): Drop support for BeOS

nobu	2015-11-24 09:17:11 +0900 (Tue, 24 Nov 2015)

  New Revision: 52731

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52731

  Log:
    Drop support for BeOS
    
    * beos: Drop support for BeOS now that Haiku is stable.
      [Fix GH-1112]

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/configure.in
    trunk/dln.c
    trunk/ext/extmk.rb
    trunk/ext/socket/basicsocket.c
    trunk/ext/socket/extconf.rb
    trunk/ext/socket/getaddrinfo.c
    trunk/ext/socket/getnameinfo.c
    trunk/ext/socket/rubysocket.h
    trunk/file.c
    trunk/include/ruby/defines.h
    trunk/io.c
    trunk/lib/mkmf.rb
    trunk/signal.c
Index: include/ruby/defines.h
===================================================================
--- include/ruby/defines.h	(revision 52730)
+++ include/ruby/defines.h	(revision 52731)
@@ -168,10 +168,6 @@ void xfree(void*); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L168
 #include "ruby/win32.h"
 #endif
 
-#if defined(__BEOS__) && !defined(BONE)
-#include <net/socket.h> /* intern.h needs fd_set definition */
-#endif
-
 #ifdef RUBY_EXPORT
 #undef RUBY_EXTERN
 
Index: configure.in
===================================================================
--- configure.in	(revision 52730)
+++ configure.in	(revision 52731)
@@ -1139,15 +1139,8 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.in#L1139
 		  fi
 		fi
 		],
-[beos*], [
-		ac_cv_func_link=no
-		ac_cv_func_sched_yield=no
-		ac_cv_func_pthread_attr_setinheritsched=no
-		ac_cv_header_net_socket_h=yes
-		LIBS="$LIBS" # m lib is include in root under BeOS
-		],
 [haiku*], [
-		LIBS="$LIBS"
+		LIBS="$LIBS" # m lib is include in root
 		],
 [cygwin*], [	ac_cv_header_langinfo_h=yes
 		AC_CHECK_FUNCS(cygwin_conv_path)
@@ -3072,7 +3065,7 @@ if test "$with_dln_a_out" != yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L3065
       # mkmf.rb's have_header() to fail if the desired resource happens to be
       # installed in the /usr/local tree.
       RUBY_APPEND_OPTION(CCDLFLAGS, -fno-common)],
-    [bsdi*|beos*|cygwin*|mingw*|aix*|interix*], [ ],
+    [bsdi*|cygwin*|mingw*|aix*|interix*], [ ],
     [
       RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)])
   else
@@ -3170,20 +3163,6 @@ if test "$with_dln_a_out" != yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L3163
 			: ${LIBPATHENV=LIBPATH}
 			RPATHFLAG=" ${linker_flag}-blibpath:%1\$-s:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"
 			rb_cv_dlopen=yes],
-	[beos*], [	AS_CASE(["$target_cpu"],
-			  [powerpc*], [
-			    : ${LDSHARED='$(LD) -xms'}
-			    EXTDLDFLAGS='-export $(TARGET_ENTRY)'
-			    DLDFLAGS="$DLDFLAGS -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o"
-			    LDFLAGS="$LDFLAGS -L/boot/home/config/lib -lbe -lroot"
-			    ],
-			  [i586*], [
-			    : ${LDSHARED='$(LD) -shared'}
-			    DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib \$(topdir)/_APP_ -lroot"
-			    LDFLAGS="$LDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib -lroot"
-			    ])
-			: ${LIBPATHENV=LIBRARY_PATH}
-			rb_cv_dlopen=yes],
 	[nto-qnx*], [	DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
 			: ${LDSHARED='$(LD) -Bshareable -x'}
 			LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
@@ -3565,7 +3544,7 @@ LIBRUBYARG='$(LIBRUBYARG_STATIC)' https://github.com/ruby/ruby/blob/trunk/configure.in#L3544
 SOLIBS=
 
 AS_CASE(["$target_os"],
-  [cygwin*|mingw*|beos*|haiku*|darwin*], [
+  [cygwin*|mingw*|haiku*|darwin*], [
     : ${DLDLIBS=""}
     ],
   [
@@ -3685,12 +3664,6 @@ AS_CASE("$enable_shared", [yes], [ https://github.com/ruby/ruby/blob/trunk/configure.in#L3664
 	LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}'
 	SOLIBS='-lm -lc'
 	],
-    [beos*], [
-	AS_CASE(["$target_cpu"],
-	[powerpc*], [
-	    LIBRUBY_DLDFLAGS="-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o $LDFLAGS_OPTDIR"
-	    ])
-	],
     [darwin*], [
 	RUBY_SO_NAME="$RUBY_SO_NAME"'.$(MAJOR).$(MINOR).$(TEENY)'
 	LIBRUBY_LDSHARED='$(CC) -dynamiclib'
@@ -3917,10 +3890,6 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.in#L3890
 	  CFLAGS="$CFLAGS -std"
 	fi
 	],
-    [beos*], [
-	AS_CASE(["$target_cpu"],[powerpc*], [CFLAGS="$CFLAGS -relax_pointers"])
-	CPPFLAGS="$CPPFLAGS -I/boot/home/config/include"
-	],
     [cygwin*|mingw*], [
 	RUBY_SO_NAME="${RUBY_SO_NAME}"'$(MAJOR)$(MINOR)$(TEENY)'
 	LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52730)
+++ ChangeLog	(revision 52731)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Nov 24 09:17:02 2015  Alexander von Gluck IV  <kallisti5@u...>
+
+	* beos: Drop support for BeOS now that Haiku is stable.
+	  [Fix GH-1112]
+
 Tue Nov 24 09:16:35 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* internal.h (rb_gc_for_fd): move to export, as referred by
Index: io.c
===================================================================
--- io.c	(revision 52730)
+++ io.c	(revision 52731)
@@ -35,7 +35,7 @@ https://github.com/ruby/ruby/blob/trunk/io.c#L35
 # include <sys/socket.h>
 #endif
 
-#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__BEOS__)
+#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32)
 # define NO_SAFE_RENAME
 #endif
 
@@ -100,12 +100,6 @@ https://github.com/ruby/ruby/blob/trunk/io.c#L100
 # include <sys/wait.h>		/* for WNOHANG on BSD */
 #endif
 
-#if defined(__BEOS__)
-# ifndef NOFILE
-#  define NOFILE (OPEN_MAX)
-# endif
-#endif
-
 #include "ruby/util.h"
 
 #ifndef O_ACCMODE
@@ -2188,7 +2182,7 @@ remain_size(rb_io_t *fptr) https://github.com/ruby/ruby/blob/trunk/io.c#L2182
     off_t pos;
 
     if (fstat(fptr->fd, &st) == 0  && S_ISREG(st.st_mode)
-#if defined(__BEOS__) || defined(__HAIKU__)
+#if defined(__HAIKU__)
 	&& (st.st_dev > 3)
 #endif
 	)
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 52730)
+++ lib/mkmf.rb	(revision 52731)
@@ -132,7 +132,6 @@ module MakeMakefile https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L132
   $mingw = /mingw/ =~ RUBY_PLATFORM
   $cygwin = /cygwin/ =~ RUBY_PLATFORM
   $netbsd = /netbsd/ =~ RUBY_PLATFORM
-  $beos = /beos/ =~ RUBY_PLATFORM
   $haiku = /haiku/ =~ RUBY_PLATFORM
   $solaris = /solaris/ =~ RUBY_PLATFORM
   $universal = /universal/ =~ RUBY_PLATFORM
Index: dln.c
===================================================================
--- dln.c	(revision 52730)
+++ dln.c	(revision 52731)
@@ -85,10 +85,6 @@ char *getenv(); https://github.com/ruby/ruby/blob/trunk/dln.c#L85
 # endif
 #endif
 
-#if defined(__BEOS__)
-# include <image.h>
-#endif
-
 #ifndef dln_loaderror
 static void
 dln_loaderror(const char *format, ...)
@@ -1442,54 +1438,6 @@ dln_load(const char *file) https://github.com/ruby/ruby/blob/trunk/dln.c#L1438
     }
 #endif
 
-#if defined(__BEOS__)
-# define DLN_DEFINED
-    {
-      status_t err_stat;  /* BeOS error status code */
-      image_id img_id;    /* extension module unique id */
-      void (*init_fct)(); /* initialize function for extension module */
-
-      /* load extension module */
-      img_id = load_add_on(file);
-      if (img_id <= 0) {
-	dln_loaderror("Failed to load add_on %.200s error_code=%x",
-	  file, img_id);
-      }
-
-      /* find symbol for module initialize function. */
-      /* The Be Book KernelKit Images section described to use
-	 B_SYMBOL_TYPE_TEXT for symbol of function, not
-	 B_SYMBOL_TYPE_CODE. Why ? */
-      /* strcat(init_fct_symname, "__Fv"); */  /* parameter nothing. */
-      /* "__Fv" dont need! The Be Book Bug ? */
-      err_stat = get_image_symbol(img_id, buf,
-				  B_SYMBOL_TYPE_TEXT, (void **)&init_fct);
-
-      if (err_stat != B_NO_ERROR) {
-	char real_name[MAXPATHLEN];
-
-	strlcpy(real_name, buf, MAXPATHLEN);
-	strlcat(real_name, "__Fv", MAXPATHLEN);
-        err_stat = get_image_symbol(img_id, real_name,
-				    B_SYMBOL_TYPE_TEXT, (void **)&init_fct);
-      }
-
-      if ((B_BAD_IMAGE_ID == err_stat) || (B_BAD_INDEX == err_stat)) {
-	unload_add_on(img_id);
-	dln_loaderror("Failed to lookup Init function %.200s", file);
-      }
-      else if (B_NO_ERROR != err_stat) {
-	char errmsg[] = "Internal of BeOS version. %.200s (symbol_name = %s)";
-	unload_add_on(img_id);
-	dln_loaderror(errmsg, strerror(err_stat), buf);
-      }
-
-      /* call module initialize function. */
-      (*init_fct)();
-      return (void*)img_id;
-    }
-#endif /* __BEOS__ */
-
 #ifndef DLN_DEFINED
     dln_notimplement();
 #endif
Index: ext/socket/rubysocket.h
===================================================================
--- ext/socket/rubysocket.h	(revision 52730)
+++ ext/socket/rubysocket.h	(revision 52731)
@@ -27,11 +27,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/rubysocket.h#L27
 #    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 { https://github.com/ruby/ruby/blob/trunk/ext/socket/rubysocket.h#L218
 #  endif
 #endif
 
-#ifdef __BEOS__
-#  undef close
-#  define close closesocket
-#endif
-
 #define INET_CLIENT 0
 #define INET_SERVER 1
 #define INET_SOCKS  2
Index: ext/socket/getaddrinfo.c
===================================================================
--- ext/socket/getaddrinfo.c	(revision 52730)
+++ ext/socket/getaddrinfo.c	(revision 52731)
@@ -45,11 +45,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/getaddrinfo.c#L45
 #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 https://github.com/ruby/ruby/blob/trunk/ext/socket/getaddrinfo.c#L435
 			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);
Index: ext/socket/extconf.rb
===================================================================
--- ext/socket/extconf.rb	(revision 52730)
+++ ext/socket/extconf.rb	(revision 52731)
@@ -435,9 +435,6 @@ when /mswin(32|64)|mingw/ https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L435
   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 https://github.com/ruby/ruby/blob/trunk/ext/socket/extconf.rb#L504
   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"
Index: ext/socket/basicsocket.c
===================================================================
--- ext/socket/basicsocket.c	(revision 52730)
+++ ext/socket/basicsocket.c	(revision 52731)
@@ -244,7 +244,6 @@ bsock_setsockopt(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/ext/socket/basicsocket.c#L244
     return INT2FIX(0);
 }
 
-#if !defined(__BEOS__)
 /*
  * Document-method: getsockopt
  * call-seq:
@@ -324,9 +323,6 @@ bsock_getsockopt(VALUE sock, VALUE lev, https://github.com/ruby/ruby/blob/trunk/ext/socket/basicsocket.c#L323
 
     return rsock_sockopt_new(family, level, option, rb_str_new(buf, len));
 }
-#else
-#define bsock_getsockopt rb_f_notimplement
-#endif
 
 /*
  * call-seq:
Index: ext/socket/getnameinfo.c
===================================================================
--- ext/socket/getnameinfo.c	(revision 52730)
+++ ext/socket/getnameinfo.c	(revision 52731)
@@ -41,11 +41,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/socket/getnameinfo.c#L41
 #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>
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 52730)
+++ ext/extmk.rb	(revision 52731)
@@ -616,9 +616,6 @@ void Init_ext(void)\n{\n#$extinit} https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L616
     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 = [
Index: NEWS
===================================================================
--- NEWS	(revision 52730)
+++ NEWS	(revision 52731)
@@ -242,6 +242,8 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/NEWS#L242
 
 * OS/2 is no longer supported
 
+* BeOS is no longer supported
+
 * Borland-C is no longer supported
 
 * Haiku now stable and best effort
Index: signal.c
===================================================================
--- signal.c	(revision 52730)
+++ signal.c	(revision 52731)
@@ -69,10 +69,6 @@ ruby_atomic_compare_and_swap(rb_atomic_t https://github.com/ruby/ruby/blob/trunk/signal.c#L69
 }
 #endif
 
-#if defined(__BEOS__)
-#undef SIGBUS
-#endif
-
 #ifndef NSIG
 # define NSIG (_SIGMAX + 1)      /* For QNX */
 #endif
Index: file.c
===================================================================
--- file.c	(revision 52730)
+++ file.c	(revision 52731)
@@ -120,33 +120,6 @@ int flock(int, int); https://github.com/ruby/ruby/blob/trunk/file.c#L120
 #define STAT(p, s)	stat((p), (s))
 #endif
 
-#if defined(__BEOS__) /* should not change ID if -1 */
-static int
-be_chown(const char *path, uid_t owner, gid_t group)
-{
-    if (owner == (uid_t)-1 || group == (gid_t)-1) {
-	struct stat st;
-	if (STAT(path, &st) < 0) return -1;
-	if (owner == (uid_t)-1) owner = st.st_uid;
-	if (group == (gid_t)-1) group = st.st_gid;
-    }
-    return chown(path, owner, group);
-}
-#define chown be_chown
-static int
-be_fchown(int fd, uid_t owner, gid_t group)
-{
-    if (owner == (uid_t)-1 || group == (gid_t)-1) {
-	struct stat st;
-	if (fstat(fd, &st) < 0) return -1;
-	if (owner == (uid_t)-1) owner = st.st_uid;
-	if (group == (gid_t)-1) group = st.st_gid;
-    }
-    return fchown(fd, owner, group);
-}
-#define fchown be_fchown
-#endif /* __BEOS__ */
-
 VALUE rb_cFile;
 VALUE rb_mFileTest;
 VALUE rb_cStat;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]