* hosts/h-*.h: Configure fopen using ../include/fopen-*.h
[deliverable/binutils-gdb.git] / bfd / hosts / sparc-ll.h
1 /* Host definition file for Sun-4 running with gcc, using "long long"
2 for addresses, to handle 64-bit target systems. */
3
4 #include <fcntl.h>
5 #include <errno.h>
6 #include <stdio.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 #ifndef O_ACCMODE
13 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
14 #endif
15 #define SEEK_SET 0
16 #define SEEK_CUR 1
17
18 /* Make the basic types 64-bit quantities on the host */
19 #define HOST_64_BIT long long
20
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));
34 #ifndef __GNUC__
35 PROTO(PTR, memcpy,(PTR,CONST PTR,unsigned int));
36 #else
37 /* PROTO(char *, memcpy,(char *,CONST char *,unsigned int)); */
38 #endif
39
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();
47 extern int chmod();
48 extern int fread();
49 extern int fstat();
50 extern int fwrite();
51 extern int sscanf();
52 extern int stat();
53 extern int strtol();
54 #ifndef DONTDECLARE_MALLOC
55 extern PROTO(PTR,malloc,(unsigned));
56 extern PROTO(PTR ,realloc, (PTR, unsigned));
57 #endif
58
59 extern PROTO(int, free,(PTR));
60
61
62 extern char *strrchr();
63 extern char *ctime();
64 extern int _flsbuf();
65 extern int fclose();
66 extern int time();
67 extern int utimes();
68 extern int vfprintf();
69 extern long atol();
70 extern char *getenv();
71 extern int fputc();
72 extern int unlink();
73
74
75 /* EXACT TYPES */
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;
82
83
84 #ifdef __GNUC__
85 typedef unsigned long long uint64e_type;
86
87 #else
88 typedef struct {
89 uint32e_type low, high;
90 } uint64e_type;
91
92 #endif
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;
100
101 #ifdef __GNUC__
102 typedef unsigned long long uint64_type;
103 typedef long long int64_type;
104 #else
105 typedef struct {
106 uint32e_type low, high;
107 } uint64_type;
108
109 typedef struct {
110 uint32e_type low, high;
111 } int64_type;
112
113 #endif
114
115
116 #define BYTES_IN_PRINTF_INT 4
117 #ifndef __GNUC__
118 #define uint64_typeLOW(x) (uint32_type)(((x).low))
119 #define uint64_typeHIGH(x) (uint32_type)(((x).high))
120 #else
121 #define uint64_typeLOW(x) (uint32_type)(((x) & 0xffffffff))
122 #define uint64_typeHIGH(x) (uint32_type)(((x) >> 32) & 0xffffffff)
123 #endif
124 #include "fopen-same.h"
This page took 0.032502 seconds and 5 git commands to generate.