1 /* Host definition file for Sun-4 running with gcc, using "long long"
2 for addresses, to handle 64-bit target systems. */
13 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
18 /* Make the basic types 64-bit quantities on the host */
19 #define HOST_64_BIT long long
21 extern PROTO(int, abort,(void));
22 extern PROTO(int, close,(int));
23 extern PROTO(int, fcntl,(int des, int cmd, int e));
24 extern PROTO(int, fprintf,(FILE *,char *,...));
25 extern PROTO(int, printf,(char *,...));
26 extern PROTO(int, qsort,(void *data,int els, int siz, int func()));
27 extern PROTO(void, exit,(int));
28 extern PROTO(int, fseek,(FILE*, int, int));
29 extern PROTO(int, fclose,(FILE*));
30 extern PROTO(void, bcopy,(char*,char*,int));
31 extern PROTO(int, bcmp,(char *, char *, int));
32 extern PROTO(void, bzero,(char *, int));
33 extern PROTO(PTR,memset,(PTR, int,unsigned int));
35 PROTO(PTR, memcpy,(PTR,CONST PTR,unsigned int));
37 /* PROTO(char *, memcpy,(char *,CONST char *,unsigned int)); */
40 extern PROTO(int,getuid,());
41 extern PROTO(int,getgid,());
42 extern char * strchr();
43 extern PROTO(void, perror,(CONST char *));
44 extern char *getenv();
45 extern char *memchr();
46 extern char *strrchr();
54 #ifndef DONTDECLARE_MALLOC
55 extern PROTO(PTR,malloc,(unsigned));
56 extern PROTO(PTR ,realloc, (PTR, unsigned));
59 extern PROTO(int, free,(PTR));
62 extern char *strrchr();
68 extern int vfprintf();
70 extern char *getenv();
76 typedef char int8e_type;
77 typedef unsigned char uint8e_type;
78 typedef short int16e_type;
79 typedef unsigned short uint16e_type;
80 typedef int int32e_type;
81 typedef unsigned int uint32e_type;
85 typedef unsigned long long uint64e_type;
89 uint32e_type low, high;
93 /* CORRECT SIZE OR GREATER */
94 typedef char int8_type;
95 typedef unsigned char uint8_type;
96 typedef short int16_type;
97 typedef unsigned short uint16_type;
98 typedef int int32_type;
99 typedef unsigned int uint32_type;
102 typedef unsigned long long uint64_type;
103 typedef long long int64_type;
106 uint32e_type low, high;
110 uint32e_type low, high;
116 #define BYTES_IN_PRINTF_INT 4
118 #define uint64_typeLOW(x) (uint32_type)(((x).low))
119 #define uint64_typeHIGH(x) (uint32_type)(((x).high))
121 #define uint64_typeLOW(x) (uint32_type)(((x) & 0xffffffff))
122 #define uint64_typeHIGH(x) (uint32_type)(((x) >> 32) & 0xffffffff)
124 /* Macros for the 'type' part of an fopen, freopen or fdopen.
125 <Read|Write>[Update]<Binary file><text file>
130 #define FOPEN_RUB "r+"
131 #define FOPEN_WUB "w+"
132 #define FOPEN_AUB "a+"
136 #define FOPEN_RUT "r+"
137 #define FOPEN_WUT "w+"
138 #define FOPEN_AUT "a+"