updates from Utah
[deliverable/binutils-gdb.git] / bfd / hosts / std-host.h
CommitLineData
cc9a3bd6
PB
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
23extern char *EXFUN(mktemp,(CONST char*));
24extern int EXFUN(fflush,(FILE *));
25extern int EXFUN(write,(int, CONST char *, int));
26extern void EXFUN(abort,(void));
27extern int EXFUN(close,(int));
28extern int EXFUN(fcntl,(int des, int cmd, int e));
29extern int EXFUN(fprintf,(FILE *,char *,...));
30extern int EXFUN(printf,(char *,...));
31extern int EXFUN(qsort,(void *data,int els, int siz, int func()));
32extern void EXFUN(exit,(int));
33extern int EXFUN(fseek,(FILE*, int, int));
34extern int EXFUN(fclose,(FILE*));
35extern void EXFUN(bcopy,(char*,char*,int));
36extern int EXFUN(bcmp,(char *, char *, int));
37extern void EXFUN(bzero,(char *, int));
38extern PTR EXFUN(memset,(PTR, int, int));
39extern void EXFUN(puts,(CONST char*));
40extern void EXFUN(fputs,(CONST char*,FILE*));
41extern int EXFUN(rmdir,(CONST char *));
42extern int EXFUN(getuid,(void));
43extern int EXFUN(getgid,(void));
44extern int EXFUN(rename,(CONST char *, CONST char*));
45extern int EXFUN(getuid,());
46extern int EXFUN(getgid,());
47extern void EXFUN(perror,(CONST char *));
48#ifndef DONTDECLARE_MALLOC
49extern PTR EXFUN(malloc,(unsigned));
50extern PTR EXFUN(realloc, (PTR, unsigned));
51#endif
52
53#ifndef __GNUC__
54extern PTR EXFUN(memcpy,(PTR,CONST PTR,unsigned int));
55#else
56/* char * EXFUN( memcpy,(char *,CONST char *,unsigned int)); */
57#endif
58
59#ifdef __STDC__
60extern void EXFUN(free,(PTR));
61#else
62extern int free();
63#endif
64
65extern char * strchr();
66extern char *getenv();
67extern char *memchr();
68extern char *strrchr();
69extern int chmod();
70extern int fread();
71extern int fstat();
72extern int fwrite();
73extern int sscanf();
74extern int stat();
75extern int strtol();
76
77extern char *strrchr();
78extern char *ctime();
79extern int _flsbuf();
80extern int fclose();
81extern int time();
82extern int utimes();
83extern int vfprintf();
84extern long atol();
85extern char *getenv();
86extern int fputc();
87extern int unlink();
88#endif /* __STDC__ */
89
90/* EXACT TYPES */
91#ifndef int8e_type
92#define int8e_type char
93#endif
94#ifndef uint8e_type
95#define uint8e_type unsigned char
96#endif
97#ifndef int16e_type
98#define int16e_type short
99#endif
100#ifndef uint16e_type
101#define uint16e_type unsigned short
102#endif
103#ifndef int32e_type
104#define int32e_type int
105#endif
106#ifndef uint32e_type
107#define uint32e_type unsigned int
108#endif
109#ifndef uint64e_type
110#ifdef __GNUC__
111#define uint64e_type unsigned long long
112#define int64e_type struct long long
113#define uint64_typeLOW(x) (uint32_type)(((x) & 0xffffffff))
114#define uint64_typeHIGH(x) (uint32_type)(((x) >> 32) & 0xffffffff)
115#else
116typedef struct uint64e_struct {
117 uint32e_type low, high;
118};
119#define uint64e_type struct uint64e_struct
120#define int64e_type struct uint64e_struct
121#define uint64_typeLOW(x) (uint32_type)(((x).low))
122#define uint64_typeHIGH(x) (uint32_type)(((x).high))
123#endif
124#endif
125
126/* CORRECT SIZE OR GREATER */
127#ifndef int8_type
128#define int8_type int8e_type
129#endif
130#ifndef uint8_type
131#define uint8_type uint8e_type
132#endif
133#ifndef int16_type
134#define int16_type int16e_type
135#endif
136#ifndef uint16_type
137#define uint16_type uint16e_type
138#endif
139#ifndef int32_type
140#define int32_type int32e_type
141#endif
142#ifndef uint32_type
143#define uint32_type uint32e_type
144#endif
145#ifndef int64_type
146#define int64_type int64e_type
147#endif
148#ifndef uint64_type
149#define uint64_type uint64e_type
150#endif
151
152#ifndef BYTES_IN_PRINTF_INT
153#define BYTES_IN_PRINTF_INT 4
154#endif
155
156#include "fopen-same.h"
This page took 0.040487 seconds and 4 git commands to generate.