Cleanup leftover directories from the merge.

--HG--
rename : dev-libs/apr-util/patches/apr-util-1.3.10.patch => dev-libs/apr_util/patches/apr_util-1.3.10.patch
rename : haiku-apps/caya-gpl-protocols/patches/caya-gpl-protocols-0.HEAD.patch => haiku-apps/caya_gpl_protocols/patches/caya_gpl_protocols-0.HEAD.patch
This commit is contained in:
Chris Roberts
2013-10-16 14:59:48 -06:00
parent 8d6506b5c9
commit f583e06d22
32 changed files with 0 additions and 1788 deletions

View File

@@ -1,27 +0,0 @@
diff -urN apr-util-1.3.11/config.layout apr-util-1.3.11-haiku/config.layout
--- apr-util-1.3.11/config.layout 2005-02-09 12:18:43.049283072 +0000
+++ apr-util-1.3.11-haiku/config.layout 2011-03-25 11:04:46.549453824 +0000
@@ -60,6 +60,23 @@
runtimedir: ${localstatedir}/run
</Layout>
+# Haiku Layout making use of finddir
+<Layout haiku>
+ prefix: /boot/common
+ exec_prefix: /boot/common
+ bindir: /boot/common/bin
+ sbindir: /boot/common/servers
+ libdir: /boot/common/lib
+ libexecdir: /boot/common/servers
+ mandir: /boot/common/documentation/man
+ sysconfdir: /boot/common/settings
+ datadir: /boot/common/data
+ installbuilddir: /boot/develop/build
+ includedir: /boot/common/include
+ localstatedir: /boot/common/var
+ runtimedir: ${localstatedir}/log
+</Layout>
+
# Mac OS X Server (Rhapsody)
<Layout Mac OS X Server>
prefix: /Local/Library/WebServer

View File

@@ -1,27 +0,0 @@
diff -urN apr-util-1.3.12/config.layout apr-util-1.3.12-haiku/config.layout
--- apr-util-1.3.12/config.layout 2005-02-09 12:18:43.049283072 +0000
+++ apr-util-1.3.12-haiku/config.layout 2011-03-25 11:04:46.549453824 +0000
@@ -60,6 +60,23 @@
runtimedir: ${localstatedir}/run
</Layout>
+# Haiku Layout making use of finddir
+<Layout haiku>
+ prefix: /boot/common
+ exec_prefix: /boot/common
+ bindir: /boot/common/bin
+ sbindir: /boot/common/servers
+ libdir: /boot/common/lib
+ libexecdir: /boot/common/servers
+ mandir: /boot/common/documentation/man
+ sysconfdir: /boot/common/settings
+ datadir: /boot/common/data
+ installbuilddir: /boot/develop/build
+ includedir: /boot/common/include
+ localstatedir: /boot/common/var
+ runtimedir: ${localstatedir}/log
+</Layout>
+
# Mac OS X Server (Rhapsody)
<Layout Mac OS X Server>
prefix: /Local/Library/WebServer

View File

@@ -1,27 +0,0 @@
diff -urN apr-util-1.4.1/config.layout apr-util-1.4.1-haiku/config.layout
--- apr-util-1.4.1/config.layout 2005-02-09 12:18:43.049283072 +0000
+++ apr-util-1.4.1-haiku/config.layout 2011-03-25 11:04:46.549453824 +0000
@@ -60,6 +60,23 @@
runtimedir: ${localstatedir}/run
</Layout>
+# Haiku Layout making use of finddir
+<Layout haiku>
+ prefix: /boot/common
+ exec_prefix: /boot/common
+ bindir: /boot/common/bin
+ sbindir: /boot/common/servers
+ libdir: /boot/common/lib
+ libexecdir: /boot/common/servers
+ mandir: /boot/common/documentation/man
+ sysconfdir: /boot/common/settings
+ datadir: /boot/common/data
+ installbuilddir: /boot/develop/build
+ includedir: /boot/common/include
+ localstatedir: /boot/common/var
+ runtimedir: ${localstatedir}/log
+</Layout>
+
# Mac OS X Server (Rhapsody)
<Layout Mac OS X Server>
prefix: /Local/Library/WebServer

