30 |
|
|
31 |
#undef LISTEN_FOR_INPUT |
#undef LISTEN_FOR_INPUT |
32 |
#define LISTEN_FOR_INPUT(fp) \ |
#define LISTEN_FOR_INPUT(fp) \ |
33 |
|
do {int c=0;\ |
34 |
if ((fp)->_r <=0 && (c=0, ioctl((fp)->_file, FIONREAD, &c), c<=0)) \ |
if ((fp)->_r <=0 && (c=0, ioctl((fp)->_file, FIONREAD, &c), c<=0)) \ |
35 |
return(FALSE) |
return(FALSE);} while(0) |
36 |
|
|
37 |
#ifdef IN_GBC |
#ifdef IN_GBC |
38 |
#include <sys/types.h> |
#include <sys/types.h> |
62 |
#define PAGEWIDTH 12 /* i386 sees 4096 byte pages */ |
#define PAGEWIDTH 12 /* i386 sees 4096 byte pages */ |
63 |
/* end for GC */ |
/* end for GC */ |
64 |
|
|
65 |
|
#define HAVE_SIGPROCMASK |
66 |
#define SIG_STACK_SIZE (SIGSTKSZ/sizeof(double)) |
#define SIG_STACK_SIZE (SIGSTKSZ/sizeof(double)) |
67 |
#define SETUP_SIG_STACK \ |
#define SETUP_SIG_STACK \ |
68 |
{ \ |
{ \ |
69 |
static struct sigaltstack estack; \ |
static struct sigaltstack estack; \ |
70 |
estack.ss_sp = estack_buf; \ |
if ((estack.ss_sp = malloc(SIGSTKSZ)) == NULL) \ |
71 |
|
perror("malloc"); \ |
72 |
estack.ss_size = SIGSTKSZ; \ |
estack.ss_size = SIGSTKSZ; \ |
73 |
estack.ss_flags = 0; \ |
estack.ss_flags = 0; \ |
74 |
if (sigaltstack(&estack, 0) < 0) \ |
if (sigaltstack(&estack, 0) < 0) \ |
79 |
(void) gcl_signal(SIGSEGV, segmentation_catcher); \ |
(void) gcl_signal(SIGSEGV, segmentation_catcher); \ |
80 |
(void) gcl_signal(SIGBUS, segmentation_catcher) |
(void) gcl_signal(SIGBUS, segmentation_catcher) |
81 |
|
|
82 |
|
#ifdef USE_DLOPEN |
83 |
|
#define SPECIAL_RSYM "rsym_elf.c" |
84 |
|
#define SEPARATE_SFASL_FILE "fasldlsym.c" |
85 |
|
#else |
86 |
|
#ifdef HAVE_LIBBFD |
87 |
|
#define SEPARATE_SFASL_FILE "sfaslbfd.c" |
88 |
|
#else |
89 |
|
#if !defined(__i386__) && !defined(__sparc__) |
90 |
|
#error Can only do non-bfd relocs for i386 and sparc |
91 |
|
#endif |
92 |
|
#define SPECIAL_RSYM "rsym_elf.c" |
93 |
|
#define SEPARATE_SFASL_FILE "sfaslelf.c" |
94 |
|
#endif |
95 |
|
#endif |
96 |
|
|
97 |
/* |
/* |
98 |
* The next two defines are for SGC, |
* The next two defines are for SGC, |
99 |
* one of which needs to go in cmpinclude.h. |
* one of which needs to go in cmpinclude.h. |