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

ruby-changes:7904

From: matz <ko1@a...>
Date: Fri, 19 Sep 2008 09:32:49 +0900 (JST)
Subject: [ruby-changes:7904] Ruby:r19424 (ruby_1_8): * dln.c: newer BeOS support. a patch from Pete Goodeve

matz	2008-09-19 09:32:22 +0900 (Fri, 19 Sep 2008)

  New Revision: 19424

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

  Log:
    * dln.c: newer BeOS support.  a patch from Pete Goodeve
      <pete.goodeve at computer.org> in [ruby-core:18712].

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/configure.in
    branches/ruby_1_8/defines.h
    branches/ruby_1_8/dln.c
    branches/ruby_1_8/eval.c
    branches/ruby_1_8/ext/socket/extconf.rb
    branches/ruby_1_8/ext/socket/getaddrinfo.c
    branches/ruby_1_8/ext/socket/getnameinfo.c
    branches/ruby_1_8/ext/socket/socket.c
    branches/ruby_1_8/io.c
    branches/ruby_1_8/numeric.c

Index: ruby_1_8/dln.c
===================================================================
--- ruby_1_8/dln.c	(revision 19423)
+++ ruby_1_8/dln.c	(revision 19424)
@@ -1499,7 +1499,8 @@
       /* load extention module */
       img_id = load_add_on(file);
       if (img_id <= 0) {
-	rb_loaderror("Failed to load %.200s", file);
+	rb_loaderror("Failed to load add_on %.200s error_code=%x",
+	  file, img_id);
       }
       
       /* find symbol for module initialize function. */
Index: ruby_1_8/ext/socket/getaddrinfo.c
===================================================================
--- ruby_1_8/ext/socket/getaddrinfo.c	(revision 19423)
+++ ruby_1_8/ext/socket/getaddrinfo.c	(revision 19424)
@@ -42,7 +42,7 @@
 #include <sys/types.h>
 #if !defined(_WIN32) && !defined(__VMS)
 #include <sys/param.h>
-#if defined(__BEOS__)
+#if defined(__BEOS__) && !defined(BONE)
 # include <net/socket.h>
 #else
 # include <sys/socket.h>
Index: ruby_1_8/ext/socket/extconf.rb
===================================================================
--- ruby_1_8/ext/socket/extconf.rb	(revision 19423)
+++ ruby_1_8/ext/socket/extconf.rb	(revision 19424)
@@ -38,7 +38,7 @@
 end
 
 ipv6 = false
-default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
+default_ipv6 = /cygwin|beos/ !~ RUBY_PLATFORM
 if enable_config("ipv6", default_ipv6)
   if checking_for("ipv6") {try_link(<<EOF)}
 #include <sys/types.h>
Index: ruby_1_8/ext/socket/socket.c
===================================================================
--- ruby_1_8/ext/socket/socket.c	(revision 19423)
+++ ruby_1_8/ext/socket/socket.c	(revision 19424)
@@ -26,7 +26,7 @@
 #endif
 
 #ifndef _WIN32
-#if defined(__BEOS__)
+#if defined(__BEOS__) && !defined(BONE)
 # include <net/socket.h>
 #else
 # include <sys/socket.h>
Index: ruby_1_8/ext/socket/getnameinfo.c
===================================================================
--- ruby_1_8/ext/socket/getnameinfo.c	(revision 19423)
+++ ruby_1_8/ext/socket/getnameinfo.c	(revision 19424)
@@ -38,7 +38,7 @@
 #include <stdio.h>
 #include <sys/types.h>
 #ifndef _WIN32
-#if defined(__BEOS__)
+#if defined(__BEOS__) && !defined(BONE)
 # include <net/socket.h>
 #else
 # include <sys/socket.h>
Index: ruby_1_8/numeric.c
===================================================================
--- ruby_1_8/numeric.c	(revision 19423)
+++ ruby_1_8/numeric.c	(revision 19424)
@@ -80,6 +80,9 @@
     }
     return x;
 }
+#elif defined(__BEOS__)
+      /* appears to be a bug in the BeOS headers */
+      double round(double x);
 #endif
 
 static ID id_coerce, id_to_i, id_eq;
Index: ruby_1_8/configure.in
===================================================================
--- ruby_1_8/configure.in	(revision 19423)
+++ ruby_1_8/configure.in	(revision 19424)
@@ -1261,10 +1261,12 @@
 			  powerpc*)
 			    : ${LDSHARED="ld -xms"}
 			    DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -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 -lbe -lroot"
+			    DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib \$(topdir)/_APP_ -lbe -lroot"
+			    LDFLAGS="$LDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib -lbe -lroot"
 			    ;;
 			esac
 			: ${LIBPATHENV=LIBRARY_PATH}
@@ -1630,6 +1632,7 @@
 	    CFLAGS="$CFLAGS -relax_pointers"
 	    ;;
 	esac
+	CPPFLAGS="$CPPFLAGS -I/boot/home/config/include"
 	;;
     cygwin*|mingw*)
 	case "$target_os" in
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 19423)
+++ ruby_1_8/ChangeLog	(revision 19424)
@@ -1,3 +1,8 @@
+Fri Sep 19 09:29:26 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* dln.c: newer BeOS support.  a patch from Pete Goodeve
+	  <pete.goodeve at computer.org> in [ruby-core:18712].
+
 Thu Sep 18 20:37:59 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/optparse.rb (OptionParser::ParseError#set_backtrace): omits
Index: ruby_1_8/io.c
===================================================================
--- ruby_1_8/io.c	(revision 19423)
+++ ruby_1_8/io.c	(revision 19424)
@@ -91,7 +91,9 @@
 # ifndef NOFILE
 #  define NOFILE (OPEN_MAX)
 # endif
-#include <net/socket.h>
+#if !defined(BONE)
+#  include <net/socket.h>
+# endif
 #endif
 
 #include "util.h"
Index: ruby_1_8/defines.h
===================================================================
--- ruby_1_8/defines.h	(revision 19423)
+++ ruby_1_8/defines.h	(revision 19424)
@@ -195,7 +195,7 @@
 #include "vms.h"
 #endif
 
-#if defined(__BEOS__)
+#if defined(__BEOS__) && !defined(BONE)
 #include <net/socket.h> /* intern.h needs fd_set definition */
 #endif
 
Index: ruby_1_8/eval.c
===================================================================
--- ruby_1_8/eval.c	(revision 19423)
+++ ruby_1_8/eval.c	(revision 19424)
@@ -74,7 +74,7 @@
 
 #include <time.h>
 
-#ifdef __BEOS__
+#if defined(__BEOS__) && !defined(BONE)
 #include <net/socket.h>
 #endif
 

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

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