diff --git a/ChangeLog b/ChangeLog index 2b7eea9ce0..02793bde17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 19 09:29:26 2008 Yukihiro Matsumoto + + * dln.c: newer BeOS support. a patch from Pete Goodeve + in [ruby-core:18712]. + Fri Sep 19 03:41:25 2008 NARUSE, Yui * ext/nkf/nkf-utf8/nkf.c: fix memory violation. mentioned by mame [ruby-dev:36373] diff --git a/configure.in b/configure.in index 327abb24eb..83fad09a4c 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 6fc97787e6..db368662c3 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 e99c4e462b..837a506a72 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -42,7 +42,7 @@ #include #ifndef _WIN32 #include -#if defined(__BEOS__) && !defined(__HAIKU__) +#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) # include #else # include diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index 37f60fc83f..aee81b5356 100644 --- a/ext/socket/getnameinfo.c +++ b/ext/socket/getnameinfo.c @@ -38,7 +38,7 @@ #include #include #ifndef _WIN32 -#if defined(__BEOS__) && !defined(__HAIKU__) +#if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) # include #else # include diff --git a/ext/socket/socket.c b/ext/socket/socket.c index c753f19de3..698bc60996 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 #else # include diff --git a/include/ruby/defines.h b/include/ruby/defines.h index 1a0274ec81..d580135233 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 /* intern.h needs fd_set definition */ #endif diff --git a/numeric.c b/numeric.c index 6301adecd6..7cecfeb02d 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;