summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-19 00:33:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-19 00:33:19 +0000
commitd7de44a8fcb6bdbcb3f6d9b97bb6164a8382dbbd (patch)
tree115dc5659dd3426eb7a7b04f723e40a0b1a076fd
parenta9cc553e61195f50a6d5bda5212025dbb2c6f585 (diff)
* dln.c: newer BeOS support. a patch from Pete Goodeve
<pete.goodeve at computer.org> in [ruby-core:18712]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--configure.in7
-rw-r--r--dln.c3
-rw-r--r--ext/socket/getaddrinfo.c2
-rw-r--r--ext/socket/getnameinfo.c2
-rw-r--r--ext/socket/socket.c2
-rw-r--r--include/ruby/defines.h2
-rw-r--r--numeric.c3
8 files changed, 19 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b7eea9..02793bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 19 09:29:26 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * dln.c: newer BeOS support. a patch from Pete Goodeve
+ <pete.goodeve at computer.org> in [ruby-core:18712].
+
Fri Sep 19 03:41:25 2008 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf/nkf-utf8/nkf.c: fix memory violation. mentioned by mame [ruby-dev:36373]
diff --git a/configure.in b/configure.in
index 327abb2..83fad09 100644
--- a/configure.in
+++ b/configure.in
@@ -1423,10 +1423,12 @@ if test "$with_dln_a_out" != yes; then
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}
@@ -1826,6 +1828,7 @@ case "$target_os" in
CFLAGS="$CFLAGS -relax_pointers"
;;
esac
+ CPPFLAGS="$CPPFLAGS -I/boot/home/config/include"
;;
cygwin*|mingw*)
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
diff --git a/dln.c b/dln.c
index 6fc9778..db36866 100644
--- a/dln.c
+++ b/dln.c
@@ -1442,7 +1442,8 @@ dln_load(const char *file)
/* 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. */
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index e99c4e4..837a506 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -42,7 +42,7 @@
#include <sys/types.h>
#ifndef _WIN32
#include <sys/param.h>
-#if defined(__BEOS__) && !defined(__HAIKU__)
+#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
# include <net/socket.h>
#else
# include <sys/socket.h>
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index 37f60fc..aee81b5 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -38,7 +38,7 @@
#include <stdio.h>
#include <sys/types.h>
#ifndef _WIN32
-#if defined(__BEOS__) && !defined(__HAIKU__)
+#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
# include <net/socket.h>
#else
# include <sys/socket.h>
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index c753f19..698bc60 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -28,7 +28,7 @@
#endif
#ifndef _WIN32
-#if defined(__BEOS__) && !defined(__HAIKU__)
+#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
# include <net/socket.h>
#else
# include <sys/socket.h>
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index 1a0274e..d580135 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -198,7 +198,7 @@ void xfree(void*);
#include "vms/vms.h"
#endif
-#if defined(__BEOS__) && !defined(__HAIKU__)
+#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE)
#include <net/socket.h> /* intern.h needs fd_set definition */
#endif
diff --git a/numeric.c b/numeric.c
index 6301ade..7cecfeb 100644
--- a/numeric.c
+++ b/numeric.c
@@ -78,6 +78,9 @@ round(double x)
}
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;