* 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, 2002, 2003 Free Software Foundation
+ * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2006, 2008 Free Software Foundation
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
* and modified for Guile by Marius Vollmer.
*/
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
# define OPENBSD
# define mach_type_known
# endif
+# if defined(__NetBSD__) && defined(__alpha__)
+# define ALPHA
+# define NETBSD
+# define mach_type_known
+# endif
# if defined(__NetBSD__) && defined(__powerpc__)
# define POWERPC
# define NETBSD
# define mach_type_known
# endif
-# if defined(__NetBSD__) && defined(m68k)
+/* in netbsd 2.0 only __m68k__ is defined, not m68k */
+# if defined(__NetBSD__) && (defined(m68k) || defined(__m68k__))
# define M68K
# define NETBSD
# define mach_type_known
# endif
-# if defined(__NetBSD__) && defined(arm32)
+/* in netbsd 2.0 only __arm__ is defined, not arm32 */
+# if defined(__NetBSD__) && (defined(arm32) || defined(__arm__))
# define ARM32
# define NETBSD
# define mach_type_known
# endif
# if defined(__alpha) || defined(__alpha__)
# define ALPHA
-# if !defined(LINUX)
+# if !defined(LINUX) && !defined (NETBSD)
# define OSF1 /* a.k.a Digital Unix */
# endif
# define mach_type_known
# define MACOS
# define mach_type_known
# endif
-# if defined(macosx)
+# if defined(macosx) || \
+ (defined(__APPLE__) && defined(__MACH__) && defined(__ppc__))
# define MACOSX
# define POWERPC
# define mach_type_known
void *
scm_get_stack_base ()
{
+ ABORT ("Can't determine stack base");
return NULL;
}
# ifdef MIPS
# define MACH_TYPE "MIPS"
-/* # define STACKBOTTOM ((ptr_t)0x7fff8000) sometimes also works. */
# ifdef LINUX
- /* This was developed for a linuxce style platform. Probably */
- /* needs to be tweaked for workstation class machines. */
-# define OS_TYPE "LINUX"
- extern int __data_start;
-# define DATASTART ((ptr_t)(&__data_start))
-# define ALIGNMENT 4
-# define USE_GENERIC_PUSH_REGS 1
-# define STACKBOTTOM 0x80000000
- /* In many cases, this should probably use LINUX_STACKBOTTOM */
- /* instead. But some kernel versions seem to give the wrong */
- /* value from /proc. */
+# define CPP_WORDSZ _MIPS_SZPTR
+# define OS_TYPE "LINUX"
+# define ALIGNMENT 4
+# define ALIGN_DOUBLE
+ extern int _fdata;
+# define DATASTART ((ptr_t)(&_fdata))
+ extern int _end;
+# define DATAEND ((ptr_t)(&_end))
+# define STACKBOTTOM ((ptr_t)0x7fff8000)
+# define USE_GENERIC_PUSH_REGS 1
+# define DYNAMIC_LOADING
# endif /* Linux */
# ifdef ULTRIX
# define HEURISTIC2
void *scm_get_stack_base()
{
word dummy;
- void *result = &dummy; /* initialize to silence compiler */
+ void *result;
+
+ result = &dummy; /* initialize to silence compiler */
# define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)