1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#include "linux.h"
#ifdef IN_GBC
/* #undef MPROTECT_ACTION_FLAGS */
/* #define MPROTECT_ACTION_FLAGS SA_RESTART|SA_SIGINFO */
/* #define GET_FAULT_ADDR(sig,code,sv,a) \ */
/* ((siginfo_t *)code)->si_addr */
/* the following two files have changed back
and forth in recent versions of linux...
Include both if they both exist, otherwise
include whatever one exists...
basically one wants the
struct sigcontext_struct { ... } ;
so as to get the fault address.
*/
#if !defined(SIGNAL_H_HAS_SIGCONTEXT) && !defined(HAVE_SIGCONTEXT)
#error Need sigcontext on 386 linux
#else
#include <signal.h>
#ifndef SIGNAL_H_HAS_SIGCONTEXT
#ifdef HAVE_ASM_SIGCONTEXT_H
#include <asm/sigcontext.h>
#endif
#ifdef HAVE_ASM_SIGNAL_H
#include <asm/signal.h>
#endif
#endif
#endif
#undef MPROTECT_ACTION_FLAGS
#define MPROTECT_ACTION_FLAGS SA_RESTART|SA_SIGINFO
#ifndef SA_SIGINFO
#define GET_FAULT_ADDR(sig,code,sv,a) ((char *)code)
#define SA_SIGINFO 0
#else
#define GET_FAULT_ADDR(sig,code,sv,a) ((siginfo_t *)code)->si_addr
#endif
/* #define GET_FAULT_ADDR(sig,code,sv,a) ((void *)(((struct sigcontext *)(&code))->cr2)) */
#endif
/*#define NULL_OR_ON_C_STACK(x) ((x)==0 || ((unsigned int)x) > (unsigned int)(pagetochar(MAXPAGE+1)))*/
#define ADDITIONAL_FEATURES \
ADD_FEATURE("BSD386"); \
ADD_FEATURE("MC68020")
#define I386
#define SGC
#ifndef SA_NOCLDWAIT
#define SA_NOCLDWAIT 0 /*fixme handler does waitpid(-1, ..., WNOHANG)*/
#endif
#define PATH_MAX 4096 /*fixme dynamic*/
#define MAXPATHLEN 4096 /*fixme dynamic*/
/* #define MAX_BRK 0x70000000 */ /*GNU Hurd fragmentation bug*/
#define RELOC_H "elf32_i386_reloc.h"
#define NEED_STACK_CHK_GUARD
#undef HAVE_D_TYPE /*FIXME defined, but not implemented in readdir*/
/* #define NO_FILE_LOCKING */ /*FIXME*/
#define ROUNDUP(x_,y_) (((unsigned long)(x_)+(y_ -1)) & ~(y_ -1))/*FIXME double eval*/
#define INITIALIZE_BRK \
massert(!brk(gcl_alloc_initialized ? core_end : \
({extern ufixnum _end;(void *)ROUNDUP((ufixnum)&_end,PAGESIZE);})))
|