| 1 | #ifndef hosts_i386bsd_H |
| 2 | /* Intel 386 running any BSD Unix */ |
| 3 | #include <fcntl.h> |
| 4 | #include <errno.h> |
| 5 | #include <stdio.h> |
| 6 | #include <stdlib.h> |
| 7 | #include <sys/types.h> |
| 8 | #include <sys/stat.h> |
| 9 | #include <ctype.h> |
| 10 | #include <string.h> |
| 11 | #include <sys/file.h> |
| 12 | #include <machine/param.h> |
| 13 | #include <machine/vmparam.h> |
| 14 | |
| 15 | #ifndef O_ACCMODE |
| 16 | #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) |
| 17 | #endif |
| 18 | |
| 19 | #define SEEK_SET 0 |
| 20 | #define SEEK_CUR 1 |
| 21 | |
| 22 | #define HOST_PAGE_SIZE NBPG |
| 23 | #define HOST_MACHINE_ARCH bfd_arch_i386 |
| 24 | #define HOST_TEXT_START_ADDR USRTEXT |
| 25 | |
| 26 | #if 0 /* This doesn't work in Jolitz release 0.1 */ |
| 27 | #define HOST_STACK_END_ADDR USRSTACK |
| 28 | #else /* Found by experimentation. */ |
| 29 | #define HOST_STACK_END_ADDR (USRSTACK - MAXSSIZ) |
| 30 | #endif |
| 31 | |
| 32 | #define TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(core_bfd) \ |
| 33 | ((core_bfd)->tdata.trad_core_data->u.u_sig) |
| 34 | #define u_comm u_kproc.kp_proc.p_comm |
| 35 | |
| 36 | /* EXACT TYPES */ |
| 37 | typedef char int8e_type; |
| 38 | typedef unsigned char uint8e_type; |
| 39 | typedef short int16e_type; |
| 40 | typedef unsigned short uint16e_type; |
| 41 | typedef int int32e_type; |
| 42 | typedef unsigned int uint32e_type; |
| 43 | |
| 44 | /* CORRECT SIZE OR GREATER */ |
| 45 | typedef char int8_type; |
| 46 | typedef unsigned char uint8_type; |
| 47 | typedef short int16_type; |
| 48 | typedef unsigned short uint16_type; |
| 49 | typedef int int32_type; |
| 50 | typedef unsigned int uint32_type; |
| 51 | |
| 52 | #include "fopen-same.h" |
| 53 | #define hosts_i386bsd_H |
| 54 | #endif |