* mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
* os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
NO_GETCONTEXT.
* include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
call for Android.
+2011-04-24 Ivan Maidanski <ivmai@mail.ru>
+
+ * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
+ * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
+ NO_GETCONTEXT.
+ * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
+ call for Android.
+
2011-04-23 Ivan Maidanski <ivmai@mail.ru>
* include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
# define DATAEND (ptr_t)(end)
#endif
-#if defined(SVR4) && !defined(GETPAGESIZE)
+#if (defined(SVR4) || defined(PLATFORM_ANDROID)) && !defined(GETPAGESIZE)
# include <unistd.h>
# define GETPAGESIZE() sysconf(_SC_PAGESIZE)
#endif
# define DEFAULT_VDB
#endif
+#if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
+ || defined(OPENBSD) || defined(ARM32) \
+ || defined(MIPS) || defined(AVR32))) \
+ || (defined(LINUX) && defined(SPARC)) \
+ || (defined(RTEMS) && defined(I386))) && !defined(NO_GETCONTEXT)
+# define NO_GETCONTEXT
+#endif
+
#ifndef PREFETCH
# define PREFETCH(x)
# define NO_PREFETCH
# undef HAVE_PUSH_REGS
#endif
-#if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
- || defined(OPENBSD) || defined(ARM32) \
- || defined(MIPS) || defined(AVR32))) \
- || (defined(LINUX) && defined(SPARC)) \
- || (defined(RTEMS) && defined(I386))) && !defined(NO_GETCONTEXT)
-# define NO_GETCONTEXT
-#endif
-
#if !defined(HAVE_PUSH_REGS) && defined(UNIX_LIKE)
# include <signal.h>
# ifndef NO_GETCONTEXT
{
# if defined(MPROTECT_VDB) || defined(PROC_VDB) || defined(USE_MMAP)
GC_page_size = GETPAGESIZE();
+ if (!GC_page_size) ABORT("getpagesize() failed");
# else
/* It's acceptable to fake it. */
GC_page_size = HBLKSIZE;
# elif defined(SUNOS5SIGS)
# define CODE_OK (si -> si_code == SEGV_ACCERR)
# endif
-# include <ucontext.h>
+# ifndef NO_GETCONTEXT
+# include <ucontext.h>
+# endif
/*ARGSUSED*/
STATIC void GC_write_fault_handler(int sig, siginfo_t *si, void *raw_sc)
# else