From 8cbb63c795b3f3b9d1565eec08e3433aca7dab4f Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sat, 24 Aug 2002 00:57:14 +0000 Subject: [PATCH] When we have __libc_stack_end, use that directly instead the old tricks. --- libguile/gc_os_dep.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libguile/gc_os_dep.c b/libguile/gc_os_dep.c index 0e387f029..4f766bede 100644 --- a/libguile/gc_os_dep.c +++ b/libguile/gc_os_dep.c @@ -3,7 +3,7 @@ * Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. * Copyright (c) 1999 by Hewlett-Packard Company. All rights reserved. - * Copyright (c) 2000, 2001 Free Software Foundation + * Copyright (c) 2000, 2001, 2002 Free Software Foundation * * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. @@ -23,6 +23,19 @@ #include #include "libguile/gc.h" +#include "libguile/scmconfig.h" + +#ifdef HAVE_LIBC_STACK_END + +extern void *__libc_stack_end; + +void * +scm_get_stack_base () +{ + return __libc_stack_end; +} + +#else #define ABORT(msg) abort () @@ -1882,3 +1895,5 @@ void *scm_get_stack_base() # endif /* ! AMIGA */ # endif /* ! OS2 */ # endif /* ! MSWIN32 */ + +#endif /* ! HAVE_LIBC_STACK_END */