summaryrefslogtreecommitdiff
path: root/os_dep.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-04-24 08:37:23 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:58 +0200
commitc1cac9e179a5ea2e7cbb8b9b71a1ea46ebd3b3da (patch)
treebe8cd0503cc541da29e90477826c20a6c2725f9b /os_dep.c
parent6b2796b69a46e9e9bfcbe0f7c53f87b43d1779cd (diff)
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.
Diffstat (limited to 'os_dep.c')
-rw-r--r--os_dep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/os_dep.c b/os_dep.c
index db3fd2b..17ba79d 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -801,6 +801,7 @@ GC_INNER word GC_page_size = 0;
{
# 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;
@@ -3114,7 +3115,9 @@ STATIC void GC_default_push_other_roots(void)
# 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