8
/* uses sigvector instead of sigvec. Could alternately
10
#define sigvec sigvector
12
/* does not have getpagesize() */
16
(printf("sbrk(%x)=%x",n,FIXtemp=sbrk(n)),fflush(stdout),FIXtemp)
19
(printf("brk(%x)=%x",n,FIXtemp=brk(n)),fflush(stdout),FIXtemp)
23
#define UNIXFASL "faslhp800.c"
26
#define ADDITIONAL_FEATURES \
27
ADD_FEATURE("HP9000-800"); \
28
ADD_FEATURE("MC68020"); \
33
#define USE_C_EXTENDED_MUL
34
#define USE_C_EXTENDED_DIV
37
#define DATA_BEGIN (char *)N_DATADDR(header)
39
#define RELOC_FILE "rel_hp300.c"
45
#define N_RELOFF(hdr) RTEXT_OFFSET(hdr)
46
#define N_SYMOFF(hdr) LESYM_OFFSET(hdr)
47
#define N_TXTOFF(hdr) TEXT_OFFSET(hdr)
51
#undef SET_REAL_MAXPAGE
52
#define SET_REAL_MAXPAGE real_maxpage = MAXPAGE
57
#define INIT_ALLOC if (BRK(pagetochar(MAXPAGE)) < 0) \
58
error("Can't allocate. Good-bye!.");
61
#define HAVE_AOUT <a.out.h>
63
#define SEEK_TO_END_OFILE(fp) \
64
do{struct header hdr; \
66
fread(&hdr, sizeof(hdr), 1, fp); \
67
fseek(fp,hdr.som_length,0); \
70
/* have the getcwd command */
74
/* note gabor used the att ldirectory... maybe bsd is ok?? */
78
#define OBSOLETE_LD_COMMAND(command,main,start,input,ldarg,output) \
79
{ char buf[50]; int i; \
80
char *b = &buf[sizeof(buf)]; \
83
for(i=strlen(pp)-3; i >= 0 ; i--) \
84
if (pp[i]!='/') { *(--b) = pp[i];} \
87
" if ld -d -a archive -s -e init_code -A %s -R %x -D0x%x %s %s -o %s /lib/dyncall.o ; then true; \
88
else ld -d -a archive -s -e init_%s -A %s -R %x -D0x%x %s %s -o %s /lib/dyncall.o ;fi", \
89
main,start,start + data_off, input,ldarg,output, \
91
main,start,start + data_off, input,ldarg,output);}
94
#define LD_COMMAND(command,main,start,input,ldarg,output) \
95
{ char buf[50]; int i; \
96
char *b = &buf[sizeof(buf)]; \
99
for(i=strlen(pp)-3; i >= 0 ; i--) \
100
if (pp[i]!='/') { *(--b) = pp[i];} \
103
" if nm %s | fgrep init_code > /dev/null ; then ld -d -a archive -s -e init_code -A %s -R %x -D0x%x %s %s -o %s /lib/dyncall.o 2>/dev/null ; exit 0 ; fi; \
104
if nm %s | fgrep init_%s > /dev/null ; then ld -d -a archive -s -e init_%s -A %s -R %x -D0x%x %s %s -o %s /lib/dyncall.o 2> /dev/null ; exit 0 ;fi ; exit 1 ; ", \
106
main,start,start + data_off, input,ldarg,output, \
108
main,start,start + data_off, input,ldarg,output);}
110
/* This is ok but does not do the init_filename case
111
#define LD_COMMAND(command,main,start,input,ldarg,output) \
113
"ld -d -a archive -s -e init_code -A %s -R %x -D0x%x %s %s -o %s", \
114
main,start,start + data_off, input,ldarg,output)
123
#define CORE_STARTS_NEAR_0
125
#undef REVERSE_PARAMETER_ORDER
126
#undef CC_OPTIMIZES_TEST
131
#define ALLOCATE_INCREMENTALLY
137
/* use #include <fcntl.h> */
141
#define RSYM_AUX "../c/rel_hp300.c"
144
#define FIX_BSS sym->n_type = N_BSS; \
145
val = (val + 3) & ~3;
148
/* the following 2 cause duplicate defs so we redefine them.. */
150
#define calloc xxcalloc
151
#define cfree xxcfree
155
/* Begin for cmpinclude */
158
/* End for cmpinclude */
162
/* For listen LISTEN_FOR_INPUT in stdio.h */
163
#define _file __fileL
166
/* #define DBEGIN 0x40000000 */
169
#define NULL_OR_ON_C_STACK(x) (x == 0 || ((unsigned int) x) >=0x70000000)
171
#define UNIXSAVE "unexhp9k800.c"