aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/init.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-10-20 16:27:24 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-20 16:27:24 +0200
commita905304c94475f67c263b5f0012e3cda8feb41ca (patch)
tree06ace340b52d9a92dbf95ddb7498cd8f659ad4e5 /gcc/ada/init.c
parent49d413972612664513ab9b69934359563616b846 (diff)
downloadgcc-a905304c94475f67c263b5f0012e3cda8feb41ca.zip
gcc-a905304c94475f67c263b5f0012e3cda8feb41ca.tar.gz
gcc-a905304c94475f67c263b5f0012e3cda8feb41ca.tar.bz2
[multiple changes]
2014-10-20 Tristan Gingold <gingold@adacore.com> * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on arm-darwin. * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for unused arguments. 2014-10-20 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Attribute): Replace variables CS and PS with Proc_Id and Subp_Id to better illustrate their purpose. Account for the case where _Postconditions has not been generated yet and the context is aspect/pragma Refined_Post. In that scenario the expected prefix of attribute 'Result is the current scope. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon in middle of expression with logical operators. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-ch13.adb (Possible_Misspelled_Aspect): New function. 2014-10-20 Steve Baird <baird@adacore.com> * pprint.adb: Improve Expression_Image function. From-SVN: r216477
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r--gcc/ada/init.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index ad80235..9a22905 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -2198,9 +2198,6 @@ __gnat_install_handler(void)
#include <stdlib.h>
#include <sys/syscall.h>
#include <sys/sysctl.h>
-#include <mach/mach_vm.h>
-#include <mach/mach_init.h>
-#include <mach/vm_statistics.h>
/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size. */
char __gnat_alternate_stack[32 * 1024]; /* 1 * MINSIGSTKSZ */
@@ -2209,10 +2206,17 @@ char __gnat_alternate_stack[32 * 1024]; /* 1 * MINSIGSTKSZ */
Tell the kernel to re-use alt stack when delivering a signal. */
#define UC_RESET_ALT_STACK 0x80000000
+#ifndef __arm__
+#include <mach/mach_vm.h>
+#include <mach/mach_init.h>
+#include <mach/vm_statistics.h>
+#endif
+
/* Return true if ADDR is within a stack guard area. */
static int
__gnat_is_stack_guard (mach_vm_address_t addr)
{
+#ifndef __arm__
kern_return_t kret;
vm_region_submap_info_data_64_t info;
mach_vm_address_t start;
@@ -2232,6 +2236,10 @@ __gnat_is_stack_guard (mach_vm_address_t addr)
&& info.user_tag == VM_MEMORY_STACK)
return 1;
return 0;
+#else
+ /* Pagezero for arm. */
+ return addr < 4096;
+#endif
}
#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE