Feature #403 » new_ruby_1_9_haiku.patch
eval_intern.h (working copy) | ||
---|---|---|
#include <unistd.h>
|
||
#endif
|
||
#ifdef __BEOS__
|
||
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||
#include <net/socket.h>
|
||
#endif
|
||
include/ruby/defines.h (working copy) | ||
---|---|---|
#include "vms/vms.h"
|
||
#endif
|
||
#if defined(__BEOS__)
|
||
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||
#include <net/socket.h> /* intern.h needs fd_set definition */
|
||
#endif
|
||
configure.in (working copy) | ||
---|---|---|
human*) ac_cv_func_getpgrp_void=yes
|
||
ac_cv_func_setitimer=no
|
||
;;
|
||
beos*) ac_cv_func_link=no;;
|
||
beos*) ac_cv_func_link=no
|
||
LIBS="$LIBS" # m lib is include in root under BeOS
|
||
;;
|
||
haiku*) ac_cv_func_link=no
|
||
LIBS="$LIBS" # m lib is include in root under Haiku
|
||
;;
|
||
cygwin*) ;;
|
||
mingw*) LIBS="-lshell32 -lws2_32 $LIBS"
|
||
ac_cv_header_a_out_h=no
|
||
... | ... | |
AC_DEFINE_UNQUOTED(STACK_GROW_DIRECTION, $rb_cv_stack_grow_dir)
|
||
if test x"$enable_pthread" = xyes; then
|
||
for pthread_lib in thr pthread pthreads c c_r; do
|
||
for pthread_lib in thr pthread pthreads c c_r root; do
|
||
AC_CHECK_LIB($pthread_lib, pthread_kill,
|
||
rb_with_pthread=yes, rb_with_pthread=no)
|
||
if test "$rb_with_pthread" = "yes"; then break; fi
|
||
... | ... | |
case $pthread_lib in
|
||
c)
|
||
;;
|
||
root)
|
||
;;
|
||
c_r)
|
||
MAINLIBS="-pthread $MAINLIBS"
|
||
;;
|
||
... | ... | |
openstep*) CCDLFLAGS="$CCDLFLAGS -fno-common";;
|
||
rhapsody*) CCDLFLAGS="$CCDLFLAGS -fno-common";;
|
||
darwin*) CCDLFLAGS="$CCDLFLAGS -fno-common";;
|
||
human*|bsdi*|beos*|cygwin*|mingw*|aix*|interix*) ;;
|
||
human*|bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*) ;;
|
||
*) CCDLFLAGS="$CCDLFLAGS -fPIC";;
|
||
esac
|
||
else
|
||
... | ... | |
esac
|
||
: ${LIBPATHENV=LIBRARY_PATH}
|
||
rb_cv_dlopen=yes ;;
|
||
haiku*) case "$target_cpu" in
|
||
powerpc*)
|
||
: ${LDSHARED="ld -xms"}
|
||
DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
|
||
;;
|
||
i586*)
|
||
: ${LDSHARED="ld -shared"}
|
||
DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot"
|
||
;;
|
||
esac
|
||
: ${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"
|
||
... | ... | |
SOLIBS=
|
||
case "$target_os" in
|
||
cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*)
|
||
cygwin*|mingw*|beos*|haiku*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*)
|
||
: ${DLDLIBS=""}
|
||
;;
|
||
*)
|
thread_pthread.c (working copy) | ||
---|---|---|
#define native_cleanup_push pthread_cleanup_push
|
||
#define native_cleanup_pop pthread_cleanup_pop
|
||
#ifdef __HAIKU__
|
||
#define native_thread_yield() /* not available under Haiku */
|
||
#else
|
||
#define native_thread_yield() sched_yield()
|
||
#endif
|
||
#ifndef __CYGWIN__
|
||
static void add_signal_thread_list(rb_thread_t *th);
|
||
... | ... | |
CHECK_ERR(pthread_attr_setstacksize(&attr, stack_size));
|
||
#endif
|
||
#ifndef __HAIKU__ /* not yet available under Haiku */
|
||
CHECK_ERR(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED));
|
||
#endif
|
||
CHECK_ERR(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));
|
||
err = pthread_create(&th->thread_id, &attr, thread_start_func_1, th);
|
io.c (working copy) | ||
---|---|---|
#include <sys/types.h>
|
||
#if !defined(_WIN32) && !defined(__DJGPP__)
|
||
# if defined(__BEOS__)
|
||
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||
# include <net/socket.h>
|
||
# else
|
||
# include <sys/socket.h>
|
||
... | ... | |
# ifndef NOFILE
|
||
# define NOFILE (OPEN_MAX)
|
||
# endif
|
||
#include <net/socket.h>
|
||
#endif
|
||
#include "ruby/util.h"
|
||
... | ... | |
# endif
|
||
#endif
|
||
#if defined(__HAIKU__)
|
||
#define shutdown(a,b) 0
|
||
#endif
|
||
#if defined(_WIN32)
|
||
#define is_socket(fd, path) rb_w32_is_socket(fd)
|
||
#elif !defined(S_ISSOCK)
|
lib/mkmf.rb (working copy) | ||
---|---|---|
$netbsd = /netbsd/ =~ RUBY_PLATFORM
|
||
$os2 = /os2/ =~ RUBY_PLATFORM
|
||
$beos = /beos/ =~ RUBY_PLATFORM
|
||
$haiku = /haiku/ =~ RUBY_PLATFORM
|
||
$solaris = /solaris/ =~ RUBY_PLATFORM
|
||
$dest_prefix_pattern = (File::PATH_SEPARATOR == ';' ? /\A([[:alpha:]]:)?/ : /\A/)
|
||
ext/socket/getaddrinfo.c (working copy) | ||
---|---|---|
#include <sys/types.h>
|
||
#ifndef _WIN32
|
||
#include <sys/param.h>
|
||
#if defined(__BEOS__)
|
||
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||
# include <net/socket.h>
|
||
#else
|
||
# include <sys/socket.h>
|
||
... | ... | |
#define ERR(err) { error = (err); goto bad; }
|
||
/*
|
||
#if defined __UCLIBC__
|
||
const
|
||
#endif
|
||
... | ... | |
ecode = EAI_MAX;
|
||
return (char *)ai_errlist[ecode];
|
||
}
|
||
*/
|
||
void
|
||
freeaddrinfo(struct addrinfo *ai)
|
ext/socket/extconf.rb (working copy) | ||
---|---|---|
when /beos/
|
||
test_func = "socket"
|
||
have_library("net", "socket")
|
||
when /haiku/
|
||
test_func = "socket"
|
||
have_library("network", "socket")
|
||
when /i386-os2_emx/
|
||
test_func = "socket"
|
||
have_library("socket", "socket")
|
||
... | ... | |
end
|
||
ipv6 = false
|
||
default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
|
||
default_ipv6 = /cygwin|beos|haiku/ !~ RUBY_PLATFORM
|
||
if enable_config("ipv6", default_ipv6)
|
||
if checking_for("ipv6") {try_link(<<EOF)}
|
||
#include <sys/types.h>
|
ext/socket/socket.c (working copy) | ||
---|---|---|
#endif
|
||
#ifndef _WIN32
|
||
#if defined(__BEOS__)
|
||
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||
# include <net/socket.h>
|
||
#else
|
||
# include <sys/socket.h>
|
ext/socket/addrinfo.h (working copy) | ||
---|---|---|
#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
|
||
#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */
|
||
/* valid flags for addrinfo */
|
||
#ifndef __HAIKU__
|
||
#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
|
||
#endif
|
||
#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
|
||
#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
|
||
... | ... | |
#if defined __UCLIBC__
|
||
const
|
||
#endif
|
||
#ifndef __HAIKU__
|
||
extern char *gai_strerror __P((int));
|
||
#endif
|
||
/* In case there is no definition of offsetof() provided - though any proper
|
||
Standard C system should have one. */
|
ext/socket/getnameinfo.c (working copy) | ||
---|---|---|
#include <stdio.h>
|
||
#include <sys/types.h>
|
||
#ifndef _WIN32
|
||
#if defined(__BEOS__)
|
||
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||
# include <net/socket.h>
|
||
#else
|
||
# include <sys/socket.h>
|
||
... | ... | |
#define ENI_FAMILY 5
|
||
#define ENI_SALEN 6
|
||
#ifdef __HAIKU__
|
||
#define HAVE_INET_NTOP
|
||
#endif
|
||
#ifndef HAVE_INET_NTOP
|
||
static const char *
|
||
inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len)
|