View File

@@ -1,29 +0,0 @@
Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers
Copyright (c) 1991-1996 by Xerox Corporation. All rights reserved.
Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
The file linux_threads.c is also
Copyright (c) 1998 by Fergus Henderson. All rights reserved.
The files Makefile.am, and configure.in are
Copyright (c) 2001 by Red Hat Inc. All rights reserved.
Several files supporting GNU-style builds are copyrighted by the Free
Software Foundation, and carry a different license from that given
below.
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
Permission is hereby granted to use or copy this program
for any purpose, provided the above notices are retained on all copies.
Permission to modify the code and to distribute modified code is granted,
provided the above notices are retained, and a notice that the code was
modified is included with the above copyright notice.
A few of the files needed to use the GNU-style build procedure come with
slightly different licenses, though they are all similar in spirit. A few
are GPL'ed, but with an exception that should cover all uses in the
collector. (If you are concerned about such things, I recommend you look
at the notice in config.guess or ltmain.sh.)

View File

@@ -1,247 +0,0 @@
diff -ru gc-7.2alpha6-orig/configure.ac gc-7.2alpha6/configure.ac
--- gc-7.2alpha6-orig/configure.ac 2011-06-14 12:34:55.000000000 +0000
+++ gc-7.2alpha6/configure.ac 2012-03-16 00:46:16.500695040 +0000
@@ -83,6 +83,7 @@
AH_TEMPLATE([GC_DARWIN_THREADS], [Define to support Darwin pthreads.])
AH_TEMPLATE([GC_FREEBSD_THREADS], [Define to support FreeBSD pthreads.])
AH_TEMPLATE([GC_GNU_THREADS], [Define to support GNU pthreads.])
+AH_TEMPLATE([GC_HAIKU_THREADS], [Define to support Haiku pthreads.])
AH_TEMPLATE([GC_HPUX_THREADS], [Define to support HP/UX 11 pthreads.])
AH_TEMPLATE([GC_IRIX_THREADS], [Define to support Irix pthreads.])
AH_TEMPLATE([GC_LINUX_THREADS], [Define to support pthreads on Linux.])
@@ -127,6 +128,10 @@
AC_DEFINE(GC_AIX_THREADS)
AC_DEFINE(_REENTRANT)
;;
+ *-*-haiku*)
+ AC_DEFINE(GC_HAIKU_THREADS)
+ AC_DEFINE(_REENTRANT)
+ ;;
*-*-hpux11*)
AC_MSG_WARN("Only HP/UX 11 POSIX threads are supported.")
AC_DEFINE(GC_HPUX_THREADS)
diff -ru gc-7.2alpha6-orig/dyn_load.c gc-7.2alpha6/dyn_load.c
--- gc-7.2alpha6-orig/dyn_load.c 2011-05-31 15:27:11.000000000 +0000
+++ gc-7.2alpha6/dyn_load.c 2012-03-23 22:11:06.758906880 +0000
@@ -63,7 +63,7 @@
!(defined(FREEBSD) && defined(__ELF__)) && \
!(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
- !defined(DARWIN) && !defined(CYGWIN32)
+ !defined(DARWIN) && !defined(CYGWIN32) && !defined(HAIKU)
--> We only know how to find data segments of dynamic libraries for the
--> above. Additional SVR4 variants might not be too
--> hard to add.
@@ -1419,6 +1419,22 @@
#endif /* DARWIN */
+#ifdef HAIKU
+#include <kernel/image.h>
+
+GC_INNER void GC_register_dynamic_libraries()
+{
+ image_info info;
+ int32 cookie = 0;
+ while (get_next_image_info(0, &cookie, &info) == B_OK)
+ {
+ void *data = info.data;
+ GC_add_roots_inner(data, data + info.data_size, TRUE);
+ }
+}
+
+#endif /* HAIKU */
+
#elif defined(PCR)
# include "il/PCR_IL.h"
diff -ru gc-7.2alpha6-orig/include/gc_config_macros.h gc-7.2alpha6/include/gc_config_macros.h
--- gc-7.2alpha6-orig/include/gc_config_macros.h 2011-04-24 13:09:21.000000000 +0000
+++ gc-7.2alpha6/include/gc_config_macros.h 2012-03-16 00:44:30.556793856 +0000
@@ -65,7 +65,7 @@
|| defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) \
|| defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS) \
|| defined(GC_OSF1_THREADS) || defined(GC_SOLARIS_THREADS) \
- || defined(GC_WIN32_THREADS)
+ || defined(GC_WIN32_THREADS) || defined(GC_HAIKU_THREADS)
# ifndef GC_THREADS
# define GC_THREADS
# endif
diff -ru gc-7.2alpha6-orig/include/private/config.h.in gc-7.2alpha6/include/private/config.h.in
--- gc-7.2alpha6-orig/include/private/config.h.in 2010-09-11 11:27:06.000000000 +0000
+++ gc-7.2alpha6/include/private/config.h.in 2012-03-16 00:49:30.038273024 +0000
@@ -45,6 +45,9 @@
/* Define to support GNU pthreads. */
#undef GC_GNU_THREADS
+/* Define to support Haiku pthreads. */
+#undef GC_HAIKU_THREADS
+
/* Define if backtrace information is supported. */
#undef GC_HAVE_BUILTIN_BACKTRACE
Only in gc-7.2alpha6/include/private: config.h.in~
diff -ru gc-7.2alpha6-orig/include/private/gcconfig.h gc-7.2alpha6/include/private/gcconfig.h
--- gc-7.2alpha6-orig/include/private/gcconfig.h 2011-05-31 15:27:12.000000000 +0000
+++ gc-7.2alpha6/include/private/gcconfig.h 2012-03-23 22:28:55.210501632 +0000
@@ -234,6 +234,11 @@
# define BEOS
# define mach_type_known
# endif
+# if defined(__HAIKU__) && defined(_X86_)
+# define I386
+# define HAIKU
+# define mach_type_known
+# endif
# if defined(OPENBSD) && defined(__amd64__)
# define X86_64
# define mach_type_known
@@ -1110,6 +1115,15 @@
extern int etext[];
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
# endif
+# ifdef HAIKU
+# define OS_TYPE "HAIKU"
+# include <OS.h>
+# define GETPAGESIZE() B_PAGE_SIZE
+ extern int etext[];
+# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
+# define DYNAMIC_LOADING
+# define MPROTECT_VDB
+# endif
# ifdef SOLARIS
# define OS_TYPE "SOLARIS"
extern int _etext[], _end[];
@@ -2345,7 +2359,7 @@
#if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
|| defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
|| defined(DGUX) || defined(BSD) || defined(HURD) \
- || defined(AIX) || defined(DARWIN) || defined(OSF1)
+ || defined(AIX) || defined(DARWIN) || defined(OSF1) || defined(HAIKU)
# define UNIX_LIKE /* Basic Unix-like system calls work. */
#endif
@@ -2423,7 +2437,8 @@
#if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
|| defined(OPENBSD) || defined(ARM32) \
- || defined(MIPS) || defined(AVR32))) \
+ || defined(MIPS) || defined(AVR32) \
+ || defined(HAIKU))) \
|| (defined(LINUX) && (defined(SPARC) || defined(M68K))) \
|| (defined(RTEMS) && defined(I386))) && !defined(NO_GETCONTEXT)
# define NO_GETCONTEXT
@@ -2721,6 +2736,9 @@
# elif defined(SN_TARGET_PS3)
void *ps3_get_mem(size_t size);
# define GET_MEM(bytes) (struct hblk*)ps3_get_mem(bytes)
+# elif defined(HAIKU)
+ ptr_t GC_haiku_get_mem(GC_word bytes);
+# define GET_MEM(bytes) (struct hblk*)GC_haiku_get_mem(bytes)
# else
ptr_t GC_unix_get_mem(GC_word bytes);
# define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
diff -ru gc-7.2alpha6-orig/include/private/thread_local_alloc.h gc-7.2alpha6/include/private/thread_local_alloc.h
--- gc-7.2alpha6-orig/include/private/thread_local_alloc.h 2011-05-13 14:40:31.000000000 +0000
+++ gc-7.2alpha6/include/private/thread_local_alloc.h 2012-03-16 00:55:25.252706816 +0000
@@ -47,7 +47,7 @@
# define USE_COMPILER_TLS
# elif defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) \
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
- || defined(GC_NETBSD_THREADS)
+ || defined(GC_NETBSD_THREADS) || defined(GC_HAIKU_THREADS)
# define USE_PTHREAD_SPECIFIC
# elif defined(GC_HPUX_THREADS)
# ifdef __GNUC__
diff -ru gc-7.2alpha6-orig/os_dep.c gc-7.2alpha6/os_dep.c
--- gc-7.2alpha6-orig/os_dep.c 2011-05-31 15:27:11.000000000 +0000
+++ gc-7.2alpha6/os_dep.c 2012-03-23 22:32:31.656932864 +0000
@@ -790,7 +790,7 @@
}
#endif /* !MSWIN32 */
-#ifdef BEOS
+#if defined(BEOS) || defined(HAIKU)
# include <kernel/OS.h>
GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
@@ -801,7 +801,7 @@
return GC_SUCCESS;
}
# define HAVE_GET_STACK_BASE
-#endif /* BEOS */
+#endif /* BEOS || HAIKU */
#ifdef OS2
GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
@@ -1127,7 +1127,7 @@
# define GET_MAIN_STACKBASE_SPECIAL
#elif !defined(BEOS) && !defined(AMIGA) && !defined(OS2) \
&& !defined(MSWIN32) && !defined(MSWINCE) && !defined(CYGWIN32) \
- && !defined(GC_OPENBSD_THREADS) \
+ && !defined(GC_OPENBSD_THREADS) && !defined(HAIKU) \
&& (!defined(GC_SOLARIS_THREADS) || defined(_STRICT_STDC))
# if defined(LINUX) && defined(USE_GET_STACKBASE_FOR_MAIN)
@@ -1977,7 +1977,7 @@
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(MACOS) && !defined(DOS4GW) \
&& !defined(NONSTOP) && !defined(SN_TARGET_PS3) && !defined(RTEMS) \
- && !defined(__CC_ARM)
+ && !defined(__CC_ARM) && !defined(HAIKU)
# define SBRK_ARG_T ptrdiff_t
@@ -2302,6 +2302,19 @@
}
#endif
+#ifdef HAIKU
+#include <stdlib.h>
+
+ptr_t GC_haiku_get_mem(word bytes)
+{
+ void* mem;
+ if (posix_memalign(&mem, GC_page_size, bytes) == 0)
+ return mem;
+ else
+ return NULL;
+}
+#endif
+
#ifdef USE_MUNMAP
/* For now, this only works on Win32/WinCE and some Unix-like */
@@ -2903,7 +2916,9 @@
# elif !defined(MSWIN32) && !defined(MSWINCE)
# include <sys/mman.h>
# include <signal.h>
-# include <sys/syscall.h>
+# if !defined(HAIKU)
+# include <sys/syscall.h>
+# endif
# define PROTECT(addr, len) \
if (mprotect((caddr_t)(addr), (size_t)(len), \
@@ -3062,6 +3077,8 @@
/* Empirically c.trapno == 14, on IA32, but is that useful? */
/* Should probably consider alignment issues on other */
/* architectures. */
+# elif defined(HAIKU)
+# define CODE_OK TRUE
# elif defined(HPUX)
# define CODE_OK (si -> si_code == SEGV_ACCERR \
|| si -> si_code == BUS_ADRERR \
diff -ru gc-7.2alpha6-orig/pthread_support.c gc-7.2alpha6/pthread_support.c
--- gc-7.2alpha6-orig/pthread_support.c 2011-05-31 15:27:11.000000000 +0000
+++ gc-7.2alpha6/pthread_support.c 2012-03-16 00:39:06.171442176 +0000
@@ -938,7 +938,8 @@
GC_nprocs = pthread_num_processors_np();
# elif defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) \
|| defined(GC_SOLARIS_THREADS) || defined(GC_GNU_THREADS) \
- || defined(PLATFORM_ANDROID) || defined(NACL)
+ || defined(PLATFORM_ANDROID) || defined(NACL) \
+ || defined(GC_HAIKU_THREADS)
GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# elif defined(GC_IRIX_THREADS)

View File

@@ -1,248 +0,0 @@
diff -urN gc-7.2/configure.ac gc-7.2-haiku/configure.ac
--- gc-7.2/configure.ac 2012-08-09 13:25:13.047185920 -0700
+++ gc-7.2-haiku/configure.ac 2013-03-27 00:43:42.665321472 -0700
@@ -89,6 +89,7 @@
AH_TEMPLATE([GC_DARWIN_THREADS], [Define to support Darwin pthreads.])
AH_TEMPLATE([GC_FREEBSD_THREADS], [Define to support FreeBSD pthreads.])
AH_TEMPLATE([GC_GNU_THREADS], [Define to support GNU pthreads.])
+AH_TEMPLATE([GC_HAIKU_THREADS], [Define to support Haiku pthreads.])
AH_TEMPLATE([GC_HPUX_THREADS], [Define to support HP/UX 11 pthreads.])
AH_TEMPLATE([GC_IRIX_THREADS], [Define to support Irix pthreads.])
AH_TEMPLATE([GC_LINUX_THREADS], [Define to support pthreads on Linux.])
@@ -140,6 +141,10 @@
AC_DEFINE(GC_AIX_THREADS)
AC_DEFINE(_REENTRANT)
;;
+ *-*-haiku*)
+ AC_DEFINE(GC_HAIKU_THREADS)
+ AC_DEFINE(_REENTRANT)
+ ;;
*-*-hpux11*)
AC_MSG_WARN("Only HP/UX 11 POSIX threads are supported.")
AC_DEFINE(GC_HPUX_THREADS)
diff -urN gc-7.2/dyn_load.c gc-7.2-haiku/dyn_load.c
--- gc-7.2/dyn_load.c 2012-08-09 13:25:13.034603008 -0700
+++ gc-7.2-haiku/dyn_load.c 2013-03-27 00:43:42.670564352 -0700
@@ -63,7 +63,7 @@
!(defined(FREEBSD) && defined(__ELF__)) && \
!(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
- !defined(DARWIN) && !defined(CYGWIN32)
+ !defined(DARWIN) && !defined(CYGWIN32) && !defined(HAIKU)
--> We only know how to find data segments of dynamic libraries for the
--> above. Additional SVR4 variants might not be too
--> hard to add.
@@ -1426,6 +1426,22 @@
#endif /* DARWIN */
+#ifdef HAIKU
+#include <kernel/image.h>
+
+GC_INNER void GC_register_dynamic_libraries()
+{
+ image_info info;
+ int32 cookie = 0;
+ while (get_next_image_info(0, &cookie, &info) == B_OK)
+ {
+ void *data = info.data;
+ GC_add_roots_inner(data, data + info.data_size, TRUE);
+ }
+}
+
+#endif /* HAIKU */
+
#elif defined(PCR)
# include "il/PCR_IL.h"
diff -urN gc-7.2/include/gc_config_macros.h gc-7.2-haiku/include/gc_config_macros.h
--- gc-7.2/include/gc_config_macros.h 2012-08-09 13:25:13.028835840 -0700
+++ gc-7.2-haiku/include/gc_config_macros.h 2013-03-27 00:51:21.900726784 -0700
@@ -68,7 +68,8 @@
|| defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) \
|| defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS) \
|| defined(GC_OSF1_THREADS) || defined(GC_SOLARIS_THREADS) \
- || defined(GC_WIN32_THREADS) || defined(GC_RTEMS_PTHREADS)
+ || defined(GC_WIN32_THREADS) || defined(GC_RTEMS_PTHREADS) \
+ || defined(GC_HAIKU_THREADS)
# ifndef GC_THREADS
# define GC_THREADS
# endif
diff -urN gc-7.2/include/private/config.h.in gc-7.2-haiku/include/private/config.h.in
--- gc-7.2/include/private/config.h.in 2012-08-09 13:25:13.029884416 -0700
+++ gc-7.2-haiku/include/private/config.h.in 2013-03-27 00:44:56.633602048 -0700
@@ -48,6 +48,9 @@
/* Define to support GNU pthreads. */
#undef GC_GNU_THREADS
+/* Define to support Haiku pthreads. */
+#undef GC_HAIKU_THREADS
+
/* Define if backtrace information is supported. */
#undef GC_HAVE_BUILTIN_BACKTRACE
diff -urN gc-7.2/include/private/gcconfig.h gc-7.2-haiku/include/private/gcconfig.h
--- gc-7.2/include/private/gcconfig.h 2012-08-09 13:25:13.030408704 -0700
+++ gc-7.2-haiku/include/private/gcconfig.h 2013-03-27 00:45:52.350748672 -0700
@@ -234,6 +234,11 @@
# define BEOS
# define mach_type_known
# endif
+# if defined(__HAIKU__) && defined(_X86_)
+# define I386
+# define HAIKU
+# define mach_type_known
+# endif
# if defined(OPENBSD) && defined(__amd64__)
# define X86_64
# define mach_type_known
@@ -1115,6 +1120,15 @@
extern int etext[];
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
# endif
+# ifdef HAIKU
+# define OS_TYPE "HAIKU"
+# include <OS.h>
+# define GETPAGESIZE() B_PAGE_SIZE
+ extern int etext[];
+# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
+# define DYNAMIC_LOADING
+# define MPROTECT_VDB
+# endif
# ifdef SOLARIS
# define OS_TYPE "SOLARIS"
extern int _etext[], _end[];
@@ -2404,7 +2418,7 @@
#if defined(SVR4) || defined(LINUX) || defined(IRIX5) || defined(HPUX) \
|| defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
|| defined(DGUX) || defined(BSD) || defined(HURD) \
- || defined(AIX) || defined(DARWIN) || defined(OSF1)
+ || defined(AIX) || defined(DARWIN) || defined(OSF1) || defined(HAIKU)
# define UNIX_LIKE /* Basic Unix-like system calls work. */
#endif
@@ -2482,7 +2496,8 @@
#if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
|| defined(OPENBSD) || defined(ARM32) \
- || defined(MIPS) || defined(AVR32))) \
+ || defined(MIPS) || defined(AVR32) \
+ || defined(HAIKU))) \
|| (defined(LINUX) && (defined(SPARC) || defined(M68K))) \
|| (defined(RTEMS) && defined(I386))) && !defined(NO_GETCONTEXT)
# define NO_GETCONTEXT
@@ -2789,6 +2804,9 @@
# elif defined(SN_TARGET_PS3)
void *ps3_get_mem(size_t size);
# define GET_MEM(bytes) (struct hblk*)ps3_get_mem(bytes)
+# elif defined(HAIKU)
+ ptr_t GC_haiku_get_mem(GC_word bytes);
+# define GET_MEM(bytes) (struct hblk*)GC_haiku_get_mem(bytes)
# else
ptr_t GC_unix_get_mem(GC_word bytes);
# define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
diff -urN gc-7.2/include/private/thread_local_alloc.h gc-7.2-haiku/include/private/thread_local_alloc.h
--- gc-7.2/include/private/thread_local_alloc.h 2012-08-09 13:25:13.029884416 -0700
+++ gc-7.2-haiku/include/private/thread_local_alloc.h 2013-03-27 00:49:11.605290496 -0700
@@ -47,7 +47,8 @@
# define USE_COMPILER_TLS
# elif defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) \
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
- || defined(GC_NETBSD_THREADS) || defined(GC_RTEMS_PTHREADS)
+ || defined(GC_NETBSD_THREADS) || defined(GC_RTEMS_PTHREADS) \
+ || || defined(GC_HAIKU_THREADS)
# define USE_PTHREAD_SPECIFIC
# elif defined(GC_HPUX_THREADS)
# ifdef __GNUC__
diff -urN gc-7.2/os_dep.c gc-7.2-haiku/os_dep.c
--- gc-7.2/os_dep.c 2012-08-09 13:25:13.034340864 -0700
+++ gc-7.2-haiku/os_dep.c 2013-03-27 00:46:12.884998144 -0700
@@ -790,7 +790,7 @@
}
#endif /* !MSWIN32 */
-#ifdef BEOS
+#if defined(BEOS) || defined(HAIKU)
# include <kernel/OS.h>
GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
@@ -801,7 +801,7 @@
return GC_SUCCESS;
}
# define HAVE_GET_STACK_BASE
-#endif /* BEOS */
+#endif /* BEOS || HAIKU */
#ifdef OS2
GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
@@ -1138,7 +1138,7 @@
# define GET_MAIN_STACKBASE_SPECIAL
#elif !defined(BEOS) && !defined(AMIGA) && !defined(OS2) \
&& !defined(MSWIN32) && !defined(MSWINCE) && !defined(CYGWIN32) \
- && !defined(GC_OPENBSD_THREADS) \
+ && !defined(GC_OPENBSD_THREADS) && !defined(HAIKU) \
&& (!defined(GC_SOLARIS_THREADS) || defined(_STRICT_STDC))
# if defined(LINUX) && defined(USE_GET_STACKBASE_FOR_MAIN)
@@ -2001,7 +2001,7 @@
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(MACOS) && !defined(DOS4GW) \
&& !defined(NONSTOP) && !defined(SN_TARGET_PS3) && !defined(RTEMS) \
- && !defined(__CC_ARM)
+ && !defined(__CC_ARM) && !defined(HAIKU)
# define SBRK_ARG_T ptrdiff_t
@@ -2326,6 +2326,19 @@
}
#endif
+#ifdef HAIKU
+#include <stdlib.h>
+
+ptr_t GC_haiku_get_mem(word bytes)
+{
+ void* mem;
+ if (posix_memalign(&mem, GC_page_size, bytes) == 0)
+ return mem;
+ else
+ return NULL;
+}
+#endif
+
#ifdef USE_MUNMAP
/* For now, this only works on Win32/WinCE and some Unix-like */
@@ -2927,7 +2940,9 @@
# elif !defined(MSWIN32) && !defined(MSWINCE)
# include <sys/mman.h>
# include <signal.h>
-# include <sys/syscall.h>
+# if !defined(HAIKU)
+# include <sys/syscall.h>
+# endif
# define PROTECT(addr, len) \
if (mprotect((caddr_t)(addr), (size_t)(len), \
@@ -3086,6 +3101,8 @@
/* Empirically c.trapno == 14, on IA32, but is that useful? */
/* Should probably consider alignment issues on other */
/* architectures. */
+# elif defined(HAIKU)
+# define CODE_OK TRUE
# elif defined(HPUX)
# define CODE_OK (si -> si_code == SEGV_ACCERR \
|| si -> si_code == BUS_ADRERR \
diff -urN gc-7.2/pthread_support.c gc-7.2-haiku/pthread_support.c
--- gc-7.2/pthread_support.c 2012-08-09 13:25:13.048234496 -0700
+++ gc-7.2-haiku/pthread_support.c 2013-03-27 00:46:12.896794624 -0700
@@ -999,7 +999,8 @@
GC_nprocs = pthread_num_processors_np();
# elif defined(GC_OSF1_THREADS) || defined(GC_AIX_THREADS) \
|| defined(GC_SOLARIS_THREADS) || defined(GC_GNU_THREADS) \
- || defined(PLATFORM_ANDROID) || defined(NACL)
+ || defined(PLATFORM_ANDROID) || defined(NACL) \
+ || defined(GC_HAIKU_THREADS)
GC_nprocs = sysconf(_SC_NPROCESSORS_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# elif defined(GC_IRIX_THREADS)

View File

@@ -1,11 +0,0 @@
--- libgpg-error-1.10/src/mkerrcodes2.awk 2008-08-26 12:45:58.010747904 +0000
+++ libgpg-error-1.10-haiku/src/mkerrcodes2.awk 2012-04-09 16:59:18.363855872 +0000
@@ -81,7 +81,7 @@
/^#/ { next; }
header {
- if ($1 ~ /^[0123456789]+$/)
+ if ($1 ~ /^-?[0123456789]+$/)
{
print "static const int err_code_from_index[] = {";
header = 0;