~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to h/OpenBSD.h

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * OpenBSD.h for gcl 1.1
 
3
 *
 
4
 *
 
5
 */
 
6
 
 
7
#include "bsd.h"
 
8
 
 
9
#undef LD_COMMAND
 
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)
 
13
 
 
14
#define ADDITIONAL_FEATURES \
 
15
                     ADD_FEATURE("386BSD");\
 
16
                     ADD_FEATURE("OpenBSD");
 
17
 
 
18
 
 
19
#define I386
 
20
#define IEEEFLOAT
 
21
 
 
22
/* we don't need to worry about zeroing fp->_base, to prevent what??? */
 
23
#define FCLOSE_SETBUF_OK 
 
24
 
 
25
#undef HAVE_XDR
 
26
 
 
27
#define USE_ATT_TIME
 
28
 
 
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)) \
 
32
        return(FALSE)
 
33
 
 
34
#ifdef IN_GBC
 
35
#include <sys/types.h>
 
36
#endif
 
37
 
 
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()))
 
43
 
 
44
#undef UNIXSAVE
 
45
#ifdef UNIXSAVE 
 
46
 extern char etext;
 
47
#endif
 
48
 
 
49
#define RELOC_FILE "rel_sun3.c" /* for SFASL - enabled in bsd.h */
 
50
 
 
51
#ifdef CLOCKS_PER_SEC
 
52
#define HZ CLOCKS_PER_SEC
 
53
#else
 
54
#define HZ 128
 
55
#endif
 
56
#define ss_base ss_sp
 
57
 
 
58
/* begin for GC */
 
59
#define PAGEWIDTH 12            /* i386 sees 4096 byte pages */
 
60
/* end for GC */
 
61
 
 
62
#define SIG_STACK_SIZE (SIGSTKSZ/sizeof(double))
 
63
#define SETUP_SIG_STACK \
 
64
{ \
 
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"); \
 
71
}
 
72
 
 
73
#define INSTALL_SEGMENTATION_CATCHER \
 
74
         (void) gcl_signal(SIGSEGV, segmentation_catcher); \
 
75
         (void) gcl_signal(SIGBUS, segmentation_catcher)
 
76
 
 
77
/*
 
78
 * The next two defines are for SGC,
 
79
 *      one of which needs to go in cmpinclude.h.
 
80
 */
 
81
#define SIGPROTV SIGBUS
 
82
 
 
83
/* Begin for cmpinclude */
 
84
#define SGC     /* can mprotect pages and so selective gc will work */
 
85
 
 
86
/* End for cmpinclude */
 
87
 
 
88
#if defined(IN_UNIXTIME)
 
89
# include <time.h>
 
90
#endif