* Sony News config stuff from Jyrki Kuoppala <jkp@cs.hut.fi>.
[external/binutils.git] / bfd / hosts / news.h
1 #include <fcntl.h>
2 #include <errno.h>
3 #include <stdio.h>
4 #include <sys/types.h>
5 #include <sys/stat.h>
6 #include <ctype.h>
7 #include <string.h>
8 #include <sys/file.h>
9
10 #ifndef O_ACCMODE
11 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
12 #endif
13 #ifndef SEEK_SET
14 #define SEEK_SET 0
15 #endif
16 #ifndef SEEK_CUR
17 #define SEEK_CUR 1
18 #endif
19 #ifdef STDC_HEADERS
20 #include <stdlib.h>
21 /*#include <string.h>*/
22 #else
23 extern char *EXFUN(mktemp,(CONST char*));
24 extern int   EXFUN(fflush,(FILE *));
25 extern int   EXFUN(write,(int, CONST char *, int));
26 extern void  EXFUN(abort,(void));
27 extern int   EXFUN(close,(int));
28 extern int   EXFUN(fcntl,(int des, int cmd, int e));
29 extern int   EXFUN(fprintf,(FILE *,char *,...));
30 extern int   EXFUN(printf,(char *,...));
31 extern int   EXFUN(qsort,(void *data,int els, int siz, int func()));
32 extern void  EXFUN(exit,(int));
33 extern int   EXFUN(fseek,(FILE*, int, int));
34 extern int   EXFUN(fclose,(FILE*));
35 extern void  EXFUN(bcopy,(char*,char*,int));
36 extern int   EXFUN(bcmp,(char *, char *, int));
37 extern void  EXFUN(bzero,(char *, int));
38 extern PTR   EXFUN(memset,(PTR, int, int));
39 extern void  EXFUN(puts,(CONST char*));
40 extern void  EXFUN(fputs,(CONST char*,FILE*));
41 extern int   EXFUN(rmdir,(CONST char *));
42 extern int   EXFUN(getuid,(void));
43 extern int   EXFUN(getgid,(void));
44 extern int   EXFUN(rename,(CONST char *, CONST char*));
45 extern int   EXFUN(getuid,());
46 extern int   EXFUN(getgid,());
47 extern void  EXFUN(perror,(CONST char *));
48 #ifndef DONTDECLARE_MALLOC
49 extern PTR   EXFUN(malloc,(unsigned));
50 extern PTR   EXFUN(realloc, (PTR, unsigned));
51 #endif
52
53 #include <machine/param.h>
54
55 #ifndef __GNUC__
56 extern PTR   EXFUN(memcpy,(PTR,CONST PTR,unsigned int));
57 #else
58 /* char * EXFUN( memcpy,(char *,CONST char *,unsigned int)); */
59 #endif
60
61 #ifdef __STDC__
62 extern void EXFUN(free,(PTR));
63 #else
64 extern int free();
65 #endif
66
67 extern char * strchr();
68 extern char *getenv();
69 extern char *memchr();
70 extern char *strrchr();
71 extern int chmod();
72 extern int fread();
73 extern int fstat();
74 extern int fwrite();
75 extern int sscanf();
76 extern int stat();
77 extern int strtol();
78
79 extern char *strrchr();
80 extern char *ctime();
81 extern int _flsbuf();
82 extern int fclose();
83 extern int time();
84 extern int utimes();
85 extern int vfprintf();
86 extern long atol();
87 extern char *getenv();
88 extern int fputc();
89 extern int unlink();
90 #endif /* __STDC__ */
91
92 /* EXACT TYPES */
93 #ifndef int8e_type
94 #define int8e_type char
95 #endif
96 #ifndef uint8e_type
97 #define uint8e_type unsigned char
98 #endif
99 #ifndef int16e_type
100 #define int16e_type short
101 #endif
102 #ifndef uint16e_type
103 #define uint16e_type unsigned short
104 #endif
105 #ifndef int32e_type
106 #define int32e_type int
107 #endif
108 #ifndef uint32e_type
109 #define uint32e_type unsigned int
110 #endif
111 #ifndef uint64e_type
112 #ifdef __GNUC__
113 #define uint64e_type unsigned long long
114 #define int64e_type struct long long
115 #define uint64_typeLOW(x) (uint32_type)(((x) & 0xffffffff))
116 #define uint64_typeHIGH(x) (uint32_type)(((x) >> 32) & 0xffffffff)
117 #else
118 typedef struct  uint64e_struct {
119   uint32e_type low, high;
120 };
121 #define uint64e_type struct uint64e_struct
122 #define int64e_type struct uint64e_struct
123 #define uint64_typeLOW(x) (uint32_type)(((x).low))
124 #define uint64_typeHIGH(x) (uint32_type)(((x).high))
125 #endif
126 #endif
127
128 /* CORRECT SIZE OR GREATER */
129 #ifndef int8_type
130 #define int8_type int8e_type
131 #endif
132 #ifndef uint8_type
133 #define uint8_type uint8e_type
134 #endif
135 #ifndef int16_type
136 #define int16_type int16e_type
137 #endif
138 #ifndef uint16_type
139 #define uint16_type uint16e_type
140 #endif
141 #ifndef int32_type
142 #define int32_type int32e_type
143 #endif
144 #ifndef uint32_type
145 #define uint32_type uint32e_type
146 #endif
147 #ifndef int64_type
148 #define int64_type int64e_type
149 #endif
150 #ifndef uint64_type
151 #define uint64_type uint64e_type
152 #endif
153
154 #ifndef BYTES_IN_PRINTF_INT
155 #define BYTES_IN_PRINTF_INT 4
156 #endif
157
158 #define HOST_PAGE_SIZE          NBPG
159 #define HOST_SEGMENT_SIZE       NBPG    /* Data seg start addr rounds to NBPG */
160 #define HOST_MACHINE_ARCH       bfd_arch_m68k
161 /* #define      HOST_MACHINE_MACHINE     */
162
163 #define HOST_TEXT_START_ADDR            0
164 #define HOST_STACK_END_ADDR     (KERNBASE - (UPAGES * NBPG))
165 #define HOST_BIG_ENDIAN_P
166 #include "fopen-same.h"