diff options
author | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-22 02:40:32 +0000 |
---|---|---|
committer | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-22 02:40:32 +0000 |
commit | 11b4f29a3ac806752f8de43d37ca2b3533b7807e (patch) | |
tree | 4c334d22c263ac85927733f701963abf3bec4c78 /boehm-gc/os_dep.c | |
parent | 91eb7bbcbc6c6e98f0803c90c7deafd2f4276ad4 (diff) | |
download | gcc-11b4f29a3ac806752f8de43d37ca2b3533b7807e.tar.gz |
* include/private/gcconfig.h: Add unified test for FreeBSD.
Support FreeBSD/alpha.
* os_dep.c: Do not include <machine/trap.h> unless available.
(GC_freebsd_stack_base): Fix types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/os_dep.c')
-rw-r--r-- | boehm-gc/os_dep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c index b8f4cf84c3c..88194fe82db 100644 --- a/boehm-gc/os_dep.c +++ b/boehm-gc/os_dep.c @@ -84,7 +84,7 @@ # include <setjmp.h> #endif -#ifdef FREEBSD +#if defined(FREEBSD) && defined(I386) # include <machine/trap.h> #endif @@ -747,14 +747,14 @@ ptr_t GC_get_stack_base() ptr_t GC_freebsd_stack_base(void) { - int nm[2] = { CTL_KERN, KERN_USRSTACK}, base, len, r; - - len = sizeof(int); - r = sysctl(nm, 2, &base, &len, NULL, 0); + int nm[2] = {CTL_KERN, KERN_USRSTACK}; + ptr_t base; + size_t len = sizeof(ptr_t); + int r = sysctl(nm, 2, &base, &len, NULL, 0); if (r) ABORT("Error getting stack base"); - return (ptr_t)base; + return base; } #endif /* FREEBSD_STACKBOTTOM */ |