2
* OpenBSD.h for gcl 1.1
10
#define LD_COMMAND(command,main,start,input,ldarg,output) \
11
sprintf(command, "ld -dc -N -x -A %s -T %x %s %s -o %s", \
12
main,start,input,ldarg,output)
14
#define ADDITIONAL_FEATURES \
15
ADD_FEATURE("386BSD");\
16
ADD_FEATURE("OpenBSD");
22
/* we don't need to worry about zeroing fp->_base, to prevent what??? */
23
#define FCLOSE_SETBUF_OK
29
#undef LISTEN_FOR_INPUT
30
#define LISTEN_FOR_INPUT(fp) \
31
if ((fp)->_r <=0 && (c=0, ioctl((fp)->_file, FIONREAD, &c), c<=0)) \
35
#include <sys/types.h>
38
#define DATA_BEGIN (char *) N_DATADDR(header);
39
#define A_TEXT_OFFSET(x) (sizeof (struct exec))
40
#define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
41
#define start_of_data() &etext
42
#define start_of_text() ((char *)(sizeof(struct exec) + getpagesize()))
49
#define RELOC_FILE "rel_sun3.c" /* for SFASL - enabled in bsd.h */
52
#define HZ CLOCKS_PER_SEC
59
#define PAGEWIDTH 12 /* i386 sees 4096 byte pages */
62
#define SIG_STACK_SIZE (SIGSTKSZ/sizeof(double))
63
#define SETUP_SIG_STACK \
65
static struct sigaltstack estack; \
66
estack.ss_sp = estack_buf; \
67
estack.ss_size = SIGSTKSZ; \
68
estack.ss_flags = 0; \
69
if (sigaltstack(&estack, 0) < 0) \
70
perror("sigaltstack"); \
73
#define INSTALL_SEGMENTATION_CATCHER \
74
(void) gcl_signal(SIGSEGV, segmentation_catcher); \
75
(void) gcl_signal(SIGBUS, segmentation_catcher)
78
* The next two defines are for SGC,
79
* one of which needs to go in cmpinclude.h.
81
#define SIGPROTV SIGBUS
83
/* Begin for cmpinclude */
84
#define SGC /* can mprotect pages and so selective gc will work */
86
/* End for cmpinclude */
88
#if defined(IN_UNIXTIME)